Ejemplo n.º 1
0
def run_bpm_repair(metadata, prev_suffix, curr_suffix):
    full_obs_list = get_full_obs_list(metadata)
    for fn in full_obs_list:
        in_fn  = '%s%s.p%s.fits' % (out_dir, fn, prev_suffix)
        out_fn = '%s%s.p%s.fits' % (out_dir, fn, curr_suffix)
        if skip_done and os.path.isfile(out_fn):
            continue
        print 'Repairing red bad pixels for %s' % in_fn.split('/')[-1]
        pywifes.repair_red_bad_pix(in_fn, out_fn, data_hdu=my_data_hdu)
    return
Ejemplo n.º 2
0
def run_bpm_repair(metadata, prev_suffix, curr_suffix):
    full_obs_list = get_full_obs_list(metadata)
    for fn in full_obs_list:
        in_fn = '%s%s.p%s.fits' % (out_dir, fn, prev_suffix)
        out_fn = '%s%s.p%s.fits' % (out_dir, fn, curr_suffix)
        if skip_done and os.path.isfile(out_fn):
            continue
        print 'Repairing red bad pixels for %s' % in_fn.split('/')[-1]
        pywifes.repair_red_bad_pix(in_fn, out_fn, data_hdu=my_data_hdu)
    return
Ejemplo n.º 3
0
def run_bpm_repair(metadata, prev_suffix, curr_suffix):
    full_obs_list = get_full_obs_list(metadata)
    for fn in full_obs_list:
        in_fn = os.path.join(out_dir, '%s.p%s.fits' % (fn, prev_suffix))
        out_fn = os.path.join(out_dir, '%s.p%s.fits' % (fn, curr_suffix))
        if skip_done and os.path.isfile(out_fn):
            continue

        if band == 'r':
            print('Repairing red bad pixels for %s' % in_fn.split('/')[-1])
            pywifes.repair_red_bad_pix(in_fn, out_fn, data_hdu=my_data_hdu)
        elif band == 'b':
            print('Repairing blue bad pixels for %s' % in_fn.split('/')[-1])
            pywifes.repair_blue_bad_pix(in_fn, out_fn, data_hdu=my_data_hdu)
    return