예제 #1
0
def run_flat_cleanup(metadata,
                     prev_suffix,
                     curr_suffix,
                     type=['dome', 'twi'],
                     offsets=[0., 0.],
                     **args):
    # check the slitlet definition file
    if os.path.isfile(slitlet_def_fn):
        slitlet_fn = slitlet_def_fn
    else:
        slitlet_fn = None
    if 'dome' in type:
        print 'Correcting master domeflat', super_dflat_fn.split('/')[-1]
        pywifes.interslice_cleanup(super_dflat_raw,
                                   super_dflat_fn,
                                   slitlet_fn,
                                   offset=offsets[type.index('dome')],
                                   method='2D',
                                   **args)
    if 'twi' in type:
        print 'Correcting master twilight flat', super_tflat_fn.split('/')[-1]
        pywifes.interslice_cleanup(super_tflat_raw,
                                   super_tflat_fn,
                                   slitlet_fn,
                                   offset=offsets[type.index('twi')],
                                   method='2D',
                                   **args)
    return
예제 #2
0
def run_flat_cleanup(metadata, prev_suffix, curr_suffix,
                   type=['dome','twi'],offsets=[0.,0.], **args):
    # check the slitlet definition file
    if os.path.isfile(slitlet_def_fn):
        slitlet_fn = slitlet_def_fn
    else:
        slitlet_fn=None
    if 'dome' in type :
        print 'Correcting master domeflat',super_dflat_fn.split('/')[-1]
        pywifes.interslice_cleanup(super_dflat_raw,super_dflat_fn, slitlet_fn,
                                   offset=offsets[type.index('dome')],
                                   method='2D',**args)
    if 'twi' in type :
        print 'Correcting master twilight flat',super_tflat_fn.split('/')[-1]
        pywifes.interslice_cleanup(super_tflat_raw,super_tflat_fn, slitlet_fn,
                                   offset=offsets[type.index('twi')],
                                   method='2D',**args)
    return
예제 #3
0
    return

#------------------------------------------------------
# Fred's flat cleanup
def run_flat_cleanup(metadata, prev_suffix, curr_suffix,
                   type=['dome','twi'],offsets=[0.,0.], **args):
    # check the slitlet definition file
    if os.path.isfile(slitlet_def_fn):
        slitlet_fn = slitlet_def_fn
    else:
        slitlet_fn=None
    if 'dome' in type :
        print('Correcting master domeflat',super_dflat_fn.split('/')[-1])
        pywifes.interslice_cleanup(super_dflat_raw,super_dflat_fn, slitlet_fn,
                                   offset=offsets[type.index('dome')],
                                   method='2D',**args)
    if 'twi' in type :
        print('Correcting master twilight flat',super_tflat_fn.split('/')[-1])
        pywifes.interslice_cleanup(super_tflat_raw,super_tflat_fn, slitlet_fn,
                                   offset=offsets[type.index('twi')],
                                   method='2D',**args)
    return

#------------------------------------------------------
# Fit slitlet profiles
def run_slitlet_profile(metadata, prev_suffix, curr_suffix, **args):
    if os.path.isfile(super_dflat_fn):
        flatfield_fn  = super_dflat_fn
    else:
        flatfield_fn  = super_dflat_raw
    output_fn = slitlet_def_fn