HiPERCAM / hipercam

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

setaper doesn't work when a default for nx doesn't exist #82

Closed StuartLittlefair closed 3 years ago

StuartLittlefair commented 3 years ago

On a new install of the hipercam pipeline I tried to run setaper on some ULTRACAM data, only for it to fail at L391 https://github.com/HiPERCAM/hipercam/blob/9806d89ffa6eba7fb1cee4ae7dec4da14e9f5bc7/hipercam/scripts/setaper.py#L391

This is because nxdef is None as a result of this line:

https://github.com/HiPERCAM/hipercam/blob/9806d89ffa6eba7fb1cee4ae7dec4da14e9f5bc7/hipercam/scripts/setaper.py#L336

which returns None. This line is wrapped in a try...except block so that nxdef=3 if it raises an exception, but it never does. So I think it wants to be

nxdef = cl.get_default("nx", 3)

trmrsh commented 3 years ago

Ah, yes indeed. I have had a few of these. Will fix and search for any others.

trmrsh commented 3 years ago

Yes, resulted from some more or less recent changes to Cline behaviour. Would only show up if there was no default file. I have fixed in 7 or so other routines, and will probably push out an update pretty soon, but I might as get your Hlog fix installed as well while I am at it.