Commit 4dfd170e authored by Monica Rainer's avatar Monica Rainer
Browse files

Change ouput, write BERV

parent b55ed104
......@@ -431,8 +431,16 @@ class GBNodding():
heaspe[CONFIG['BERV'][0]] = (barycorr,CONFIG['BERV'][1])
heaspe[CONFIG['HJD'][0]] = (hjd,CONFIG['HJD'][1])
waves = np.zeros((50,CONFIG['YCCD']))
for o in xrange(50):
waves[o] = varie.wcalib(heaspe,o)
spefits = fits.PrimaryHDU(optSpectrum,header=heaspe)
results = fits.HDUList([spefits])
wavefits = fits.ImageHDU(waves,name='WAVE')
snrfits = fits.ImageHDU(snr,name='SNR')
#results = fits.HDUList([spefits])
results = fits.HDUList([spefits,wavefits,snrfits])
calname = os.path.join(CONFIG['RED_DIR'],calname)
results.writeto(calname,clobber=True)
......@@ -522,11 +530,19 @@ class GBNodding():
except:
heaspe[CONFIG['AIRMASS'][0]] = (heaspe[CONFIG['KEYS']['AM']],CONFIG['AIRMASS'][1])
waves = np.zeros((50,CONFIG['YCCD']))
for o in xrange(50):
waves[o] = varie.wcalib(heaspe,o)
spefits = fits.PrimaryHDU(abcalib,header=heaspe)
results = fits.HDUList([spefits])
wavefits = fits.ImageHDU(waves,name='WAVE')
snrfits = fits.ImageHDU(snr,name='SNR')
#results = fits.HDUList([spefits])
results = fits.HDUList([spefits,wavefits,snrfits])
results = fits.HDUList([spefits])
results.writeto(abnome,clobber=True)
self.messages.append('Nodding merged AB: SNR[Y band, order=73, wl=1050 nm] = %s' % (str(round(np.mean(snr[41]),2))),)
......
......@@ -539,8 +539,17 @@ class GBStare():
heaspe[CONFIG['BERV'][0]] = (barycorr,CONFIG['BERV'][1])
heaspe[CONFIG['HJD'][0]] = (hjd,CONFIG['HJD'][1])
waves = np.zeros((50,CONFIG['YCCD']))
for o in xrange(50):
waves[o] = varie.wcalib(heaspe,o)
spefits = fits.PrimaryHDU(optSpectrum,header=heaspe)
results = fits.HDUList([spefits])
wavefits = fits.ImageHDU(waves,name='WAVE')
snrfits = fits.ImageHDU(snr,name='SNR')
#results = fits.HDUList([spefits])
results = fits.HDUList([spefits,wavefits,snrfits])
calname = os.path.join(CONFIG['RED_DIR'],calname)
results.writeto(calname,clobber=True)
......
......@@ -898,8 +898,6 @@ def berv_corr(hdr):
mjd = hdr[CONFIG['KEYS']['MJD']]
barycorr, hjd, vbar, vdiurnal = baryvel.helcorr(longitude,latitude,elevation,ra,dec,mjd,equinox,pma,pmd)
# the results differ from the IDL routine
# at the moment they are not returned
#return barycorr, hjd
return -99999, -99999
return barycorr, hjd
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