Commit 7c0d85af authored by Monica Rainer's avatar Monica Rainer
Browse files

Flat extraction commented out

parent 6e1e7801
...@@ -184,6 +184,7 @@ class GBFlats(): ...@@ -184,6 +184,7 @@ class GBFlats():
straight = flat.replace('.fits','_str.fits') straight = flat.replace('.fits','_str.fits')
nor = flat.replace('.fits','_nor.fits') nor = flat.replace('.fits','_nor.fits')
#extracted = flat.replace('.fits','_ext.fits')
#args = [CONFIG['STRAIGHT'],flat,straight,CONFIG['STRAIGHT_OPT']] #args = [CONFIG['STRAIGHT'],flat,straight,CONFIG['STRAIGHT_OPT']]
args = [CONFIG['STRAIGHT'],flat,straight] args = [CONFIG['STRAIGHT'],flat,straight]
...@@ -207,7 +208,13 @@ class GBFlats(): ...@@ -207,7 +208,13 @@ class GBFlats():
xvalues = np.arange(CONFIG['XCCD']) xvalues = np.arange(CONFIG['XCCD'])
np.seterr(divide='ignore') np.seterr(divide='ignore')
#ordini = np.zeros((CONFIG['N_ORD'],CONFIG['XCCD']))
for x in xrange(CONFIG['N_ORD']): for x in xrange(CONFIG['N_ORD']):
#frow = x*CONFIG['W_ORD'] + 19
#ordini[x] = np.sum(fdata[frow-5:frow+5],axis=0)
# order limits # order limits
start = x*CONFIG['W_ORD'] start = x*CONFIG['W_ORD']
end = min(start+CONFIG['W_ORD'],CONFIG['YCCD']) end = min(start+CONFIG['W_ORD'],CONFIG['YCCD'])
...@@ -237,6 +244,16 @@ class GBFlats(): ...@@ -237,6 +244,16 @@ class GBFlats():
#width = width + 1 #width = width + 1
# save the extracted flat as FITS file
#flextract = ccdproc.CCDData(ordini, unit=u.adu)
#flextract.data = np.asarray(flextract.data, dtype='float32')
#flextract.header = mflat.header
#fhdu = fits.PrimaryHDU(data=flextract.data,header=flextract.header)
#flextr = fits.HDUList([fhdu])
#flextr.writeto(extracted,clobber=True)
#red_ext = os.path.join(CONFIG['RED_CALIB'],os.path.basename(extracted))
#shutil.copyfile(extracted,red_ext)
fnor = ccdproc.CCDData(norflat, unit=u.adu) fnor = ccdproc.CCDData(norflat, unit=u.adu)
fnor.header = mflat.header fnor.header = mflat.header
#fn = fnor.to_hdu() #fn = fnor.to_hdu()
......
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