Loading observation_sim/config/ChipOutput.py +2 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ class ChipOutput(object): project_cycle=self.config["project_cycle"], run_counter=self.config["run_counter"], chip_name=self.chip_label, obstype=pointing.pointing_type, dataset=pointing.dataset) obs_id = _util.get_obs_id(img_type=self.pointing_type, project_cycle=config["project_cycle"], run_counter=config[ Loading Loading @@ -71,7 +72,7 @@ class ChipOutput(object): self.hdr += additional_column_names def create_output_file(self): if self.pointing_type == 'SCI': if self.pointing_type == 'WIDE' or self.pointing_type == 'DEEP': self.cat = open(os.path.join(self.subdir, self.cat_name), "w") self.logger.info("Creating catalog file %s ...\n" % (os.path.join(self.subdir, self.cat_name))) Loading observation_sim/config/Pointing.py +7 −4 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ import observation_sim.instruments._util as _util class Pointing(object): def __init__(self, id=0, ra=0., dec=0., img_pa=0., timestamp=1621915200, sat_x=0., sat_y=0., sat_z=0., sun_x=0., sun_y=0., sun_z=0., sat_vx=0., sat_vy=0., sat_vz=0., exp_time=150., pointing_type='SCI', pointing_type_code='101', pointing_id='00000001', obs_config_file=None, t_shutter_open=1.3, t_shutter_close=1.3, dataset='csst-msc-c9-25sqdeg-v3'): def __init__(self, id=0, ra=0., dec=0., img_pa=0., timestamp=1621915200, sat_x=0., sat_y=0., sat_z=0., sun_x=0., sun_y=0., sun_z=0., sat_vx=0., sat_vy=0., sat_vz=0., exp_time=150., pointing_type='WIDE', pointing_type_code='101', pointing_id='00000001', obs_config_file=None, t_shutter_open=1.3, t_shutter_close=1.3, dataset='csst-msc-c9-25sqdeg-v3'): self.id = id self.ra = ra self.dec = dec Loading Loading @@ -91,6 +91,9 @@ class Pointing(object): # [TODO] Can also define other survey types if is_deep == 2: self.survey_field_type = "DEEP" self.pointing_type = "DEEP" else: self.pointing_type = "WIDE" if not self.obs_config_file: self.obs_config_file = str(columns[20]) Loading @@ -102,7 +105,7 @@ class Pointing(object): self.pointing_type_code = columns[21][0:3] self.obs_id = columns[21][3:] if self.obs_param["obs_type"]: self.pointing_type = self.obs_param["obs_type"] else: self.timestamp = t Loading observation_sim/instruments/chip/chip_utils.py +4 −3 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ def getChipSLSConf(chipID): def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cycle='9', run_counter='1'): if (img_type is None) or (img_type_code is None): img_type = pointing.pointing_type img_type = pointing.survey_field_type img_type_code = pointing.pointing_type_code h_prim = generatePrimaryHeader( Loading @@ -95,12 +95,13 @@ def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cy pixel_scale=chip.pix_scale, time_pt=pointing.timestamp, exptime=pointing.exp_time, im_type=img_type, obstype=img_type, sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz], project_cycle=project_cycle, run_counter=run_counter, chip_name=str(chip.chipID).rjust(2, '0')) chip_name=str(chip.chipID).rjust(2, '0'), dataset=pointing.dataset) h_ext = generateExtensionHeader( chip=chip, xlen=chip.npix_x, Loading observation_sim/sim_steps/prepare_headers.py +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ def prepare_headers(self, chip, pointing): project_cycle=self.overall_config["project_cycle"], run_counter=self.overall_config["run_counter"], chip_name=str(chip.chipID).rjust(2, '0'), obstype=pointing.survey_field_type, obstype=pointing.pointing_type, dataset=pointing.dataset) self.h_ext = generateExtensionHeader( chip=chip, Loading Loading
observation_sim/config/ChipOutput.py +2 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ class ChipOutput(object): project_cycle=self.config["project_cycle"], run_counter=self.config["run_counter"], chip_name=self.chip_label, obstype=pointing.pointing_type, dataset=pointing.dataset) obs_id = _util.get_obs_id(img_type=self.pointing_type, project_cycle=config["project_cycle"], run_counter=config[ Loading Loading @@ -71,7 +72,7 @@ class ChipOutput(object): self.hdr += additional_column_names def create_output_file(self): if self.pointing_type == 'SCI': if self.pointing_type == 'WIDE' or self.pointing_type == 'DEEP': self.cat = open(os.path.join(self.subdir, self.cat_name), "w") self.logger.info("Creating catalog file %s ...\n" % (os.path.join(self.subdir, self.cat_name))) Loading
observation_sim/config/Pointing.py +7 −4 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ import observation_sim.instruments._util as _util class Pointing(object): def __init__(self, id=0, ra=0., dec=0., img_pa=0., timestamp=1621915200, sat_x=0., sat_y=0., sat_z=0., sun_x=0., sun_y=0., sun_z=0., sat_vx=0., sat_vy=0., sat_vz=0., exp_time=150., pointing_type='SCI', pointing_type_code='101', pointing_id='00000001', obs_config_file=None, t_shutter_open=1.3, t_shutter_close=1.3, dataset='csst-msc-c9-25sqdeg-v3'): def __init__(self, id=0, ra=0., dec=0., img_pa=0., timestamp=1621915200, sat_x=0., sat_y=0., sat_z=0., sun_x=0., sun_y=0., sun_z=0., sat_vx=0., sat_vy=0., sat_vz=0., exp_time=150., pointing_type='WIDE', pointing_type_code='101', pointing_id='00000001', obs_config_file=None, t_shutter_open=1.3, t_shutter_close=1.3, dataset='csst-msc-c9-25sqdeg-v3'): self.id = id self.ra = ra self.dec = dec Loading Loading @@ -91,6 +91,9 @@ class Pointing(object): # [TODO] Can also define other survey types if is_deep == 2: self.survey_field_type = "DEEP" self.pointing_type = "DEEP" else: self.pointing_type = "WIDE" if not self.obs_config_file: self.obs_config_file = str(columns[20]) Loading @@ -102,7 +105,7 @@ class Pointing(object): self.pointing_type_code = columns[21][0:3] self.obs_id = columns[21][3:] if self.obs_param["obs_type"]: self.pointing_type = self.obs_param["obs_type"] else: self.timestamp = t Loading
observation_sim/instruments/chip/chip_utils.py +4 −3 Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ def getChipSLSConf(chipID): def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cycle='9', run_counter='1'): if (img_type is None) or (img_type_code is None): img_type = pointing.pointing_type img_type = pointing.survey_field_type img_type_code = pointing.pointing_type_code h_prim = generatePrimaryHeader( Loading @@ -95,12 +95,13 @@ def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cy pixel_scale=chip.pix_scale, time_pt=pointing.timestamp, exptime=pointing.exp_time, im_type=img_type, obstype=img_type, sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz], project_cycle=project_cycle, run_counter=run_counter, chip_name=str(chip.chipID).rjust(2, '0')) chip_name=str(chip.chipID).rjust(2, '0'), dataset=pointing.dataset) h_ext = generateExtensionHeader( chip=chip, xlen=chip.npix_x, Loading
observation_sim/sim_steps/prepare_headers.py +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ def prepare_headers(self, chip, pointing): project_cycle=self.overall_config["project_cycle"], run_counter=self.overall_config["run_counter"], chip_name=str(chip.chipID).rjust(2, '0'), obstype=pointing.survey_field_type, obstype=pointing.pointing_type, dataset=pointing.dataset) self.h_ext = generateExtensionHeader( chip=chip, Loading