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