diff --git a/ObservationSim/Config/Header/ImageHeader.py b/ObservationSim/Config/Header/ImageHeader.py index 4a78f2880a08e8df50131037baef707eafdd34f3..14d8ea84525bb3c5a4f86ae64cb856fec28b3928 100644 --- a/ObservationSim/Config/Header/ImageHeader.py +++ b/ObservationSim/Config/Header/ImageHeader.py @@ -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] @@ -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') @@ -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] diff --git a/ObservationSim/Instrument/Chip/Chip.py b/ObservationSim/Instrument/Chip/Chip.py index 5c6aea744acecfbb523135098cd28c05fdb0e9ab..4dcc7a006066967a63932e8e4a64d96b74b425e9 100755 --- a/ObservationSim/Instrument/Chip/Chip.py +++ b/ObservationSim/Instrument/Chip/Chip.py @@ -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; @@ -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, @@ -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, @@ -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, diff --git a/ObservationSim/ObservationSim.py b/ObservationSim/ObservationSim.py index 60cec67c30869a1b247a02c8f08cdcccb050c675..0ed651d2dc8d48b7234026fb7bdc5fe209d46423 100755 --- a/ObservationSim/ObservationSim.py +++ b/ObservationSim/ObservationSim.py @@ -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 @@ -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(