Skip to content

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

@DBerke

Description

@DBerke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something should be working but it isn't

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions