diff --git a/Catalog/C6_50sqdeg.py b/Catalog/C6_50sqdeg.py index 3c21fad47379696a7a449ae255db8bc7a72014d9..00d88888e605422071e5512824f82a3c1ca08bcc 100644 --- a/Catalog/C6_50sqdeg.py +++ b/Catalog/C6_50sqdeg.py @@ -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] @@ -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 + # 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'], diff --git a/ObservationSim/Config/Pointing.py b/ObservationSim/Config/Pointing.py index 8aa7680fc11b90bacc876b1d0c6baedddaf98370..7e640cd58c3604dc7a4b00272f5b49bebb29ae2f 100644 --- a/ObservationSim/Config/Pointing.py +++ b/ObservationSim/Config/Pointing.py @@ -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) diff --git a/config/config_overall.yaml b/config/config_overall.yaml index ce7699f854d4b5282ce9e5c6af1bcc0016a0fb7f..7bad886d754d4553246fecd61309fbe6b6e84dfb 100644 --- a/config/config_overall.yaml +++ b/config/config_overall.yaml @@ -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 @@ -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] @@ -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...] @@ -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/" diff --git a/config/obs_config_SCI_WIDE_phot.yaml b/config/obs_config_SCI_WIDE_phot.yaml index fe8e2f769b832bede56f9d0988ab5847583ae764..cd4b5c8affbb0eb9835658f05975edf86cc67f44 100644 --- a/config/obs_config_SCI_WIDE_phot.yaml +++ b/config/obs_config_SCI_WIDE_phot.yaml @@ -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: diff --git a/test_C6.sh b/test_C6.sh index a7567ecba2d1e88cff063db3f1d3c69bf7588566..32fc168a01207a0533d35c9d22bfb9875254552e 100755 --- a/test_C6.sh +++ b/test_C6.sh @@ -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 \