def add_resolution_to_reflections(reflections, experiments):
    """Add column d to reflection list"""
    imageset = experiments.imagesets()[0]
    if 'imageset_id' not in reflections:
        reflections['imageset_id'] = reflections['id']
    reflections.centroid_px_to_mm(imageset.get_detector(), imageset.get_scan())
    reflections.map_centroids_to_reciprocal_space(detector=imageset.
        get_detector(), beam=imageset.get_beam(), goniometer=imageset.
        get_goniometer())
    d_spacings = 1 / reflections['rlp'].norms()
    reflections['d'] = d_spacings
