Commit e14e62dc authored by Carlo Ferrigno's avatar Carlo Ferrigno
Browse files

Cleaning fits save for SPI-ACS

parent e8d9ae86
......@@ -1201,12 +1201,19 @@ class INTEGRALwrapper(object):
timepixr = 0.5
dt = timedel * timepixr
hdu.header['TSTART'] = hdu.data['TIME'][0] - dt
hdu.header['TSTOP'] = hdu.data['TIME'][-1] + dt
hdu.header['TSTOP'] = hdu.data['TIME'][-1] + dt
hdu.header['TFIRST'] = hdu.data['TIME'][0] - dt
hdu.header['TLAST'] = hdu.data['TIME'][-1] + dt
conversion = 1
if instrument == 'SPI-ACS':
INTEGRALwrapper.__log.debug('SPI-ACS times are in seconds in the header')
conversion = 86400.
hdu.header['TFIRST'] = hdu.header['TSTART']
hdu.header['TLAST'] = hdu.header['TSTART']
#hdu.header['TSTART'] = hdu.header['TSTART'] / conversion
#hdu.header['TSTOP'] = hdu.header['TSTOP'] / conversion
else:
hdu.header['TSTART'] = hdu.data['TIME'][0] - dt
hdu.header['TSTOP'] = hdu.data['TIME'][-1] + dt
hdu.header['TFIRST'] = hdu.data['TIME'][0] - dt
hdu.header['TLAST'] = hdu.data['TIME'][-1] + dt
hdu.header['TELAPSE'] = hdu.header['TLAST'] - hdu.header['TFIRST']
ontime = 0
......@@ -1219,8 +1226,9 @@ class INTEGRALwrapper(object):
fits.writeto(lc_fn, hdu.data, header=hdu.header, overwrite=True)
mjdref = float(hdu.header['MJDREF'])
tstart = float(hdu.header['TSTART']) + mjdref
tstop = float(hdu.header['TSTOP']) + mjdref
INTEGRALwrapper.__log.debug('%g %g' % ( float(hdu.header['TSTART']) , float(hdu.header['TSTOP']) ))
tstart = float(hdu.header['TSTART']) / conversion + mjdref
tstop = float(hdu.header['TSTOP']) / conversion + mjdref
try:
exposure = float(hdu.header['EXPOSURE'])
except:
......
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