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

Ghost _calibrated files -fits! warning #45

Open
phirstgemini opened this issue Jul 24, 2024 · 1 comment
Open

Ghost _calibrated files -fits! warning #45

phirstgemini opened this issue Jul 24, 2024 · 1 comment
Milestone

Comments

@phirstgemini
Copy link
Collaborator

fitsverify complains that there shouldn't be a CRPIX2 header (based on WCSAXES being 1 I think), and astropy wcslint helpfully explodes with a MemoryError. Now I'm not 100% confident that fitsverify is in the right here. It's a bit unusual I think to have WCSAXES < NAXIS, and I don't see anything in the FITS papers that discuss (or forbid) that possibility, so it's all a bit vague. But wcslint blowing up on them perhaps suggests something is not quite standard...

From Chris on slack:

This is not standard, you are correct. The data are 30-something orders (one per row in the data) where each order has its own tabular wavelength solution. There is no FITS standard for this (at least, not that I could find, if you can correct me on that, I would happily adhere to it), so I made one up where the CD matrix points to a location within a LUT of wavelength values (which, in this case, is the same size as the data, with each pixel representing the wavelength of the corresponding pixel in the data). This adheres as much as possible to the -TAB convention in the use of the CD matrix pointing to the location within a table and not saying anything about the actual world coordinate(s).
The only FITS compliant way to store these data is to write them as 30-something separate spectra, each with an associated AWAV table. With masks and variance, that's over 130 FITS extensions, each of which has a header larger than the data. I chose not to do this because it seemed inefficient and it would require a massive rewrite of the code.

OK, so basically it's correct behavior for these to be identified as having fits issues. Would be nice to figure out a sensible compliant way to store the WCS. Storing this here for reference.

@phirstgemini
Copy link
Collaborator Author

So this is not a FitsStorage bug, and highlighting the FITS standard violation is correct behavior, ugly though it is in the search results.

As such, no action due. It would be nice to tell DRAGONS how to do this nicely.

Keeping this open as a placeholder and I'm sure it will get queried in the future...

@phirstgemini phirstgemini added this to the Someday Maybe milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant