Address wcs1d loader failures on various IRAF multispec formats#1127
Draft
dhomeier wants to merge 1 commit intoastropy:mainfrom
Draft
Address wcs1d loader failures on various IRAF multispec formats#1127dhomeier wants to merge 1 commit intoastropy:mainfrom
dhomeier wants to merge 1 commit intoastropy:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1127 +/- ##
==========================================
- Coverage 72.21% 72.04% -0.17%
==========================================
Files 62 62
Lines 4430 4440 +10
==========================================
Hits 3199 3199
- Misses 1231 1241 +10 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening this both as a WIP and issue for tracking incompatibilities of the
wcs1d-fitsloader with the IRAF 'equispec' and 'multispec' (Echelle?) formats. These are largely from reports on the list or even off-list or in the Facebook group etc., so I have yet to find out if I can link to publicly available example files.The "fix" implemented here so far basically just works around a WCS error, loading a MULTISPEC file without a valid spectral WCS; this seems to have been ignored for some time, but with recent
specutilsversions results in aThe underlying problem is that the files are using a WCS defined as
which to the best of my knowledge is simply not supported by WCSLIB (I think spatial WCS of similar construction are, but I don't see a way to define a valid header for a spectral WCS).
The kludge here is catching that error and working around the WCS failure by just constructing a
spectral_axisfrom the pixel scale, but of course without having solved the WCS provides no wavelength calibration – it merely allows to read in the spectrum at all, similar to olderspecutilsversions.As it does not seem that Astropy WCS will be able to do this, a real fix will probably require solving for the spectral axis in
specutils, as is e.g. implemented in nonlinearwave.