Loading Catalog/C6_50sqdeg.py +19 −13 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ class Catalog(CatalogBase): param['dec'] = dec_arr[igals] param['ra_orig'] = gals['ra'][igals] param['dec_orig'] = gals['dec'][igals] if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200): continue # param['mag_use_normal'] = gals['mag_csst_%s'%(self.filt.filter_type)][igals] if self.filt.filter_type == 'NUV': param['mag_use_normal'] = gals['mag_csst_nuv'][igals] Loading Loading @@ -275,29 +279,31 @@ class Catalog(CatalogBase): param['av'] = 0.0 param['redden'] = 0 # TEMP self.ids += 1 param['id'] = '%06d'%(int(pix_id)) + '%06d'%(cat_id) + '%08d'%(igals) # Is this an Quasar? param['qsoindex'] = gals['qsoindex'][igals] if param['qsoindex'] == -1: param['star'] = 0 # Galaxy param['agnsed_file'] = "" obj = Galaxy(param, logger=self.logger) else: param['star'] = 2 # Quasar param['agnsed_file'] = agnsed_file # NOTE: this cut cannot be put before the SED type has been assigned if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200): continue # TEMP self.ids += 1 param['id'] = '%06d'%(int(pix_id)) + '%06d'%(cat_id) + '%08d'%(igals) if param['star'] == 0: obj = Galaxy(param, logger=self.logger) elif param['star'] == 2: # First add QSO model obj = Quasar(param, logger=self.logger) # Need to deal with additional output columns obj.additional_output_str = self.add_fmt%("n", 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0, 0.) self.objs.append(obj) # Then add host galaxy model param['star'] = 0 # Galaxy param['agnsed_file'] = "" obj = Galaxy(param, logger=self.logger) # Need to deal with additional output columns for (host) galaxy obj.additional_output_str = self.add_fmt%("n", 0., 0., 0., param['bulgemass'], param['diskmass'], param['detA'], param['e1'], param['e2'], param['kappa'], param['g1'], param['g2'], param['size'], Loading ObservationSim/Config/Pointing.py +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ class Pointing(object): # Load the configuration file for this particular pointing # [TODO] self.obs_config_file = "/share/home/fangyuedong/20231211/csst-simulation/config/obs_config_SCI_WIDE_phot.yaml" self.obs_config_file = "/public/home/fangyuedong/project/csst-simulation/config/obs_config_SCI_WIDE_phot.yaml" with open(self.obs_config_file, "r") as stream: try: self.obs_param = yaml.safe_load(stream) Loading config/config_overall.yaml +16 −15 Original line number Diff line number Diff line Loading @@ -10,9 +10,9 @@ # Base diretories and naming setup # can add some of the command-line arguments here as well; # ok to pass either way or both, as long as they are consistent work_dir: "/share/home/fangyuedong/20231211/workplace/" data_dir: "/share/simudata/CSSOSDataProductsSims/data/" run_name: "test_new_config" work_dir: "/public/home/fangyuedong/project/workplace/" data_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/" run_name: "QSO_50sqdeg_test" # Project cycle and run counter are used to name the outputs project_cycle: 6 Loading @@ -37,22 +37,23 @@ run_option: # in the corresponding (user defined) 'Catalog' class catalog_options: input_path: cat_dir: "Catalog_C6_20221212" star_cat: "C6_MMW_GGC_Astrometry_healpix.hdf5" galaxy_cat: "cat2CSSTSim_bundle/" AGN_cat: "AGN_C6_ross13_rand_pos_rmax-1.3.fits" # cat_dir: "Catalog_C6_20221212" cat_dir: "" star_cat: "starcat/" galaxy_cat: "qsocat/cat2CSSTSim_bundle-50sqDeg/" # AGN_cat: "AGN_C6_ross13_rand_pos_rmax-1.3.fits" SED_templates_path: star_SED: "Catalog_20210126/SpecLib.hdf5" galaxy_SED: "Catalog_C6_20221212/sedlibs/" AGN_SED: "quickspeclib_ross13.fits" AGN_SED_WAVE: "wave_ross13.npy" star_SED: "SpecLib.hdf5" galaxy_SED: "sedlibs/" AGN_SED: "qsocat/qsosed/" # AGN_SED_WAVE: "wave_ross13.npy" # Only simulate stars? star_only: NO # Only simulate galaxies? galaxy_only: NO galaxy_only: YES # rotate galaxy ellipticity rotateEll: 0. # [degree] Loading @@ -67,8 +68,8 @@ obs_setting: # if you just want to run default pointing: # - pointing_dir: null # - pointing_file: null pointing_dir: "/share/simudata/CSSOSDataProductsSims/data/" pointing_file: "pointing_radec_246.5_40.dat" pointing_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg" pointing_file: "pointing_50_combined.dat" # Run specific pointing(s): # - give a list of indexes of pointings: [ip_1, ip_2...] Loading Loading @@ -107,7 +108,7 @@ psf_setting: # path to PSF data # NOTE: only valid for "Interp" PSF # PSF models for photometry survey simulation psf_pho_dir: "/share/simudata/CSSOSDataProductsSims/data/psfCube1" psf_pho_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/dataC6/psfCube1" # PSF models for slitless spectrum survey simulation psf_sls_dir: "/share/simudata/CSSOSDataProductsSims/data/SLS_PSF_PCA_fp/" Loading config/obs_config_SCI_WIDE_phot.yaml +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ obs_type: "SCIE" # Define list of chips run_chips: [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25] # run_chips: [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25] run_chips: [6] # Define observation sequence call_sequence: Loading test_C6.sh +3 −3 Original line number Diff line number Diff line Loading @@ -2,10 +2,10 @@ date python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \ python3 /public/home/fangyuedong/project/csst-simulation/run_sim.py \ --config_file config_overall.yaml \ --catalog C6_Catalog \ -c /share/home/fangyuedong/20231211/csst-simulation/config --catalog C6_50sqdeg \ -c /public/home/fangyuedong/project/csst-simulation/config # python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \ # --config_file config_C6_dev.yaml \ Loading Loading
Catalog/C6_50sqdeg.py +19 −13 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ class Catalog(CatalogBase): param['dec'] = dec_arr[igals] param['ra_orig'] = gals['ra'][igals] param['dec_orig'] = gals['dec'][igals] if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200): continue # param['mag_use_normal'] = gals['mag_csst_%s'%(self.filt.filter_type)][igals] if self.filt.filter_type == 'NUV': param['mag_use_normal'] = gals['mag_csst_nuv'][igals] Loading Loading @@ -275,29 +279,31 @@ class Catalog(CatalogBase): param['av'] = 0.0 param['redden'] = 0 # TEMP self.ids += 1 param['id'] = '%06d'%(int(pix_id)) + '%06d'%(cat_id) + '%08d'%(igals) # Is this an Quasar? param['qsoindex'] = gals['qsoindex'][igals] if param['qsoindex'] == -1: param['star'] = 0 # Galaxy param['agnsed_file'] = "" obj = Galaxy(param, logger=self.logger) else: param['star'] = 2 # Quasar param['agnsed_file'] = agnsed_file # NOTE: this cut cannot be put before the SED type has been assigned if not self.chip.isContainObj(ra_obj=param['ra'], dec_obj=param['dec'], margin=200): continue # TEMP self.ids += 1 param['id'] = '%06d'%(int(pix_id)) + '%06d'%(cat_id) + '%08d'%(igals) if param['star'] == 0: obj = Galaxy(param, logger=self.logger) elif param['star'] == 2: # First add QSO model obj = Quasar(param, logger=self.logger) # Need to deal with additional output columns obj.additional_output_str = self.add_fmt%("n", 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0, 0.) self.objs.append(obj) # Then add host galaxy model param['star'] = 0 # Galaxy param['agnsed_file'] = "" obj = Galaxy(param, logger=self.logger) # Need to deal with additional output columns for (host) galaxy obj.additional_output_str = self.add_fmt%("n", 0., 0., 0., param['bulgemass'], param['diskmass'], param['detA'], param['e1'], param['e2'], param['kappa'], param['g1'], param['g2'], param['size'], Loading
ObservationSim/Config/Pointing.py +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ class Pointing(object): # Load the configuration file for this particular pointing # [TODO] self.obs_config_file = "/share/home/fangyuedong/20231211/csst-simulation/config/obs_config_SCI_WIDE_phot.yaml" self.obs_config_file = "/public/home/fangyuedong/project/csst-simulation/config/obs_config_SCI_WIDE_phot.yaml" with open(self.obs_config_file, "r") as stream: try: self.obs_param = yaml.safe_load(stream) Loading
config/config_overall.yaml +16 −15 Original line number Diff line number Diff line Loading @@ -10,9 +10,9 @@ # Base diretories and naming setup # can add some of the command-line arguments here as well; # ok to pass either way or both, as long as they are consistent work_dir: "/share/home/fangyuedong/20231211/workplace/" data_dir: "/share/simudata/CSSOSDataProductsSims/data/" run_name: "test_new_config" work_dir: "/public/home/fangyuedong/project/workplace/" data_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg/" run_name: "QSO_50sqdeg_test" # Project cycle and run counter are used to name the outputs project_cycle: 6 Loading @@ -37,22 +37,23 @@ run_option: # in the corresponding (user defined) 'Catalog' class catalog_options: input_path: cat_dir: "Catalog_C6_20221212" star_cat: "C6_MMW_GGC_Astrometry_healpix.hdf5" galaxy_cat: "cat2CSSTSim_bundle/" AGN_cat: "AGN_C6_ross13_rand_pos_rmax-1.3.fits" # cat_dir: "Catalog_C6_20221212" cat_dir: "" star_cat: "starcat/" galaxy_cat: "qsocat/cat2CSSTSim_bundle-50sqDeg/" # AGN_cat: "AGN_C6_ross13_rand_pos_rmax-1.3.fits" SED_templates_path: star_SED: "Catalog_20210126/SpecLib.hdf5" galaxy_SED: "Catalog_C6_20221212/sedlibs/" AGN_SED: "quickspeclib_ross13.fits" AGN_SED_WAVE: "wave_ross13.npy" star_SED: "SpecLib.hdf5" galaxy_SED: "sedlibs/" AGN_SED: "qsocat/qsosed/" # AGN_SED_WAVE: "wave_ross13.npy" # Only simulate stars? star_only: NO # Only simulate galaxies? galaxy_only: NO galaxy_only: YES # rotate galaxy ellipticity rotateEll: 0. # [degree] Loading @@ -67,8 +68,8 @@ obs_setting: # if you just want to run default pointing: # - pointing_dir: null # - pointing_file: null pointing_dir: "/share/simudata/CSSOSDataProductsSims/data/" pointing_file: "pointing_radec_246.5_40.dat" pointing_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/data_50sqDeg" pointing_file: "pointing_50_combined.dat" # Run specific pointing(s): # - give a list of indexes of pointings: [ip_1, ip_2...] Loading Loading @@ -107,7 +108,7 @@ psf_setting: # path to PSF data # NOTE: only valid for "Interp" PSF # PSF models for photometry survey simulation psf_pho_dir: "/share/simudata/CSSOSDataProductsSims/data/psfCube1" psf_pho_dir: "/public/share/yangxuliu/CSSOSDataProductsSims/dataC6/psfCube1" # PSF models for slitless spectrum survey simulation psf_sls_dir: "/share/simudata/CSSOSDataProductsSims/data/SLS_PSF_PCA_fp/" Loading
config/obs_config_SCI_WIDE_phot.yaml +2 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,8 @@ obs_type: "SCIE" # Define list of chips run_chips: [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25] # run_chips: [6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25] run_chips: [6] # Define observation sequence call_sequence: Loading
test_C6.sh +3 −3 Original line number Diff line number Diff line Loading @@ -2,10 +2,10 @@ date python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \ python3 /public/home/fangyuedong/project/csst-simulation/run_sim.py \ --config_file config_overall.yaml \ --catalog C6_Catalog \ -c /share/home/fangyuedong/20231211/csst-simulation/config --catalog C6_50sqdeg \ -c /public/home/fangyuedong/project/csst-simulation/config # python3 /share/home/fangyuedong/20231211/csst-simulation/run_sim.py \ # --config_file config_C6_dev.yaml \ Loading