Commit 95b45372 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent 6242c2a8
......@@ -3554,7 +3554,7 @@ class MCIsimulator():
#### World coordinate system and related parameters #####
hdu_g = fits.ImageHDU(data)
hdu_g.header['WCSAXES']=(np.int16(2) , 'number of World Coordinate System axes')
hdu_g.header['WCSAXES']=(np.int16(2) , 'number of WCS axes')
hdu_g.header['CRPIX1'] =( round(float(self.information['CRPIX1']) ,1) , 'x-coordinate of reference pixel')
hdu_g.header['CRPIX2'] =( round(float(self.information['CRPIX2']) ,1) , 'y-coordinate of reference pixel')
......@@ -3914,7 +3914,7 @@ class MCIsimulator():
##############################################################################
######### Object information #########################################
ofd_g.header['OBJECT'] =(self.information['name_obj'][:30], 'object name')
ofd_g.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
ofd_g.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
ofd_g.header['OBSID'] =(str(obsid) , 'observation ID')
ofd_g.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
......@@ -4060,20 +4060,19 @@ class MCIsimulator():
hdu_g.header['INSTRUME']=('MCI', 'instrument name')
hdu_g.header['CHANNEL'] =('C1', 'channel number')
hdu_g.header['FILTERNO'] =(filternum, 'filter number')
hdu_g.header['DIFFUSER']=( bool(True) , 'insert diffuser for flat calibration')
hdu_g.header['DIFFUSER']=( bool(True) , 'insert diffuser status for flat calibration')
hdu_g.header['FLAMP'] =( np.int16(0) , 'status of flat lamp')
hdu_g.header['MCISTAT'] =( np.int16(0) , 'MCI componetns status parameter')
hdu_g.header['MCISTAT'] =( np.int16(0) , 'MCI components status parameter')
hdu_g.header['DATE_OBS'] =(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
hdu_g.header['OBJECT'] =( 'MCI_obj' , 'object name')
hdu_g.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
hdu_g.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
hdu_g.header['OBSID'] =(str(obsid) , 'observation ID')
hdu_g.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
hdu_g.header['DEC_OBJ']=(float(self.information['dec_obj']) , 'object Dec (deg)')
hdu_g.header['DATE-OBS']=(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
##### detector and Filter information #####
hdu_g.header['FILTER'] =(self.filter_g[:6] , 'filter band')
......@@ -4092,8 +4091,8 @@ class MCIsimulator():
hdu_g.header['DETSIZE'] =(str(self.information['ysize'])+'*'+str( self.information['xsize']), 'detector size')
hdu_g.header['DATASECT'] =(str(self.image_g.shape[0])+'*'+str(self.image_g.shape[1]), 'data section')
hdu_g.header['PIXSCAL1']=('0.05' , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_g.header['PIXSCAL2']=('0.05' , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_g.header['PIXSCAL1']=(float(0.05) , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_g.header['PIXSCAL2']=(float(0.05) , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_g.header['PIXSIZE1']=(int(10) , 'pixel size for axis 1 (micron)')
hdu_g.header['PIXSIZE2']=(int(10) , 'pixel size for axis 2 (micron)')
......@@ -4102,7 +4101,7 @@ class MCIsimulator():
hdu_g.header['PSCAN1'] =(np.int32(27) , 'horizontal prescan width, per readout channel')
hdu_g.header['PSCAN2'] =(np.int32(0) , 'vertical prescan height, per readout channel')
hdu_g.header['PSCAN2'] =(np.int32(0) , 'vertical prescan width, per readout channel')
hdu_g.header['OSCAN1'] =(np.int32(320) , 'horizontal overscan width, per readout channel')
hdu_g.header['OSCAN2'] =(np.int32(320) , 'vertical overscan width, per readout channel')
......@@ -4112,7 +4111,7 @@ class MCIsimulator():
#### World coordinate system information #####
hdu_g.header['WCSAXES']=(np.int16(2) , 'number of World Coordinate System axes')
hdu_g.header['WCSAXES']=(np.int16(2) , 'number of WCS axes')
hdu_g.header['CRPIX1'] =( round(float(self.information['CRPIX1']) ,1) , 'x-coordinate of reference pixel')
hdu_g.header['CRPIX2'] =( round(float(self.information['CRPIX2']) ,1) , 'y-coordinate of reference pixel')
......@@ -4187,7 +4186,7 @@ class MCIsimulator():
#### exposure and shutter information #####
hdu_g.header['EXPSTART']=(np.float64(time2mjd(self.dt)), 'exposure start time (MJD)')
hdu_g.header['EXPEND'] =(float(time2mjd(t2)), 'exposure end time (MJD)')
hdu_g.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure times (s)')
hdu_g.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure time (s)')
hdu_g.header['DARKTIME'] =(np.float32(self.information['exptime']), 'dark current time (s)')
hdu_g.header['SHTSTAT']=( bool(True) , 'shutter status')
......@@ -4332,7 +4331,7 @@ class MCIsimulator():
ofd_r.header['FITSSWV']=('mci_sim_0.8.03', 'FITS creating software version')
######### Object information #########################################
ofd_r.header['OBJECT'] =(self.information['name_obj'][:30], 'object name')
ofd_r.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
ofd_r.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
ofd_r.header['OBSID'] =(str(obsid) , 'observation ID')
ofd_r.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
......@@ -4442,20 +4441,19 @@ class MCIsimulator():
hdu_r.header['INSTRUME']=('MCI', 'instrument name')
hdu_r.header['CHANNEL'] =('C1', 'channel number')
hdu_r.header['FILTERNO'] =(filternum, 'filter number')
hdu_r.header['DIFFUSER']=( bool(True) , 'insert diffuser for flat calibration')
hdu_r.header['DIFFUSER']=( bool(True) , 'insert diffuser status for flat calibration')
hdu_r.header['FLAMP'] =( np.int16(0) , 'status of flat lamp')
hdu_r.header['MCISTAT'] =( np.int16(0) , 'MCI componetns status parameter')
hdu_r.header['MCISTAT'] =( np.int16(0) , 'MCI components status parameter')
hdu_r.header['DATE_OBS'] =(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
hdu_r.header['OBJECT'] =( 'MCI_obj' , 'object name')
hdu_r.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
hdu_r.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
hdu_r.header['OBSID'] =(str(obsid) , 'observation ID')
hdu_r.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
hdu_r.header['DEC_OBJ']=(float(self.information['dec_obj']) , 'object Dec (deg)')
hdu_r.header['DATE-OBS']=(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
##### detector and Filter information #####
hdu_r.header['FILTER'] =(self.filter_r[:6] , 'filter band')
......@@ -4474,8 +4472,8 @@ class MCIsimulator():
hdu_r.header['DETSIZE'] =(str(self.information['ysize'])+'*'+str( self.information['xsize']), 'detector size')
hdu_r.header['DATASECT'] =(str(self.image_g.shape[0])+'*'+str(self.image_g.shape[1]), 'data section')
hdu_r.header['PIXSCAL1']=('0.05' , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_r.header['PIXSCAL2']=('0.05' , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_r.header['PIXSCAL1']=(float(0.05) , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_r.header['PIXSCAL2']=(float(0.05) , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_r.header['PIXSIZE1']=(int(10) , 'pixel size for axis 1 (micron)')
hdu_r.header['PIXSIZE2']=(int(10) , 'pixel size for axis 2 (micron)')
......@@ -4484,7 +4482,7 @@ class MCIsimulator():
hdu_r.header['PSCAN1'] =(np.int32(27) , 'horizontal prescan width, per readout channel')
hdu_r.header['PSCAN2'] =(np.int32(0) , 'vertical prescan height, per readout channel')
hdu_r.header['PSCAN2'] =(np.int32(0) , 'vertical prescan width, per readout channel')
hdu_r.header['OSCAN1'] =(np.int32(320) , 'horizontal overscan width, per readout channel')
hdu_r.header['OSCAN2'] =(np.int32(320) , 'vertical overscan width, per readout channel')
......@@ -4494,7 +4492,7 @@ class MCIsimulator():
#### World coordinate system information #####
hdu_r.header['WCSAXES']=(np.int16(2) , 'number of World Coordinate System axes')
hdu_r.header['WCSAXES']=(np.int16(2) , 'number of WCS axes')
hdu_r.header['CRPIX1'] =( round(float(self.information['CRPIX1']) ,1) , 'x-coordinate of reference pixel')
hdu_r.header['CRPIX2'] =( round(float(self.information['CRPIX2']) ,1) , 'y-coordinate of reference pixel')
......@@ -4569,7 +4567,7 @@ class MCIsimulator():
#### exposure and shutter information #####
hdu_r.header['EXPSTART']=(np.float64(time2mjd(self.dt)), 'exposure start time (MJD)')
hdu_r.header['EXPEND'] =(float(time2mjd(t2)), 'exposure end time (MJD)')
hdu_r.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure times (s)')
hdu_r.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure time (s)')
hdu_r.header['DARKTIME'] =(np.float32(self.information['exptime']), 'dark current time (s)')
hdu_r.header['SHTSTAT']=( bool(True) , 'shutter status')
......@@ -4713,7 +4711,7 @@ class MCIsimulator():
##############################################################################
######### Object information #########################################
ofd_i.header['OBJECT'] =(self.information['name_obj'][:30], 'object name')
ofd_i.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
ofd_i.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
ofd_i.header['OBSID'] =(str(obsid) , 'observation ID')
ofd_i.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
......@@ -4828,19 +4826,19 @@ class MCIsimulator():
hdu_i.header['INSTRUME']=('MCI', 'instrument name')
hdu_i.header['CHANNEL'] =('C1', 'channel number')
hdu_i.header['FILTERNO'] =(filternum, 'filter number')
hdu_i.header['DIFFUSER']=( bool(True) , 'insert diffuser for flat calibration')
hdu_i.header['DIFFUSER']=( bool(True) , 'insert diffuser status for flat calibration')
hdu_i.header['FLAMP'] =( np.int16(0) , 'status of flat lamp')
hdu_i.header['MCISTAT'] =( np.int16(0) , 'MCI componetns status parameter')
hdu_i.header['MCISTAT'] =( np.int16(0) , 'MCI components status parameter')
hdu_i.header['DATE_OBS'] =(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
hdu_i.header['OBJECT'] =( 'MCI_obj' , 'object name')
hdu_i.header['TARGET'] =(self.information['target'][:13], 'target name (hhmmss.s+ddmmss)')
hdu_i.header['TARGET'] =(self.information['target'][:15], 'target name (hhmmss.s+ddmmss)')
#######################################################################
hdu_i.header['OBSID'] =(str(obsid) , 'observation ID')
hdu_i.header['RA_OBJ'] =(float(self.information['ra_obj']) , 'object RA (deg)')
hdu_i.header['DEC_OBJ']=(float(self.information['dec_obj']) , 'object Dec (deg)')
hdu_i.header['DATE-OBS']=(data_time[:21] , 'observation date (yyyy-mm-ddThh:mm:ss.s)')
##### detector and Filter information #####
......@@ -4860,8 +4858,8 @@ class MCIsimulator():
hdu_i.header['DETSIZE'] =(str(self.information['ysize'])+'*'+str( self.information['xsize']), 'detector size')
hdu_i.header['DATASECT'] =(str(self.image_g.shape[0])+'*'+str(self.image_g.shape[1]), 'data section')
hdu_i.header['PIXSCAL1']=('0.05' , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_i.header['PIXSCAL2']=('0.05' , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_i.header['PIXSCAL1']=(float(0.05) , 'pixel scale for axis 1 (arcsec/pixel)')
hdu_i.header['PIXSCAL2']=(float(0.05) , 'pixel scale for axis 2 (arcsec/pixel)')
hdu_i.header['PIXSIZE1']=(int(10) , 'pixel size for axis 1 (micron)')
hdu_i.header['PIXSIZE2']=(int(10) , 'pixel size for axis 2 (micron)')
......@@ -4870,7 +4868,7 @@ class MCIsimulator():
hdu_i.header['PSCAN1'] =(np.int32(27) , 'horizontal prescan width, per readout channel')
hdu_i.header['PSCAN2'] =(np.int32(0) , 'vertical prescan height, per readout channel')
hdu_i.header['PSCAN2'] =(np.int32(0) , 'vertical prescan width, per readout channel')
hdu_i.header['OSCAN1'] =(np.int32(320) , 'horizontal overscan width, per readout channel')
hdu_i.header['OSCAN2'] =(np.int32(320) , 'vertical overscan width, per readout channel')
......@@ -4880,7 +4878,7 @@ class MCIsimulator():
#### World coordinate system information #####
hdu_i.header['WCSAXES']=(np.int16(2) , 'number of World Coordinate System axes')
hdu_i.header['WCSAXES']=(np.int16(2) , 'number of WCS axes')
hdu_i.header['CRPIX1'] =( round(float(self.information['CRPIX1']) ,1) , 'x-coordinate of reference pixel')
hdu_i.header['CRPIX2'] =( round(float(self.information['CRPIX2']) ,1) , 'y-coordinate of reference pixel')
......@@ -4955,7 +4953,7 @@ class MCIsimulator():
#### exposure and shutter information #####
hdu_i.header['EXPSTART']=(np.float64(time2mjd(self.dt)), 'exposure start time (MJD)')
hdu_i.header['EXPEND'] =(float(time2mjd(t2)), 'exposure end time (MJD)')
hdu_i.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure times (s)')
hdu_i.header['EXPTIME'] =(np.float32(self.information['exptime']), 'exposure time (s)')
hdu_i.header['DARKTIME'] =(np.float32(self.information['exptime']), 'dark current time (s)')
hdu_i.header['SHTSTAT']=( bool(True) , 'shutter status')
......
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