Commit 2830777a authored by Zhang Xin's avatar Zhang Xin
Browse files

add primary head POS_ANG0 value

parent 44ecd0f9
Pipeline #9062 failed with stage
in 0 seconds
...@@ -26,6 +26,7 @@ class ChipOutput(object): ...@@ -26,6 +26,7 @@ class ChipOutput(object):
im_type=pointing.pointing_type, im_type=pointing.pointing_type,
sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z],
sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz],
pa=(pointing.img_pa.deg + 180) % 360 - 180,
project_cycle=self.config["project_cycle"], project_cycle=self.config["project_cycle"],
run_counter=self.config["run_counter"], run_counter=self.config["run_counter"],
chip_name=self.chip_label, chip_name=self.chip_label,
......
...@@ -355,7 +355,7 @@ def WCS_def(xlen=9216, ylen=9232, gapy=898.0, gapx1=534, gapx2=1309, ra_ref=60, ...@@ -355,7 +355,7 @@ def WCS_def(xlen=9216, ylen=9232, gapy=898.0, gapx1=534, gapx2=1309, ra_ref=60,
# TODO project_cycle is temporary, is not in header defined, delete in future # TODO project_cycle is temporary, is not in header defined, delete in future
def generatePrimaryHeader(xlen=9216, ylen=9232, pointing_id='00000001', pointing_type_code='101', ra=60, dec=-40, pixel_scale=0.074, time_pt=None, im_type='SCI', exptime=150., sat_pos=[0., 0., 0.], sat_vel=[0., 0., 0.], project_cycle=6, run_counter=0, chip_name="01", obstype='WIDE', dataset='csst-msc-c9-25sqdeg-v3'): def generatePrimaryHeader(xlen=9216, ylen=9232, pointing_id='00000001', pointing_type_code='101', ra=60, dec=-40, pixel_scale=0.074, time_pt=None, im_type='SCI', exptime=150., sat_pos=[0., 0., 0.], sat_vel=[0., 0., 0.], pa = 23.5, project_cycle=6, run_counter=0, chip_name="01", obstype='WIDE', dataset='csst-msc-c9-25sqdeg-v3'):
# array_size1, array_size2, flux, sigma = int(argv[1]), int(argv[2]), 1000.0, 5.0 # array_size1, array_size2, flux, sigma = int(argv[1]), int(argv[2]), 1000.0, 5.0
...@@ -475,6 +475,7 @@ def generatePrimaryHeader(xlen=9216, ylen=9232, pointing_id='00000001', pointing ...@@ -475,6 +475,7 @@ def generatePrimaryHeader(xlen=9216, ylen=9232, pointing_id='00000001', pointing
file_start_time + '_' + file_end_time + \ file_start_time + '_' + file_end_time + \
'_' + OBS_id + '_' + chip_name + '_L0_V01' '_' + OBS_id + '_' + chip_name + '_L0_V01'
h_prim['POS_ANG0'] = pa
h_prim['POSI0_X'] = sat_pos[0] h_prim['POSI0_X'] = sat_pos[0]
h_prim['POSI0_Y'] = sat_pos[1] h_prim['POSI0_Y'] = sat_pos[1]
h_prim['POSI0_Z'] = sat_pos[2] h_prim['POSI0_Z'] = sat_pos[2]
......
...@@ -98,6 +98,7 @@ def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cy ...@@ -98,6 +98,7 @@ def generateHeader(chip, pointing, img_type=None, img_type_code=None, project_cy
obstype=img_type, obstype=img_type,
sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z],
sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz],
pa=(pointing.img_pa.deg + 180) % 360 - 180,
project_cycle=project_cycle, project_cycle=project_cycle,
run_counter=run_counter, run_counter=run_counter,
chip_name=str(chip.chipID).rjust(2, '0'), chip_name=str(chip.chipID).rjust(2, '0'),
......
...@@ -15,6 +15,7 @@ def prepare_headers(self, chip, pointing): ...@@ -15,6 +15,7 @@ def prepare_headers(self, chip, pointing):
im_type=pointing.pointing_type, im_type=pointing.pointing_type,
sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z],
sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz],
pa=(pointing.img_pa.deg + 180) % 360 - 180,
project_cycle=self.overall_config["project_cycle"], project_cycle=self.overall_config["project_cycle"],
run_counter=self.overall_config["run_counter"], run_counter=self.overall_config["run_counter"],
chip_name=str(chip.chipID).rjust(2, '0'), chip_name=str(chip.chipID).rjust(2, '0'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment