Loading csst/msc/calib_pos.py +14 −14 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class CsstProcMscPositionCalibration(CsstProcessor): hdul_flg.append(h1) hdul_flg.writeto(output_flgnm, overwrite=True) def run_sextractor(self, ccd_ids): def run_sextractor(self, fn_list, ccd_ids): """ Run sextractor Loading @@ -86,14 +86,14 @@ class CsstProcMscPositionCalibration(CsstProcessor): fn = self.dm.l1_sci(ccd_id=this_ccd_id, suffix="img", ext="fits") cat_list.append(sex_cat) # config_sextractor = CONFIG_PATH + "new_csst_realtime.no.weight.sex" # sex_comd1 = 'sex -c ' + config_sextractor + ' ' # sex_comd2 = fn_list + ' -CATALOG_NAME ' + cat_list # sex_comd3 = ' -PARAMETERS_NAME ' + CONFIG_PATH + 'csst_realtime.param' + ' -FILTER_NAME ' + CONFIG_PATH + 'csst_realtime.conv' + ' -STARNNW_NAME ' + CONFIG_PATH + 'csst_realtime.nnw' # sex_comd = sex_comd1 + sex_comd2 + sex_comd3 # print(sex_comd) # p = Popen(sex_comd, shell=True) # p.wait() config_sextractor = CONFIG_PATH + "new_csst_realtime.no.weight.sex" sex_comd1 = 'sex -c ' + config_sextractor + ' ' sex_comd2 = fn_list + ' -CATALOG_NAME ' + cat_list sex_comd3 = ' -PARAMETERS_NAME ' + CONFIG_PATH + 'csst_realtime.param' + ' -FILTER_NAME ' + CONFIG_PATH + 'csst_realtime.conv' + ' -STARNNW_NAME ' + CONFIG_PATH + 'csst_realtime.nnw' sex_comd = sex_comd1 + sex_comd2 + sex_comd3 print(sex_comd) p = Popen(sex_comd, shell=True) p.wait() def combine_catalog(self, ccd_ids): """ Loading Loading @@ -438,11 +438,11 @@ class CsstProcMscPositionCalibration(CsstProcessor): print('preparing files for position calibration....') #self.join_data(img_list, wht_list, flg_list) print('################## run sextractor ###################') #p = Pool() #prod_x = partial(self.run_sextractor) #result = p.map(prod_x, fn_list) #p.close() #p.join() p = Pool() prod_x = partial(self.run_sextractor,ccd_ids) result = p.map(prod_x, fn_list) p.close() p.join() self.run_sextractor(ccd_ids) print('################## sextractor done ###################') print('############### combine sextractor catalog ###############') Loading csst/msc/pipeline.py +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ def do_one_exposure(ver_sim="C5.1", dir_l0="", dir_l1="", dir_pcref="", path_aux img_list.append(img) wht_list.append(wht) flg_list.append(flg) fn_list.append(dm.l1_sci(ccd_id=this_ccd_id, suffix="img",ext="fits")) pcProc.run(img_list, wht_list, flg_list, ccd_ids, dir_pcref, 2.0, pm_correct=True, wcs_refine=True, plot=True) pcProc.cleanup() Loading Loading
csst/msc/calib_pos.py +14 −14 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class CsstProcMscPositionCalibration(CsstProcessor): hdul_flg.append(h1) hdul_flg.writeto(output_flgnm, overwrite=True) def run_sextractor(self, ccd_ids): def run_sextractor(self, fn_list, ccd_ids): """ Run sextractor Loading @@ -86,14 +86,14 @@ class CsstProcMscPositionCalibration(CsstProcessor): fn = self.dm.l1_sci(ccd_id=this_ccd_id, suffix="img", ext="fits") cat_list.append(sex_cat) # config_sextractor = CONFIG_PATH + "new_csst_realtime.no.weight.sex" # sex_comd1 = 'sex -c ' + config_sextractor + ' ' # sex_comd2 = fn_list + ' -CATALOG_NAME ' + cat_list # sex_comd3 = ' -PARAMETERS_NAME ' + CONFIG_PATH + 'csst_realtime.param' + ' -FILTER_NAME ' + CONFIG_PATH + 'csst_realtime.conv' + ' -STARNNW_NAME ' + CONFIG_PATH + 'csst_realtime.nnw' # sex_comd = sex_comd1 + sex_comd2 + sex_comd3 # print(sex_comd) # p = Popen(sex_comd, shell=True) # p.wait() config_sextractor = CONFIG_PATH + "new_csst_realtime.no.weight.sex" sex_comd1 = 'sex -c ' + config_sextractor + ' ' sex_comd2 = fn_list + ' -CATALOG_NAME ' + cat_list sex_comd3 = ' -PARAMETERS_NAME ' + CONFIG_PATH + 'csst_realtime.param' + ' -FILTER_NAME ' + CONFIG_PATH + 'csst_realtime.conv' + ' -STARNNW_NAME ' + CONFIG_PATH + 'csst_realtime.nnw' sex_comd = sex_comd1 + sex_comd2 + sex_comd3 print(sex_comd) p = Popen(sex_comd, shell=True) p.wait() def combine_catalog(self, ccd_ids): """ Loading Loading @@ -438,11 +438,11 @@ class CsstProcMscPositionCalibration(CsstProcessor): print('preparing files for position calibration....') #self.join_data(img_list, wht_list, flg_list) print('################## run sextractor ###################') #p = Pool() #prod_x = partial(self.run_sextractor) #result = p.map(prod_x, fn_list) #p.close() #p.join() p = Pool() prod_x = partial(self.run_sextractor,ccd_ids) result = p.map(prod_x, fn_list) p.close() p.join() self.run_sextractor(ccd_ids) print('################## sextractor done ###################') print('############### combine sextractor catalog ###############') Loading
csst/msc/pipeline.py +1 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,7 @@ def do_one_exposure(ver_sim="C5.1", dir_l0="", dir_l1="", dir_pcref="", path_aux img_list.append(img) wht_list.append(wht) flg_list.append(flg) fn_list.append(dm.l1_sci(ccd_id=this_ccd_id, suffix="img",ext="fits")) pcProc.run(img_list, wht_list, flg_list, ccd_ids, dir_pcref, 2.0, pm_correct=True, wcs_refine=True, plot=True) pcProc.cleanup() Loading