def calc_star_stats(): util.mkdir(stats_dir) # Open Loop img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o ] stats_file = stats_dir + 'stats_open.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - B2 img_files = [ out_dir + 'obj{0:03d}LS4WFS_B2_c_scan_clean.fits'.format(ii) for ii in fnum_c_B2 ] stats_file = stats_dir + 'stats_closed_B2.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - 4W img_files = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in fnum_c_4W ] stats_file = stats_dir + 'stats_closed_4W.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - n1 img_files = [ out_dir + 'obj{0:03d}LS4WFS_zc11_c_scan_clean.fits'.format(ii) for ii in fnum_c_zc ] stats_file = stats_dir + 'stats_closed_zc.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #tip tilt img_files = [out_dir + 'obj{0:03d}tip_tilt_scan_clean.fits'.format(ii)\ for ii in fnum_tt] stats_file = stats_dir + 'stats_closed_tt.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) return
def calc_star_stats(): util.mkdir(stats_dir) # Open Loop img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o ] stats_file = stats_dir + 'stats_open.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - threeWFS_LS img_files = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean.fits'.format(ii) for ii in fnum_c ] stats_file = stats_dir + 'stats_closed_threeWFS_LS_c.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) return
def calc_star_stats(): util.mkdir(stats_dir) # Open Loop img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o ] stats_file = stats_dir + 'stats_open.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - B2 img_files = [ out_dir + 'obj{0:03d}LS_B2_c_scan_clean.fits'.format(ii) for ii in fnum_c_B2 ] stats_file = stats_dir + 'stats_closed_B2.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - n7 img_files = [ out_dir + 'obj{0:03d}LSnrej7_zc21_c_scan_clean.fits'.format(ii) for ii in fnum_c_n7 ] stats_file = stats_dir + 'stats_closed_n7.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - n1 img_files = [ out_dir + 'obj{0:03d}LSnrej1_zc21_c_scan_clean.fits'.format(ii) for ii in fnum_c_n1 ] stats_file = stats_dir + 'stats_closed_n1.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) return
#Closed Loop - zc img_files = [out_dir + 'obj{0:03d}LS4WFS_zc21_c_scan_clean.fits'.format(ii) for ii in fnum_c_zc] reduce_fli.find_stars(img_files, fwhm=7, threshold=15, N_passes=2, plot_psf_compare=False, \ mask_flat=flat_dir+"flat.fits", mask_min=0.8, mask_max=1.4, \ left_slice =20, right_slice=20, top_slice=25, bottom_slice=25) return def calc_star_stats(): util.mkdir(stats_dir) # Open Loop img_files = [out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o] stats_file = stats_dir + 'stats_open.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) #Closed Loop - 4W <<<<<<< HEAD img_files = [out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in fnum_c_4W] ======= <<<<<<< HEAD img_files = [out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in fnum_c_4W] ======= img_files = [out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in fnum_c_4@] >>>>>>> 9d0fe2dfc407d195227cb24b248c5a5cff886914 >>>>>>> 89ee2c675e89b7f849298b2cbbd5d3a37068a09f stats_file = stats_dir + 'stats_closed_4W.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file)
def calc_fourfilt_stats(): # Open Loop - B img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in rot_o_4 ] starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_B_BVIR_stars.txt'.format(ii) for ii in rot_1_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_B_VIRB_stars.txt'.format(ii) for ii in rot_2_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_B_IRBV_stars.txt'.format(ii) for ii in rot_3_o ] stats_file = stats_dir + 'stats_open_B.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Open Loop - V img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in rot_o_4 ] starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_V_BVIR_stars.txt'.format(ii) for ii in rot_1_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_V_VIRB_stars.txt'.format(ii) for ii in rot_2_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_V_IRBV_stars.txt'.format(ii) for ii in rot_3_o ] stats_file = stats_dir + 'stats_open_V.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Open Loop - R img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in rot_o_4 ] starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_R_BVIR_stars.txt'.format(ii) for ii in rot_1_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_R_VIRB_stars.txt'.format(ii) for ii in rot_2_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_R_IRBV_stars.txt'.format(ii) for ii in rot_3_o ] stats_file = stats_dir + 'stats_open_R.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Open Loop - I img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in rot_o_4 ] starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_I_BVIR_stars.txt'.format(ii) for ii in rot_1_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_I_VIRB_stars.txt'.format(ii) for ii in rot_2_o ] starlists += [ out_dir + 'obj{0:03d}_o_scan_clean_I_IRBV_stars.txt'.format(ii) for ii in rot_3_o ] stats_file = stats_dir + 'stats_open_I.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Closed Loop - B img_files = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in rot_c_4 ] starlists = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_B_BVIR_stars.txt'.format(ii) for ii in rot_1_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_B_VIRB_stars.txt'.format(ii) for ii in rot_2_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_B_IRBV_stars.txt'.format(ii) for ii in rot_3_c ] stats_file = stats_dir + 'stats_closed_B.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Closed Loop - V img_files = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in rot_c_4 ] starlists = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_V_BVIR_stars.txt'.format(ii) for ii in rot_1_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_V_VIRB_stars.txt'.format(ii) for ii in rot_2_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_V_IRBV_stars.txt'.format(ii) for ii in rot_3_c ] stats_file = stats_dir + 'stats_closed_V.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Closed Loop - R img_files = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in rot_c_4 ] starlists = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_R_BVIR_stars.txt'.format(ii) for ii in rot_1_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_R_VIRB_stars.txt'.format(ii) for ii in rot_2_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_R_IRBV_stars.txt'.format(ii) for ii in rot_3_c ] stats_file = stats_dir + 'stats_closed_R.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) # Closed Loop - I img_files = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean.fits'.format(ii) for ii in rot_c_4 ] starlists = [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_I_BVIR_stars.txt'.format(ii) for ii in rot_1_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_I_VIRB_stars.txt'.format(ii) for ii in rot_2_c ] starlists += [ out_dir + 'obj{0:03d}LS4WFS_c_scan_clean_I_IRBV_stars.txt'.format(ii) for ii in rot_3_c ] stats_file = stats_dir + 'stats_closed_I.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file, starlists=starlists, fourfilt=True) moffat.fit_moffat(img_files, stats_file, starlists=starlists) return
def calc_star_stats_fourfilt(): util.mkdir(stats_dir) # Open Loop img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o ] # R stats_file = stats_dir + 'stats_open_R.fits' starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_R_stars.txt'.format(ii) for ii in fnum_o ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='R') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # V stats_file = stats_dir + 'stats_open_V.fits' starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_V_stars.txt'.format(ii) for ii in fnum_o ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='V') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # B stats_file = stats_dir + 'stats_open_B.fits' starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_B_stars.txt'.format(ii) for ii in fnum_o ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='B') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # I stats_file = stats_dir + 'stats_open_I.fits' starlists = [ out_dir + 'obj{0:03d}_o_scan_clean_I_stars.txt'.format(ii) for ii in fnum_o ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='I') moffat.fit_moffat(img_files, stats_file, starlists=starlists) #Closed Loop - threeWFS_LS img_files = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean.fits'.format(ii) for ii in fnum_c ] # R stats_file = stats_dir + 'stats_closed_R.fits' starlists = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean_R_stars.txt'.format(ii) for ii in fnum_c ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='R') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # V stats_file = stats_dir + 'stats_closed_V.fits' starlists = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean_V_stars.txt'.format(ii) for ii in fnum_c ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='V') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # B stats_file = stats_dir + 'stats_closed_B.fits' starlists = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean_B_stars.txt'.format(ii) for ii in fnum_c ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='B') moffat.fit_moffat(img_files, stats_file, starlists=starlists) # I stats_file = stats_dir + 'stats_closed_I.fits' starlists = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean_I_stars.txt'.format(ii) for ii in fnum_c ] reduce_STA.calc_star_stats(img_files, output_stats=stats_file, filt='I') moffat.fit_moffat(img_files, stats_file, starlists=starlists) return
def calc_star_stats(): util.mkdir(stats_dir) # Open Loop img_files = [ out_dir + 'obj{0:03d}_o_scan_clean.fits'.format(ii) for ii in fnum_o ] stats_file = stats_dir + 'stats_open.fits' #reduce_STA.calc_star_stats(img_files, output_stats=stats_file) #moffat.fit_moffat(img_files, stats_file) # EXPERIMENT 1: # Closed - LS_c img_files = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean.fits'.format(ii) for ii in fnum_LS_c ] stats_file = stats_dir + 'stats_closed_LS.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) # Closed - LS_B2_c img_files = [ out_dir + 'obj{0:03d}threeWFSLS_B2_c_scan_clean.fits'.format(ii) for ii in fnum_LS_B2_c ] stats_file = stats_dir + 'stats_closed_LS_B2.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) # Closed - Mean_B2_c img_files = [ out_dir + 'obj{0:03d}threeWFSMean_B2_c_scan_clean.fits'.format(ii) for ii in fnum_Mean_B2_c ] stats_file = stats_dir + 'stats_closed_Mean_B2.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) # EXPERIMENT 2 # Closed - nrej1 img_files = [ out_dir + 'obj{0:03d}threeWFSLS_nrej1_c_scan_clean.fits'.format(ii) for ii in fnum_nrej1 ] stats_file = stats_dir + 'stats_closed_nrej1.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) # Closed - nrej4 img_files = [ out_dir + 'obj{0:03d}threeWFSLS_nrej4_c_scan_clean.fits'.format(ii) for ii in fnum_nrej4 ] stats_file = stats_dir + 'stats_closed_nrej4.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) # Closed - nrej7 img_files = [ out_dir + 'obj{0:03d}threeWFS_LS_c_scan_clean.fits'.format(ii) for ii in fnum_nrej7 ] stats_file = stats_dir + 'stats_closed_nrej7.fits' reduce_STA.calc_star_stats(img_files, output_stats=stats_file) moffat.fit_moffat(img_files, stats_file) return