Commit e3f89d49 authored by Monica Rainer's avatar Monica Rainer
Browse files

Add keyword with version number

parent 70613163
......@@ -103,6 +103,8 @@ class GBDarks():
self.masterdarks[exptime].header[CONFIG['KEYS']['FILENAME']] = darkname
self.masterdarks[exptime].header[CONFIG['KEYS']['NCOMBINE']] = len(self.darklists[exptime])
self.masterdarks[exptime].header[CONFIG['DRS_VERSION'][0]] = (CONFIG['VERSION'], CONFIG['DRS_VERSION'][1])
hdu = fits.PrimaryHDU(data=self.masterdarks[exptime].data,header=self.masterdarks[exptime].header)
mdark = fits.HDUList([hdu])
......
......@@ -157,6 +157,8 @@ class GBFlats():
mflat.header[CONFIG['RON_EFF'][0]] = (math.sqrt(len(self.flatlist))*CONFIG['RON'],CONFIG['RON_EFF'][1])
mflat.header[CONFIG['GAIN_EFF'][0]] = (len(self.flatlist)*CONFIG['GAIN'],CONFIG['GAIN_EFF'][1])
mflat.header[CONFIG['DRS_VERSION'][0]] = (CONFIG['VERSION'], CONFIG['DRS_VERSION'][1])
hdu = fits.PrimaryHDU(data=mflat.data,header=mflat.header)
masterflat = fits.HDUList([hdu])
masterflat.writeto(nome,clobber=True)
......@@ -289,7 +291,8 @@ class GBFlats():
#if np.median(fdata[rrow]) > back*1.7:
fit = np.polyfit(xvalues,fdata[rrow],5)
pfit = np.polyval(fit,xvalues)
norflat[rrow] = fdata[rrow]/pfit
#norflat[rrow] = fdata[rrow]/pfit
norflat[rrow] = np.true_divide(fdata[rrow],pfit)
maskC[rrow] = 0
#if not i:
# i = rrow
......
Markdown is supported
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