HiPERCAM / hipercam

Python package for handling HiPERCAM data
3 stars 4 forks source link

genred missing warnings import #90

Closed wildjames closed 3 years ago

wildjames commented 3 years ago

As said in the title. All is fine when nothing goes awry, but rather than catching a user error and informing them what they did wrong, the script spits out a missing import error, like this one, for missing apertures:

blackhole:/local/sl/backed_up_on_astro3/eclipsing_cvs/LIVE/CSS090102/REDUCED/ucam/2014_03_14$ genred
apfile - aperture input file [run026]:
rfile - reduce output file [run026]:
bias - bias frame ['none' to ignore] [bias_2x2_slow]:
dark - dark field frame ['none' to ignore] [none]:
flat - flat field frame ['none' to ignore] [skyflat]:
fmap - fringe frame ['none' to ignore] [none]:
seeing - approximate seeing [arcsec, 0 to ignore] [1.0]:
sworst - worst expected seeing [arcsec] [3.0]:
binfac - binning factor [1]: 2
template - template reduce file ['none' to ignore] [none]:
inst - the instrument-telescope [ultracam-ntt]:
Traceback (most recent call last):
  File "/usr/local/bin/genred", line 8, in <module>
    sys.exit(genred())
  File "/usr/local/lib/python3.7/dist-packages/hipercam/scripts/genred.py", line 678, in genred
    warnings.warn(
NameError: name 'warnings' is not defined
trmrsh commented 3 years ago

fixed in trm-dev; will add the changes to master soon