Commit 9fc7a645 authored by Monica Rainer's avatar Monica Rainer
Browse files

Fix bug in FP calibration

parent 7c0d85af
...@@ -187,7 +187,7 @@ class GBWls(): ...@@ -187,7 +187,7 @@ class GBWls():
for x in xrange(CONFIG['N_ORD']): for x in xrange(CONFIG['N_ORD']):
row = x*CONFIG['W_ORD'] + 19 row = x*CONFIG['W_ORD'] + 19
ordini[x] = np.sum(wldata[row-5:row+5],axis=0) ordini[x] = np.sum(wldata[row-CONFIG['WEXT']:row+CONFIG['WEXT']],axis=0)
if unefp == 'une': if unefp == 'une':
calib_failed, coeffs, comments = varie.UNe_calibrate(ordini[x],x+32,select_lines[x+32],all_lines[x+32],True,True) calib_failed, coeffs, comments = varie.UNe_calibrate(ordini[x],x+32,select_lines[x+32],all_lines[x+32],True,True)
for comment in comments: for comment in comments:
...@@ -222,15 +222,15 @@ class GBWls(): ...@@ -222,15 +222,15 @@ class GBWls():
else: else:
# calibrate FP using UNe # calibrate FP using UNe
try: try:
wcalib = db.extract_dbfile(self.dbconn,'une_str') wcalib = db.extract_dbfile(self.dbconn,'une_calib')
except: except:
wcalib = False wcalib = False
if not wcalib: if not wcalib:
self.messages.append('No UNe calibration found for this night, it will be taken from the calibration database.') self.messages.append('No UNe calibration found for this night, it will be taken from the calibration database.')
try: try:
db.copy_dbfile(self.dbconn,'une_str') db.copy_dbfile(self.dbconn,'une_calib')
wcalib = db.extract_dbfile(self.dbconn,'une_str') wcalib = db.extract_dbfile(self.dbconn,'une_calib')
except: except:
return return
......
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