Commit a90d1650 authored by Monica Rainer's avatar Monica Rainer
Browse files

Update stare reduction and keywords names

parent f4c5e8cf
......@@ -278,7 +278,13 @@ class GBCheckRawFiles():
return
try:
nod_stare = hdr[CONFIG['KEYS']['NODSTARE']]
#nod_stare = hdr[CONFIG['KEYS']['NODSTARE']]
if CONFIG['NODVALUE'] in hdr[CONFIG['KEYS']['NODSTARE']]:
nod_stare = CONFIG['NODVALUE']
elif CONFIG['STAREVALUE'] in hdr[CONFIG['KEYS']['NODSTARE']]:
nod_stare = CONFIG['STAREVALUE']
else:
nod_stare = hdr[CONFIG['KEYS']['NODSTARE']]
except:
if slitpos == CONFIG['C']:
nod_stare = CONFIG['STAREVALUE']
......
......@@ -85,6 +85,7 @@ def run_gofio(CONFIG, rawlists, dbcalib, working, group, stop, drslogger, dbnigh
while raws:
if CONFIG['OFFLINE']:
working, group, go, do_calib, rawlists = gofio.GianoBreduce(raws[0], rawlists, dbcalib, working, group, do_calib, stop, drslogger, dbnight)
#print rawlists
if go:
raws.pop(0)
#raws.pop(0)
......@@ -105,6 +106,9 @@ def run_gofio(CONFIG, rawlists, dbcalib, working, group, stop, drslogger, dbnigh
time.sleep(1)
if CONFIG['OFFLINE']:
if rawlists[CONFIG['SCIENCE']] and group['nodstare'] == CONFIG['STAREVALUE']:
gofio.GianoBreduce(None, rawlists, dbcalib, working, group, do_calib, stop, drslogger, dbnight)
drslogger.log('No more files to reduce.')
dbcalib.close()
try: os.remove(CONFIG['MASK_C'])
......@@ -124,6 +128,11 @@ def run_gofio(CONFIG, rawlists, dbcalib, working, group, stop, drslogger, dbnigh
if db.check_raw(dbramps,raws[n]):
gofio.GianoBreduce(raws[n], rawlists, dbcalib, working, group, do_calib, stop, drslogger, dbnight)
break
if not raws:
if rawlists[CONFIG['SCIENCE']] and group['nodstare'] == CONFIG['STAREVALUE']:
gofio.GianoBreduce(None, rawlists, dbcalib, working, group, do_calib, stop, drslogger, dbnight)
try: os.remove(CONFIG['MASK_C'])
except: pass
drslogger.log('Pipeline stopped.')
......
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