def run_wire_soln(metadata, prev_suffix, curr_suffix): # Global wire solution wire_in_fn = os.path.join( out_dir, '%s.p%s.fits' % (metadata['wire'][0], prev_suffix)) print('Deriving global wire solution from %s' % wire_in_fn.split('/')[-1]) pywifes.derive_wifes_wire_solution(wire_in_fn, wire_out_fn) # Wire solutions for any specific obsevations sci_obs_list = get_sci_obs_list(metadata) std_obs_list = get_std_obs_list(metadata) for fn in sci_obs_list + std_obs_list: # Check if the file has a dedicated wire associated with it ... # Only for Science and Std stars for now (sky not required at this stage) # (less critical for the rest anyway ...) local_wires = get_associated_calib(metadata, fn, 'wire') if local_wires: local_wire_fn = os.path.join( out_dir, '%s.p%s.fits' % (local_wires[0], prev_suffix)) local_wire_out_fn = os.path.join( out_dir, '%s.wire.fits' % (out_dir, local_wires[0])) if os.path.isfile(local_wire_out_fn): continue print('Deriving local wire solution for %s' % local_wires[0]) pywifes.derive_wifes_wire_solution(local_wire_fn, local_wire_out_fn) return
def run_wire_soln(metadata, prev_suffix, curr_suffix): # Global wire solution wire_in_fn = '%s%s.p%s.fits' % (out_dir, metadata['wire'][0], prev_suffix) print 'Deriving global wire solution from %s' % wire_in_fn.split('/')[-1] pywifes.derive_wifes_wire_solution(wire_in_fn, wire_out_fn) # Wire solutions for any specific obsevations sci_obs_list = get_sci_obs_list(metadata) std_obs_list = get_std_obs_list(metadata) for fn in sci_obs_list + std_obs_list: # Check if the file has a dedicated wire associated with it ... # Only for Science and Std stars for now (sky not required at this stage) # (less critical for the rest anyway ...) local_wires = get_associated_calib(metadata,fn, 'wire') if local_wires : local_wire_fn = '%s%s.p%s.fits' % (out_dir, local_wires[0], prev_suffix) local_wire_out_fn = '%s%s.wire.fits' % (out_dir, local_wires[0]) if os.path.isfile(local_wire_out_fn): continue print 'Deriving local wire solution for %s' % local_wires[0] pywifes.derive_wifes_wire_solution(local_wire_fn, local_wire_out_fn) return
if os.path.isfile(local_wsol_out_fn): continue print('Deriving local wavelength solution for %s' % local_arcs[i]) pywifes.derive_wifes_wave_solution(local_arc_fn, local_wsol_out_fn, **args) return #------------------------------------------------------ # Wire solution def run_wire_soln(metadata, prev_suffix, curr_suffix): # Global wire solution wire_in_fn = os.path.join(out_dir, '%s.p%s.fits' % (out_dir, metadata['wire'][0], prev_suffix)) print('Deriving global wire solution from %s' % wire_in_fn.split('/')[-1]) pywifes.derive_wifes_wire_solution(wire_in_fn, wire_out_fn) # Wire solutions for any specific obsevations sci_obs_list = get_sci_obs_list(metadata) std_obs_list = get_std_obs_list(metadata) for fn in sci_obs_list + std_obs_list: # Check if the file has a dedicated wire associated with it ... # Only for Science and Std stars for now (sky not required at this stage) # (less critical for the rest anyway ...) local_wires = get_associated_calib(metadata,fn, 'wire') if local_wires : local_wire_fn = os.path.join(out_dir, '%s.p%s.fits' % (local_wires[0], prev_suffix)) local_wire_out_fn = os.path.join(out_dir, '%s.wire.fits' % (out_dir, local_wires[0])) if os.path.isfile(local_wire_out_fn): continue print('Deriving local wire solution for %s' % local_wires[0]) pywifes.derive_wifes_wire_solution(local_wire_fn, local_wire_out_fn)