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():
for x in xrange(CONFIG['N_ORD']):
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':
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:
......@@ -222,15 +222,15 @@ class GBWls():
else:
# calibrate FP using UNe
try:
wcalib = db.extract_dbfile(self.dbconn,'une_str')
wcalib = db.extract_dbfile(self.dbconn,'une_calib')
except:
wcalib = False
if not wcalib:
self.messages.append('No UNe calibration found for this night, it will be taken from the calibration database.')
try:
db.copy_dbfile(self.dbconn,'une_str')
wcalib = db.extract_dbfile(self.dbconn,'une_str')
db.copy_dbfile(self.dbconn,'une_calib')
wcalib = db.extract_dbfile(self.dbconn,'une_calib')
except:
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