Loading ObservationSim/Config/Header/ImageHeader.py +8 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec h_prim['PIXSIZE1'] = xlen h_prim['PIXSIZE2'] = ylen h_prim['FILENAME'] = 'MSC_' + im_type + '_' + date + time_obs + '_1' + pointNum.rjust(8,'0') + '_' +CCDID[k-1].rjust(2,'0')+'_raw' h_prim['DATE'] = '20'+date[0:2]+'-' + date[2:4]+'-'+date[4:6] h_prim['TIME'] = time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[4:6] h_prim['DATE-OBS'] = '20'+date[0:2]+'-' + date[2:4]+'-'+date[4:6] Loading @@ -273,7 +273,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec h_prim['EXPTIME'] = exptime # Define file types file_type = {'MS':'sci', 'CLB':'zero', 'CLD':'dark', 'CLF':'flat', 'CRS':'cosmic_ray', 'CRD':'cosmic_ray'} file_type = {'MS':'sci', 'BIAS':'zero', 'DARK':'dark', 'FLAT':'flat', 'CRS':'cosmic_ray', 'CRD':'cosmic_ray'} h_prim['FILETYPE'] = file_type[im_type] co = coord.SkyCoord(ra, dec, unit='deg') Loading @@ -294,6 +294,12 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec tend = Time(tstart.mjd + h_prim['EXPTIME']/86400., format="mjd") h_prim['EXPEND'] = round(tend.mjd, 5) file_start_time = '20' + date[0:6] + time_obs[0:6] end_time_str = str(tend.datetime) file_end_time = end_time_str[0:4] + end_time_str[5:7]+end_time_str[8:10] + end_time_str[11:13] + end_time_str[14:16] + end_time_str[17:19] h_prim['FILENAME'] = 'CSST_MSC_MS_' + im_type + '_' + file_start_time + '_' + file_end_time + '_1' + pointNum.rjust(8, '0') + '_' + CCDID[ k - 1].rjust(2, '0') + '_L0_1' h_prim['POSI0_X'] = sat_pos[0] h_prim['POSI0_Y'] = sat_pos[1] Loading ObservationSim/Instrument/Chip/Chip.py +4 −4 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ class Chip(FocalPlane): cr_map, cr_event_num = effects.produceCR_Map( xLen=self.npix_x, yLen=self.npix_y, exTime=self.exptime+0.5*self.readout_time, cr_pixelRatio=0.003*(self.exptime+0.5*self.readout_time)/150., cr_pixelRatio=0.003*(self.exptime+0.5*self.readout_time)/600., gain=self.gain, attachedSizes=self.attachedSizes, seed=SeedCosmicRay+pointing_ID*30+self.chipID) # seed: obj-imaging:+0; bias:+1; dark:+2; flat:+3; Loading Loading @@ -511,7 +511,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLB', im_type='BIAS', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading Loading @@ -603,7 +603,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLF', im_type='FLAT', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading Loading @@ -717,7 +717,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLD', im_type='DARK', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading ObservationSim/ObservationSim.py +3 −3 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ class Observation(object): bright_obj = 0 dim_obj = 0 for j in range(self.nobj): # if j >= 100: # break if j >= 1: break obj = self.cat.objs[j] if obj.type == 'star' and self.config["run_option"]["galaxy_only"]: continue Loading Loading @@ -273,7 +273,7 @@ class Observation(object): date=date_obs, time_obs=time_obs, exptime=pointing.exp_time, im_type='MS', im_type='SCI', sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz]) h_ext = generateExtensionHeader( Loading Loading
ObservationSim/Config/Header/ImageHeader.py +8 −2 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec h_prim['PIXSIZE1'] = xlen h_prim['PIXSIZE2'] = ylen h_prim['FILENAME'] = 'MSC_' + im_type + '_' + date + time_obs + '_1' + pointNum.rjust(8,'0') + '_' +CCDID[k-1].rjust(2,'0')+'_raw' h_prim['DATE'] = '20'+date[0:2]+'-' + date[2:4]+'-'+date[4:6] h_prim['TIME'] = time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[4:6] h_prim['DATE-OBS'] = '20'+date[0:2]+'-' + date[2:4]+'-'+date[4:6] Loading @@ -273,7 +273,7 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec h_prim['EXPTIME'] = exptime # Define file types file_type = {'MS':'sci', 'CLB':'zero', 'CLD':'dark', 'CLF':'flat', 'CRS':'cosmic_ray', 'CRD':'cosmic_ray'} file_type = {'MS':'sci', 'BIAS':'zero', 'DARK':'dark', 'FLAT':'flat', 'CRS':'cosmic_ray', 'CRD':'cosmic_ray'} h_prim['FILETYPE'] = file_type[im_type] co = coord.SkyCoord(ra, dec, unit='deg') Loading @@ -294,6 +294,12 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec tend = Time(tstart.mjd + h_prim['EXPTIME']/86400., format="mjd") h_prim['EXPEND'] = round(tend.mjd, 5) file_start_time = '20' + date[0:6] + time_obs[0:6] end_time_str = str(tend.datetime) file_end_time = end_time_str[0:4] + end_time_str[5:7]+end_time_str[8:10] + end_time_str[11:13] + end_time_str[14:16] + end_time_str[17:19] h_prim['FILENAME'] = 'CSST_MSC_MS_' + im_type + '_' + file_start_time + '_' + file_end_time + '_1' + pointNum.rjust(8, '0') + '_' + CCDID[ k - 1].rjust(2, '0') + '_L0_1' h_prim['POSI0_X'] = sat_pos[0] h_prim['POSI0_Y'] = sat_pos[1] Loading
ObservationSim/Instrument/Chip/Chip.py +4 −4 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ class Chip(FocalPlane): cr_map, cr_event_num = effects.produceCR_Map( xLen=self.npix_x, yLen=self.npix_y, exTime=self.exptime+0.5*self.readout_time, cr_pixelRatio=0.003*(self.exptime+0.5*self.readout_time)/150., cr_pixelRatio=0.003*(self.exptime+0.5*self.readout_time)/600., gain=self.gain, attachedSizes=self.attachedSizes, seed=SeedCosmicRay+pointing_ID*30+self.chipID) # seed: obj-imaging:+0; bias:+1; dark:+2; flat:+3; Loading Loading @@ -511,7 +511,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLB', im_type='BIAS', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading Loading @@ -603,7 +603,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLF', im_type='FLAT', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading Loading @@ -717,7 +717,7 @@ class Chip(FocalPlane): ra_cen=ra_cen, dec_cen=dec_cen, img_rot=img_rot, im_type='CLD', im_type='DARK', pointing_ID=pointing_ID, date_obs=date_obs, time_obs=time_obs, Loading
ObservationSim/ObservationSim.py +3 −3 Original line number Diff line number Diff line Loading @@ -130,8 +130,8 @@ class Observation(object): bright_obj = 0 dim_obj = 0 for j in range(self.nobj): # if j >= 100: # break if j >= 1: break obj = self.cat.objs[j] if obj.type == 'star' and self.config["run_option"]["galaxy_only"]: continue Loading Loading @@ -273,7 +273,7 @@ class Observation(object): date=date_obs, time_obs=time_obs, exptime=pointing.exp_time, im_type='MS', im_type='SCI', sat_pos=[pointing.sat_x, pointing.sat_y, pointing.sat_z], sat_vel=[pointing.sat_vx, pointing.sat_vy, pointing.sat_vz]) h_ext = generateExtensionHeader( Loading