Commit 351d426e authored by Unknown's avatar Unknown
Browse files

Fix minor bug in SHIFT_Y retrieval

parent bb1043a8
...@@ -7,6 +7,7 @@ vradlib ...@@ -7,6 +7,7 @@ vradlib
vrad_telluriche vrad_telluriche
DA_FARE.txt DA_FARE.txt
GOFIO_*.odt GOFIO_*.odt
GOFIO_v*
patchfile patchfile
setup.py setup.py
vrad_telluric.py vrad_telluric.py
......
...@@ -192,14 +192,15 @@ class GBNodding(): ...@@ -192,14 +192,15 @@ class GBNodding():
pass pass
if dy: if dy:
shift = db.extract_dbfile(self.dbconn,'shiftY') try:
if not shift: shift = db.extract_dbfile(self.dbconn,'shiftY')
cal_flat = db.extract_dbfile(self.dbconn,'flat') except:
if cal_flat: try:
cal_flat = db.extract_dbfile(self.dbconn,'flat')
mflat = ccdproc.CCDData.read(cal_flat, unit=u.adu) mflat = ccdproc.CCDData.read(cal_flat, unit=u.adu)
shift = varie.shiftY(mflat.data) shift = varie.shiftY(mflat.data)
db.insert_dbfile(self.dbconn,'shiftY',shift) db.insert_dbfile(self.dbconn,'shiftY',shift)
else: except:
db.copy_dbfile(self.dbconn,'shiftY') db.copy_dbfile(self.dbconn,'shiftY')
shift = db.extract_dbfile(self.dbconn,'shiftY') shift = db.extract_dbfile(self.dbconn,'shiftY')
if not shift: if not shift:
......
...@@ -340,14 +340,15 @@ class GBStare(): ...@@ -340,14 +340,15 @@ class GBStare():
pass pass
if dy: if dy:
shift = db.extract_dbfile(self.dbconn,'shiftY') try:
if not shift: shift = db.extract_dbfile(self.dbconn,'shiftY')
cal_flat = db.extract_dbfile(self.dbconn,'flat') except:
if cal_flat: try:
cal_flat = db.extract_dbfile(self.dbconn,'flat')
mflat = ccdproc.CCDData.read(cal_flat, unit=u.adu) mflat = ccdproc.CCDData.read(cal_flat, unit=u.adu)
shift = varie.shiftY(mflat.data) shift = varie.shiftY(mflat.data)
db.insert_dbfile(self.dbconn,'shiftY',shift) db.insert_dbfile(self.dbconn,'shiftY',shift)
else: except:
db.copy_dbfile(self.dbconn,'shiftY') db.copy_dbfile(self.dbconn,'shiftY')
shift = db.extract_dbfile(self.dbconn,'shiftY') shift = db.extract_dbfile(self.dbconn,'shiftY')
if not shift: if not shift:
......
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