GBTSpectroscopy / degas

ARGUS Dense-Gas GBT Survey
GNU General Public License v3.0
2 stars 6 forks source link

BadScans in log apparently not being propagated to gbtpipe #79

Closed aakepley closed 5 years ago

aakepley commented 5 years ago
2019-02-19sing Scan 184 for Feed 7                
Reducing AGBT17B_151_44
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-8-c3fd7178f784> in <module>
----> 1 degas.reduceAll(outputDir=os.environ['DEGASDIR'])

/lustre/cv/users/akepley/degas/reduction/code/degas/degas/pipeline.py in reduceAll(release, update, overwrite, outputDir, **kwargs)
    105                             enddate=row['Date (UT)'],
    106                             project=row['Project'],
--> 107                             **kwargs)
    108 
    109             # if np.any(LogRows):

/lustre/cv/users/akepley/degas/reduction/code/degas/degas/pipeline.py in wrapper(logfile, galaxy, overwrite, startdate, project, enddate, release, obslog, **kwargs)
    238                            Setup=observation['Setup'],
    239                            Project=project,
--> 240                            overwrite=overwrite, **kwargs)
    241             else :
    242                 doPipeline(SessionNumber=observation['Astrid Session'],

/lustre/cv/users/akepley/degas/reduction/code/degas/degas/pipeline.py in doPipeline(SessionNumber, StartScan, EndScan, RefScans, Galaxy, Window, Project, Setup, BadScans, OptionDict, RawDataDir, Gains, OffType, OutputRoot, overwrite, **kwargs)
    330                       suffix=suffixname,
    331                       center=galaxy_center,
--> 332                       radius=1 * u.arcmin)
    333 
    334     # Clean up permissions

/lustre/cv/users/akepley/degas/reduction/code/gbtpipe/gbtpipe/ArgusCal.py in calscans(inputdir, start, stop, refscans, badscans, outdir, log, loglevel, OffSelector, OffType, verbose, suffix, **kwargs)
    389 
    390                         rows = row_list.get(thisscan, thisfeed,
--> 391                                             thispol, thiswin)
    392                         ext = rows['EXTENSION']
    393                         rows = rows['ROW']

/lustre/cv/users/akepley/degas/reduction/code/gbtpipe/gbtpipe/ObservationRows.py in get(self, scan, feed, window, polarization)
     81         try:
     82             key = (scan, feed, window, polarization)
---> 83             return self.rows[key]
     84         except(KeyError):
     85             raise

KeyError: (204, 9, 0, 0)

According to log scan 204 is bad and is listed in bad scans column of spreadsheet.

May be fixed by flagging improvements? https://github.com/GBTSpectroscopy/gbtpipe/issues/16

aakepley commented 5 years ago

may have found the fix. testing now.

aakepley commented 5 years ago

I appear to have fixed this. The issue was that a) the info wasn't propagated and b) a single bad scan is is an int64 not a string. Will be in my latest branch. Will reference here when I sync it to github.