thxe = 1 assert lc+thxe in [0,1,2], 'ERROR: could not establish status of LFC and simultaneous ThXe for the exposures in this list!!!' if lc+thxe == 0: arc_sublists['neither'].append(file) if lc+thxe == 1: if lc == 1: arc_sublists['lfc'].append(file) else: arc_sublists['thxe'].append(file) elif lc+thxe == 2: arc_sublists['both'].append(file) for subl in arc_sublists.keys(): if len(arc_sublists[subl]) > 0: dum = process_science_images(arc_sublists[subl], traces, chipmask, mask=mask, stripe_indices=indices, quick_indices=indices, sampling_size=25, slit_height=slit_height, qsh=slit_height, gain=gain, MB=medbias, ronmask=ronmask, MD=MDS, scalable=True, saveall=False, path=path, ext_method='optimal', fibs='all', offset=True, slope=True, date=date, from_indices=True, timit=True) ##################################################################################################################################################### ### (8) PROCESS INDIVIDUAL SIM. CALIBRATION FRAMES ################################################################################################## # TODO: use different traces and smaller slit_height for LFC only and lfc only??? if len(thxe_list) > 0: print('Processing sim-ThXe images...') dum = process_science_images(thxe_list, traces, chipmask, mask=mask, stripe_indices=indices, quick_indices=simth_indices, sampling_size=25, slit_height=slit_height, qsh=calsh, gain=gain, MB=medbias, ronmask=ronmask, MD=MDS, scalable=True, saveall=False, path=path, ext_method='optimal', offset=True, slope=True, fibs='simth', date=date, from_indices=True, timit=True) if len(laser_list) > 0: print('Processing LFC images...') dum = process_science_images(laser_list, traces, chipmask, mask=mask, stripe_indices=indices, quick_indices=lfc_indices,
stacking=True, slit_height=5, model='gausslike', return_stats=True, timit=True) ### # (4) PROCESS SCIENCE IMAGES dum = process_science_images(stellar_list, P_id, mask=mask, sampling_size=25, slit_height=30, gain=gain, MB=medbias, ronmask=ronmask, MD=MDS, scalable=True, saveall=True, path=path, ext_method='quick', from_indices=True, timit=False) # (5) calculate RVs # #preparations, eg: # f = quick_extracted['seeing1.5']['flux'].copy() # err = quick_extracted['seeing1.5']['err'].copy() # wl = quick_extracted['seeing1.5']['wl'].copy() # f0 = quick_extracted['template']['flux'].copy() # wl0 = quick_extracted['template']['wl'].copy()