Commit 8c97ea31 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

Merge branch 'C6_codes' of https://csst-tb.bao.ac.cn/code/csst_sim/csst-simulation into HEAD

parents 832c0004 5f61cfd0
......@@ -325,42 +325,52 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec
h_prim = fits.Header()
h_prim = fits.Header.fromfile(g_header_fn)
h_prim['PIXSIZE1'] = xlen
h_prim['PIXSIZE2'] = ylen
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]
h_prim['TIME-OBS'] = time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[4:6]
h_prim['DETECTOR'] = 'CHIP'+CCDID[k-1].rjust(2,'0')
h_prim['RA_OBJ'] = ra
h_prim['DEC_OBJ'] = dec
# h_prim['PIXSIZE1'] = xlen
# h_prim['PIXSIZE2'] = ylen
h_prim['DATE'] = '20'+date[0:2]+'-' + date[2:4]+'-'+date[4:6] + 'T' + time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[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] + 'T' + time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[4:6]
# h_prim['TIME-OBS'] = time_obs[0:2]+':'+time_obs[2:4]+':'+time_obs[4:6]
# h_prim['DETECTOR'] = 'CHIP'+CCDID[k-1].rjust(2,'0')
h_prim['OBJ_RA'] = ra
h_prim['OBJ_DEC'] = dec
h_prim['OBJECT'] = '1'+ str(int(project_cycle)) + pointNum.rjust(7,'0')
h_prim['OBSID'] = '1'+ str(int(project_cycle)) + pointNum.rjust(7,'0')
h_prim['TELFOCUS'] = 'f/14'
# h_prim['TELFOCUS'] = 'f/14'
h_prim['EXPTIME'] = exptime
# Define file types
file_type = {'SCI':'sci', 'BIAS':'bias', 'DARK':'dark', 'FLAT':'flat', 'CRS':'cosmic_ray', 'CRD':'cosmic_ray'}
h_prim['OBSTYPE'] = file_type[im_type]
co = coord.SkyCoord(ra, dec, unit='deg')
# co = coord.SkyCoord(ra, dec, unit='deg')
#
# ra_hms = format(co.ra.hms.h, '02.0f') + ':' + format(co.ra.hms.m, '02.0f') + ':' + format(co.ra.hms.s, '05.2f')
# dec_hms = format(co.dec.dms.d, '02.0f') + ':' + format(abs(co.dec.dms.m), '02.0f') + ':' + format(abs(co.dec.dms.s),
# '05.2f')
#
# h_prim['RA_NOM'] = ra_hms
# h_prim['DEC_NOM'] = dec_hms
h_prim['RA_PNT0'] = ra
h_prim['DEC_PNT0'] = dec
h_prim['RA_PNT1'] = ra
h_prim['DEC_PNT1'] = dec
ra_hms = format(co.ra.hms.h, '02.0f') + ':' + format(co.ra.hms.m, '02.0f') + ':' + format(co.ra.hms.s, '05.2f')
dec_hms = format(co.dec.dms.d, '02.0f') + ':' + format(abs(co.dec.dms.m), '02.0f') + ':' + format(abs(co.dec.dms.s),
'05.2f')
h_prim['RA_NOM'] = ra_hms
h_prim['DEC_NOM'] = dec_hms
h_prim['PIXSCAL1'] = psize
h_prim['PIXSCAL2'] = psize
ttt = h_prim['DATE'] + 'T' + h_prim['TIME']
# h_prim['PIXSCAL1'] = psize
# h_prim['PIXSCAL2'] = psize
ttt = h_prim['DATE']
tstart = Time(ttt)
h_prim['EXPSTART'] = round(tstart.mjd, 5)
h_prim['CABSTART'] = h_prim['EXPSTART']
# tend = Time(tstart.cxcsec + h_prim['EXPTIME'], format="cxcsec")
tend = Time(tstart.mjd + h_prim['EXPTIME']/86400., format="mjd")
h_prim['EXPEND'] = round(tend.mjd, 5)
h_prim['CABEND'] = h_prim['EXPEND']
file_start_time = '20' + date[0:6] + time_obs[0:6]
end_time_str = str(tend.datetime)
......@@ -376,13 +386,13 @@ def generatePrimaryHeader(xlen = 9216, ylen = 9232, pointNum = '1', ra = 60, dec
h_prim['VELO0_X'] = sat_vel[0]
h_prim['VELO0_Y'] = sat_vel[1]
h_prim['VELO0_Z'] = sat_vel[2]
h_prim['RA_PNT0'] = ra_hms
h_prim['DEC_PNT0'] = dec_hms
# h_prim['RA_PNT0'] = ra_hms
# h_prim['DEC_PNT0'] = dec_hms
# Get version of CSSTSim Package
from pkg_resources import get_distribution
h_prim['SIM_VER'] = (get_distribution("CSSTSim").version, "Version of CSST MSC simulation software")
# h_prim['SIM_VER'] = (get_distribution("CSSTSim").version, "Version of CSST MSC simulation software")
h_prim['FITSCREA'] = get_distribution("CSSTSim").version
return h_prim
......@@ -405,15 +415,49 @@ def generateExtensionHeader(xlen = 9216, ylen = 9232,ra = 60, dec = -40, pa = -2
h_ext = fits.Header.fromfile(e_header_fn)
h_ext['CCDCHIP'] = CCDID[k - 1].rjust(2, '0')
h_ext['CCDLABEL'] = filters[k-1] + '-' + filterID[k-1]
h_ext['FILTER'] = filters[k-1]
h_ext['NAXIS1'] = xlen
h_ext['NAXIS2'] = ylen
h_ext['EXTNAME'] = extName
h_ext['GAIN1'] = gain
h_ext['RDNOISE1'] = readout
h_ext['CCDCHIP'] = 'ccd' + CCDID[k-1].rjust(2,'0')
h_ext['POS_ANG'] = pa
h_ext['GAIN2'] = gain
h_ext['GAIN3'] = gain
h_ext['GAIN4'] = gain
h_ext['GAIN5'] = gain
h_ext['GAIN6'] = gain
h_ext['GAIN7'] = gain
h_ext['GAIN8'] = gain
h_ext['GAIN9'] = gain
h_ext['GAIN10'] = gain
h_ext['GAIN11'] = gain
h_ext['GAIN12'] = gain
h_ext['GAIN13'] = gain
h_ext['GAIN14'] = gain
h_ext['GAIN15'] = gain
h_ext['GAIN16'] = gain
h_ext['RDNOIS1'] = readout
h_ext['RDNOIS2'] = readout
h_ext['RDNOIS3'] = readout
h_ext['RDNOIS4'] = readout
h_ext['RDNOIS5'] = readout
h_ext['RDNOIS6'] = readout
h_ext['RDNOIS7'] = readout
h_ext['RDNOIS8'] = readout
h_ext['RDNOIS9'] = readout
h_ext['RDNOIS10'] = readout
h_ext['RDNOIS11'] = readout
h_ext['RDNOIS12'] = readout
h_ext['RDNOIS13'] = readout
h_ext['RDNOIS14'] = readout
h_ext['RDNOIS15'] = readout
h_ext['RDNOIS16'] = readout
h_ext['PIXSCAL1'] = psize
h_ext['PIXSCAL2'] = psize
# h_ext['POS_ANG'] = pa
header_wcs = WCS_def(xlen=xlen, ylen=ylen, gapy=898.0, gapx1=534, gapx2=1309, ra=ra, dec=dec, pa=pa, psize=psize,
row_num=row_num, col_num=col_num, filter = h_ext['FILTER'])
......
XTENSION= 'IMAGE ' / Image extension BITPIX = 16 / array data type NAXIS = 2 / number of array dimensions NAXIS1 = 9216 / length of first array axis NAXIS2 = 9232 / length of second array axis PCOUNT = 0 GCOUNT = 1 EXTNAME = 'SCI ' EXTVER = 1 BSCALE = 1 BZERO = 32768 BUNIT = 'ADU ' COMMENT ================================================================== COMMENT CCD chip information COMMENT ================================================================== NCHAN = 16 / Number of readout channels NCHAN1 = 8 / Number of horizintal channels NCHAN2 = 2 / Number of vertical channels DETSIZE = '[1:9216:9232]' / detector size BIASSEC = '[9216:9217,9232:9234]' / bias section CCDCHIP = 6 / CCD chip ID CCDLABEL= 'y-1 ' / CCD chip label PSCAN1 = 27 / horizontal prescan width PSCAN2 = 8 / vertical prescan height OSCAN1 = 16 / horizontal overscan width OSCAN2 = 8 / vertical overscan height FILTER = 'y ' / filter name COMMENT ================================================================== COMMENT WORLD COORDINATE SYSTEM AND RELATED PARAMETERS COMMENT ================================================================== WCSDIM = 2 / Number of World Coordinate System axes CRPIX1 = -10017.0 / Coordinate reference pixel of x CRPIX2 = 24876.0 / Coordinate reference pixel of y CRVAL1 = 62.228226 / Coordinate reference value of x CRVAL2 = -42.316932 / Coordinate reference value of y CTYPE1 = 'RA---TAN' / the coordinate type CTYPE2 = 'DEC--TAN' / the coordinate type CD1_1 = 1.88602083707394E-05 / partial of first axis coordinate of x CD2_1 = -8.1745583617600E-06 / partial of first axis coordinate of y CD1_2 = 8.17455836176000E-06 / partial of second axis coordinate of x CD2_2 = 1.88602083707394E-05 / partial of second axis coordinate of y POS_ANG = 30.0 / Positon angle of detector array COMMENT ================================================================== COMMENT Readout information COMMENT ================================================================== GAIN1 = 1.1 / CCD gain RDNOISE1= 5.0 / read noise READTIME= 40.0 / read time (sec) RDSPEED = 10.0 / read speed (in MHz) CHIPTEMP= 173.0 / chip temperature (in K) COMMENT ================================================================== COMMENT Other information COMMENT ================================================================== CHECKSUM= '''abcde''' / SHA256 checksum of global headers END
XTENSION= 'IMAGE ' / extension type BITPIX = 16 / bits per data value NAXIS = 2 / number of data axes NAXIS1 = 9216 / length of first array axis NAXIS2 = 9232 / length of second array axis PCOUNT = 0 GCOUNT = 1 EXTNAME = 'SCI ' EXTVER = 1 BSCALE = 1 BZERO = 32768 BUNIT = 'ADU ' / physical unit of array values COMMENT ================================================================== COMMENT Detector information COMMENT ================================================================== DETECOR = 'CCD' / detector name DETTEMP1= 173 / detector temperature at EXPSTART DETTEMP2= 173 / detector temperature at EXPEND DETTEMP3= 173 / detector temperature when readout is finished DETSIZE = '9560x9264' / detector size DATASEC = '9216x9232' / data size PIXSCAL1= 0.074 / pixel scale for axis 1 PIXSCAL2= 0.074 / pixel scale for axis 2 PIXSIZE1= 10 / pixel size for axis 1 PIXSIZE2= 10 / pixel size for axis 1 COMMENT ================================================================== COMMENT CCD chip information COMMENT ================================================================== CCDCHIP = 8 / CCD chip ID CCDLABEL= 'y-1' / CCD chip label FILTER = 'y' / filter name NCHAN = 16 / Number of readout channels NCHAN1 = 8 / Number of horizintal channels NCHAN2 = 2 / Number of vertical channels PSCAN1 = 27 / horizontal prescan width, per readout channel PSCAN2 = 8 / horizontal prescan width, per readout channel OSCAN1 = 16 / horizontal overscan width,per readout channel OSCAN2 = 16 / horizontal overscan width,per readout channel COMMENT ================================================================== COMMENT WORLD COORDINATE SYSTEM AND RELATED PARAMETERS COMMENT ================================================================== WCSAXES = 2 / Number of World Coordinate System axes CRPIX1 = -10017.0 / x-coordinate of reference pixel CRPIX2 = 24876.0 / y-coordinate of reference pixel CRVAL1 = 62.228226 / first axis value at reference pixel CRVAL2 = -42.316932 / second axis value at reference pixel CTYPE1 = 'RA---TAN' / the coordinate type for the first axis CTYPE2 = 'DEC--TAN' / the coordinate type for the second axis CD1_1 = 1.88602083707394E-05 / partial of first axis coordinate w.r.t. x CD2_1 = -8.1745583617600E-06 / partial of first axis coordinate w.r.t. x CD1_2 = 8.17455836176000E-06 / partial of second axis coordinate w.r.t. x CD2_2 = 1.88602083707394E-05 / partial of second axis coordinate w.r.t. x OTHERS = '' / COMMENT ================================================================== COMMENT Readout information COMMENT ================================================================== GAIN1 = 1.1 / CCD gain (channel 1) GAIN2 = 1.1 / CCD gain (channel 2) GAIN3 = 1.1 / CCD gain (channel 3) GAIN4 = 1.1 / CCD gain (channel 4) GAIN5 = 1.1 / CCD gain (channel 5) GAIN6 = 1.1 / CCD gain (channel 6) GAIN7 = 1.1 / CCD gain (channel 7) GAIN8 = 1.1 / CCD gain (channel 8) GAIN9 = 1.1 / CCD gain (channel 9) GAIN10 = 1.1 / CCD gain (channel 10) GAIN11 = 1.1 / CCD gain (channel 11) GAIN12 = 1.1 / CCD gain (channel 12) GAIN13 = 1.1 / CCD gain (channel 13) GAIN14 = 1.1 / CCD gain (channel 14) GAIN15 = 1.1 / CCD gain (channel 15) GAIN16 = 1.1 / CCD gain (channel 16) RDNOIS1 = 5.0 / read noise (channel 1) RDNOIS2 = 5.0 / read noise (channel 2) RDNOIS3 = 5.0 / read noise (channel 3) RDNOIS4 = 5.0 / read noise (channel 4) RDNOIS5 = 5.0 / read noise (channel 5) RDNOIS6 = 5.0 / read noise (channel 6) RDNOIS7 = 5.0 / read noise (channel 7) RDNOIS8 = 5.0 / read noise (channel 8) RDNOIS9 = 5.0 / read noise (channel 9) RDNOIS10= 5.0 / read noise (channel 10) RDNOIS11= 5.0 / read noise (channel 11) RDNOIS12= 5.0 / read noise (channel 12) RDNOIS13= 5.0 / read noise (channel 13) RDNOIS14= 5.0 / read noise (channel 14) RDNOIS15= 5.0 / read noise (channel 15) RDNOIS16= 5.0 / read noise (channel 16) RDSPEED = 10.0 / read speed (in MHz) COMMENT ================================================================== COMMENT Shutter information COMMENT ================================================================== SHUTSTAT= T / shutter status SHTOPEN0= 0.0 / shutter open time (begin) SHTOPEN1= 0.0 / shutter open time (end) SHTCLOS0= 0.0 / shutter close time (begin) SHTCLOS1= 0.0 / shutter close time (end) COMMENT ================================================================== COMMENT LED information COMMENT ================================================================== LEDSTAT1= '0000000000000000000000000000' / main LED status LEDEXP1 = 0.0 / main LED flash time (s) LEDSTAT2= '0000000000000000000000000000' / backup LED status LEDEXP2 = 0.0 / backup LED flash time (s) LEDTEMPA= 173.0 / LED temperature (main LED in K) LEDTEMPB= 173.0 / LED temperature (backup LED in K) COMMENT ================================================================== COMMENT Other information COMMENT ================================================================== CHECKSUM= '''abcde''' / SHA256 checksum of global headers END
SIMPLE = T / conforms to FITS standard BITPIX = 8 / array data type NAXIS = 0 / number of array dimensions EXTEND = T NEXTEND = 1 GROUPS = F DATE = '2021-03-04' / Date this file was written TIME = '09:30:00' / Time this file was written FILENAME= 'MSC_MS_210304093000_100000000_06_raw' / Name of file OBSTYPE = 'sci ' / type of data found in data data file TELESCOP= 'CSST ' / telescope used to acquire data INSTRUME= 'MSC ' / identifier for instrument used to acquire data RADECSYS= 'ICRS ' / frame of reference of coordinates EQUINOX = 2000.0 / Default equinox COMMENT ================================================================== COMMENT Object information COMMENT ================================================================== OBJECT = '00000000' / name of the object observed TARGET = '+000000000000' / Name of the target (RA & Dec of the object) OBSID = '00000000' / ID of this observation RA_OBJ = 62.228226 / R.A. of the object (degrees) DEC_OBJ = -42.316932 / declination of the object (degrees) COMMENT ================================================================== COMMENT Exposure information COMMENT ================================================================== SUNANGLE= 30.0 / angle between sun and direction perpendicular MOONANGL= 30.0 / angle between moon and direction perpendicular SUN_ALT = 30.0 / Sun altitude REFFRAME= 'CSSTGSC-1.0' / guide star catalog version DATE-OBS= '2021-03-04' / UTC date of start of observation (yyyy-mm-dd) TIME-OBS= '09:30:00' / UTC time of start of observation (hh:mm:ss) EXPSTART= 58849.0 / exposure start time (MJD) EXPEND = 58849.0 / exposure end time (MJD) EXPTIME = 150.0 / exposure duration EPOCH = 2000.0 / coordinate epoch COMMENT ================================================================== COMMENT Detector information COMMENT ================================================================== DETECTOR= 'CCD06 ' / deterctor name PIXSCAL1= 0.074 / Pixel scale for axis 1 PIXSCAL2= 0.074 / Pixel scale for axis 2 PIXSIZE1= 9216.0 / Pixel size for axis 1 PIXSIZE2= 9232.0 / Pixel size for aixs 2 CHIPTEMP= 173.0 / CCD chip / dewar temperature (in K) COMMENT ================================================================== COMMENT Telescope information COMMENT ================================================================== TELSTAT = T / Tracking status TELTEMP1= -100.0 / Telescope temperature (in K) POSI0_X = 0.0 / The orbital position in X (shuttr open) POSI0_Y = 0.0 / The orbital position in Y (shuttr open) POSI0_Z = 0.0 / The orbital position in Z (shuttr open) VELO0_X = 0.0 / The orbital velocity in X (shuttr open) VELO0_Y = 0.0 / The orbital velocity in Y (shuttr open) VELO0_Z = 0.0 / The orbital velocity in Z (shuttr open) RA_PNT0 = '00:00:00.00' / R.A. at shutter open time DEC_PNT0= '00:00:00.00' / declination at shutter open time POSI1_X = 0.0 / The orbital position in X (shuttr close) POSI1_Y = 0.0 / The orbital position in Y (shuttr close) POSI1_Z = 0.0 / The orbital position in Z (shuttr close) VELO1_X = 0.0 / The orbital velocity in X (shuttr close) VELO1_Y = 0.0 / The orbital velocity in Y (shuttr close) VELO1_Z = 0.0 / The orbital velocity in Z (shuttr close) RA_PNT1 = 0.0 / R.A. at shutter close time DEC_PNT1= 0.0 / declination at shutter close time RA_NOM = '00:00:00.00' / nominal proposed R.A. of the pointing DEC_NOM = '00:00:00.00' / nominal proposed DEC of the pointing TELFOCUS= 'abcdefg ' / telescope focus AOSTAT = T / Active opticas status HOODSTAT= T / Lens hood status COMMENT ================================================================== COMMENT Shutter information COMMENT ================================================================== SHUTHWV = 'shutter-h-1.0' / shutter hardware version SHUTSWV = 'shutter-s-1.0' / shutter software version SHUTSTAT= T / shutter status SHTOPEN0= 0.0 / shutter open time (begin) SHTOPEN1= 0.0 / shutter open time (end) SHTCLOS0= 0.0 / shutter close time (begin) SHTCLOS1= 0.0 / shutter close time (end) COMMENT ================================================================== COMMENT Guide information COMMENT ================================================================== STARNO1 = 1.0 / guide star number STARPOX1= 0.0 / guide star average position STARPOY1= 0.0 / guide star average position SECMOM1 = 0.0 / guide star second momentum GAFLAG1 = T / guide flag indicate whether adjust position STARNO2 = 1.0 / guide star number STARPOX2= 0.0 / guide star average position STARPOY2= 0.0 / guide star average position SECMOM2 = 0.0 / guide star second momentum GAFLAG2 = T / guide flag indicate whether adjust position STARNO3 = 1.0 / guide star number STARPOX3= 0.0 / guide star average position STARPOY3= 0.0 / guide star average position SECMOM3 = 0.0 / guide star second momentum GAFLAG3 = T / guide flag indicate whether adjust position STARNO4 = 1.0 / guide star number STARPOX4= 0.0 / guide star average position STARPOY4= 0.0 / guide star average position SECMOM4 = 0.0 / guide star second momentum GAFLAG4 = T / guide flag indicate whether adjust position COMMENT ================================================================== COMMENT LED information COMMENT ================================================================== LEDSTAT1= '0000000000000000000000000000' / LED status LEDEXP1 = 0.0 / LED flash time (second) LEDSTAT2= '0000000000000000000000000000' / LED status LEDEXP2 = 0.0 / LED flash time (second) LEDTEMPA= -100.0 / LED temperature (main LED in K) LEDTEMPB= -100.0 / LED temperature (backup LED in K) COMMENT ================================================================== COMMENT Other information COMMENT ================================================================== CHECKSUM= 'abcdefg ' / SHA256 checksum of global headers END
SIMPLE = T / conforms to FITS standard BITPIX = 8 / array data type NAXIS = 0 / number of array dimensions EXTEND = T NEXTEND = 1 GROUPS = F DATE = '2021-03-04T09:30:00'/ Date this file was written FILENAME= 'MSC_MS_210304093000_100000000_06_raw' / file name OBSTYPE = 'sci ' / observation type TELESCOP= 'CSST ' / telescope used to acquire data INSTRUME= 'MSC ' / instrument used to acquire data RADECSYS= 'ICRS ' / frame of reference of coordinates EQUINOX = 2000.0 / FITSCREA= 'C6' / FITS create software version COMMENT ================================================================== COMMENT Object information COMMENT ================================================================== OBJECT = '00000000' / object name TARGET = '+000000000000' / target name (hhmmss+ddmmss) OBSID = '00000000' / observation ID OBJ_RA = 62.228226 / R.A. of the object (degrees) OBJ_DEC = -42.316932 / declination of the object (degrees) COMMENT ================================================================== COMMENT Telescope information COMMENT ================================================================== REFFRAME= 'CSSTGSC-1.0' / guide star catalog version DATE-OBS= '2021-03-04T09:30:00'/ date of the observation (yyyy-mm-dd hh:mm:ss) SATESWV = '0001' / software version in the satellite EXPSTART= 59130.5 / exposure start time (MJD) CABSTART= 59130.5 / (MJD) SUNANGL0= 50.0 / angle between sun and optical axis at CABSTART MOONANG0= 30.0 / angle moon and opt axis at CABSTART at CABST TEL_ALT0= 20.0 / angle opt axis and the ground-piston at CABST POS_ANG0= 20.0 / angle bwt y axis and the North Pole at CABST POSI0_X = 0.0 / the orbital position in X at CABSTART POSI0_Y = 0.0 / the orbital position in Y at CABSTART POSI0_Z = 0.0 / the orbital position in Z at CABSTART VELO0_X = 0.0 / The orbital velocity in X at CABSTART VELO0_Y = 0.0 / The orbital velocity in Y at CABSTART VELO0_Z = 0.0 / The orbital velocity in Z at CABSTART EULER0_1= 0.0 / Euler angle 1 at CABSTART EULER0_1= 0.0 / Euler angle 2 at CABSTART EULER0_1= 0.0 / Euler angle 3 at CABSTART RA_PNT0 = 0.0 / RA of the pointing (degrees) at CABSTART DEC_PNT0= 0.0 / DEC of the pointing (degrees) at CABSTART EXPEND = 0.0 / exposure end time (MJD) CABEND = 0.0 / (MJD) SUNANGL1= 50.0 / angle between sun and optical axis at CABEND MOONANG1= 30.0 / angle btw moon and optical axis at CABEND TEL_ALT1= 20.0 / angle opt axis and the ground-piston at CAEND POS_ANG1= 20.0 / angle bwt y axis and the North Pole at CABEND POSI1_X = 0.0 / the orbital position in X at CABEND POSI1_Y = 0.0 / the orbital position in Y at CABEND POSI1_Z = 0.0 / the orbital position in Z at CABEND VELO1_X = 0.0 / The orbital velocity in X at CABEND VELO1_Y = 0.0 / The orbital velocity in Y at CABEND VELO1_Z = 0.0 / The orbital velocity in Z at CABEND EULER1_1= 0.0 / Euler angle 1 at CABEND EULER1_2= 0.0 / Euler angle 2 at CABEND EULER1_3= 0.0 / Euler angle 3 at CABEND RA_PNT1 = 0.0 / RA of the pointing (degrees) at CABEND DEC_PNT1= 0.0 / DEC of the pointing (degrees) at CABEND EXPTIME = 150.0 / exposure duration EPOCH = 2000 / coordinate epoch COMMENT Other information COMMENT ================================================================== CHECKSUM= 'abcdefg ' / SHA256 checksum of global headers END
......@@ -314,7 +314,7 @@ class Galaxy(MockObject):
origin_star = [y_nominal - (starImg.center.y - starImg.ymin),
x_nominal - (starImg.center.x - starImg.xmin)]
starImg.setOrigin(0, 0)
gal_origin = [origin_star[0], origin_star[1]]
gal_end = [origin_star[0] + starImg.array.shape[0] - 1, origin_star[1] + starImg.array.shape[1] - 1]
......@@ -324,6 +324,7 @@ class Galaxy(MockObject):
subImg_p1 = starImg.array[:, 0:subSlitPos]
star_p1 = galsim.Image(subImg_p1)
star_p1.setOrigin(0, 0)
origin_p1 = origin_star
xcenter_p1 = min(x_nominal,grating_split_pos_chip-1) - 0
ycenter_p1 = y_nominal-0
......@@ -340,6 +341,7 @@ class Galaxy(MockObject):
subImg_p2 = starImg.array[:, subSlitPos+1:starImg.array.shape[1]]
star_p2 = galsim.Image(subImg_p2)
star_p2.setOrigin(0, 0)
origin_p2 = [origin_star[0], grating_split_pos_chip]
xcenter_p2 = max(x_nominal, grating_split_pos_chip - 1) - 0
ycenter_p2 = y_nominal - 0
......
......@@ -358,7 +358,7 @@ class MockObject(object):
origin_star = [y_nominal - (starImg.center.y - starImg.ymin),
x_nominal - (starImg.center.x - starImg.xmin)]
starImg.setOrigin(0,0)
gal_origin = [origin_star[0], origin_star[1]]
gal_end = [origin_star[0] + starImg.array.shape[0] - 1, origin_star[1] + starImg.array.shape[1] - 1]
......@@ -369,6 +369,7 @@ class MockObject(object):
subImg_p1 = starImg.array[:, 0:subSlitPos]
star_p1 = galsim.Image(subImg_p1)
origin_p1 = origin_star
star_p1.setOrigin(0,0)
xcenter_p1 = min(x_nominal, grating_split_pos_chip - 1) - 0
ycenter_p1 = y_nominal - 0
......@@ -384,6 +385,7 @@ class MockObject(object):
subImg_p2 = starImg.array[:, subSlitPos + 1:starImg.array.shape[1]]
star_p2 = galsim.Image(subImg_p2)
star_p2.setOrigin(0, 0)
origin_p2 = [origin_star[0], grating_split_pos_chip]
xcenter_p2 = max(x_nominal, grating_split_pos_chip - 1) - 0
ycenter_p2 = y_nominal - 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