Commit 1a11858c authored by Monica Rainer's avatar Monica Rainer
Browse files

Fix bug in retrieving the masterlamp during the online reduction

parent 14aba26f
......@@ -381,20 +381,17 @@ class GBNodding():
try:
masterlamp = db.extract_dbfile(self.dbconn,'une_str')
except:
# masterlamp = False
#
# if not masterlamp:
# db.copy_dbfile(self.dbconn,'une_str')
# masterlamp = db.extract_dbfile(self.dbconn,'une_str')
# db.copy_dbfile(self.dbconn,'une_calib')
# self.messages.append('No calibration lamp found for this night, it will be taken from the calibration database: %s' % (os.path.basename(masterlamp)))
masterlamp = False
if not masterlamp:
try:
db.copy_dbfile(self.dbconn,'une_str')
masterlamp = db.extract_dbfile(self.dbconn,'une_str')
db.copy_dbfile(self.dbconn,'une_calib')
self.messages.append('No calibration lamp found for this night, it will be taken from the calibration database: %s' % (os.path.basename(masterlamp)))
except:
masterlamp = False
if not masterlamp:
self.messages.append('No calibration lamp found in the calibration database, the spectra will not be reduced.')
return
......
......@@ -513,19 +513,18 @@ class GBStare():
try:
masterlamp = db.extract_dbfile(self.dbconn,'une_str')
except:
# masterlamp = False
#
# if not masterlamp:
# db.copy_dbfile(self.dbconn,'une_str')
# masterlamp = db.extract_dbfile(self.dbconn,'une_str')
# db.copy_dbfile(self.dbconn,'une_calib')
# self.messages.append('No calibration lamp found for this night, it will be taken from the calibration database: %s' % (os.path.basename(masterlamp)))
masterlamp = False
if not masterlamp:
try:
db.copy_dbfile(self.dbconn,'une_str')
masterlamp = db.extract_dbfile(self.dbconn,'une_str')
db.copy_dbfile(self.dbconn,'une_calib')
self.messages.append('No calibration lamp found for this night, it will be taken from the calibration database: %s' % (os.path.basename(masterlamp)))
except:
masterlamp = False
if not masterlamp:
self.messages.append('No calibration lamp found in the calibration database, the spectra will not be reduced.')
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