Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data from 2004 lacks POFFSET/QOFFSET header keywords & standardizeWCS() crashes #466

Open
DBerke opened this issue Sep 25, 2024 · 0 comments
Labels
bug 🐛 Something should be working but it isn't

Comments

@DBerke
Copy link
Contributor

DBerke commented Sep 25, 2024

GNIRS XD science frames S20041127S0110-117.fits don't have QOFFSET or POFFSET header keywords; those keywords are used to get detector_x_offset() and detector_y_offset() in AstroDataGNIRS, and without them the reduction crashes in standardizeWCS() in primitives_gemini.py due to trying to subtract two NoneTypes. (The flat, pinhole, and arc reductions all proceeded without issue.)

ERROR - Traceback (most recent call last):
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/reduction/coreReduce.py", line 599, in reduce_data
ERROR -     recipe(p)
ERROR -   File "/Users/daniel.berke/DRAGONS/geminidr/gnirs/recipes/sq/recipes_XD_SPECT.py", line 17, in reduceScience
ERROR -     p.prepare()
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 352, in gn
ERROR -     ret_value = fn(pobj, adinputs=adinputs, **fnargs)
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 269, in gn
ERROR -     ret_value = fn(pobj, **kwargs)
ERROR -   File "/Users/daniel.berke/DRAGONS/geminidr/core/primitives_standardize.py", line 345, in prepare
ERROR -     adinputs = getattr(self, primitive)(adinputs, **passed_params)
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 366, in gn
ERROR -     ret_value = fn(pobj, adinputs=adinputs, **dict(config.items()))
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 269, in gn
ERROR -     ret_value = fn(pobj, **kwargs)
ERROR -   File "/Users/daniel.berke/DRAGONS/geminidr/gnirs/primitives_gnirs_spect.py", line 50, in standardizeWCS
ERROR -     super().standardizeWCS(adinputs, **params)
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 366, in gn
ERROR -     ret_value = fn(pobj, adinputs=adinputs, **dict(config.items()))
ERROR -   File "/Users/daniel.berke/DRAGONS/recipe_system/utils/decorators.py", line 269, in gn
ERROR -     ret_value = fn(pobj, **kwargs)
ERROR -   File "/Users/daniel.berke/DRAGONS/geminidr/gemini/primitives_gemini.py", line 267, in standardizeWCS
ERROR -     needs_fixing |= not base_pointing.consistent_with(p)
ERROR -   File "/Users/daniel.berke/DRAGONS/geminidr/gemini/primitives_gemini.py", line 460, in consistent_with
ERROR -     dx = other.xoffset - self.xoffset
ERROR - TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'

Files used:
Flats: S20041101S0321-140.fits
Pinholes: S20041101S0288-289.fits
Arcs: S20041127S0108.fits

@DBerke DBerke added the bug 🐛 Something should be working but it isn't label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something should be working but it isn't
Projects
None yet
Development

No branches or pull requests

1 participant