Keck-DataReductionPipelines / MosfireDRP

http://keck-datareductionpipelines.github.io/MosfireDRP
10 stars 13 forks source link

Catch case where no calibration files are found gracefully #117

Open joshwalawender opened 6 years ago

joshwalawender commented 6 years ago

When running AutoDriver for a data set which does not have any calibration files specified, the DRP fails with this error:

Traceback (most recent call last):
  File "/Users/jwalawender/anaconda/envs/mospy_2018_macos/bin/AutoDriver.py", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/Users/jwalawender/git/MOSFIRE_DRP/scripts/AutoDriver.py", line 465, in <module>
    mydriver.printFlat()
  File "/Users/jwalawender/git/MOSFIRE_DRP/scripts/AutoDriver.py", line 115, in printFlat
    self.addLine(flatLine)

It should check for this and fail gracefully with a more useful message to the user.