astropy / astropy/specutils

bug in wcs1d-fits reader when multiple axes

Open
#1,246 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

I’m struggling to read in some spectra that look like they should be regular `wcs1d-fits`, but we’re getting an error: `Input WCS must have exactly one axis with spectral units, found 0.`. We’ve tried `spectral_axis_index = 0` but get the same error. The files do indeed have two axes. I feel like we need to add another header keyword which = “em” or “spect” but I don’t know what keyword to add. we have CTYPE = “LINEAR”. One failing file attached.

[SDSS_J010448.46+153501.8_usdL1.5_Xshooter_VIS_Primeval-II.fits.gz](https://github.com/user-attachments/files/21008273/SDSS_J010448.46%2B153501.8_usdL1.5_Xshooter_VIS_Primeval-II.fits.gz)

Contributor guide

Open the contributing guide

Research direction

The attached SDSS_J010448.46+153501.8_usdL1.5_Xshooter_VIS_Primeval-II.fits.gz is the only concrete reproduction provided; start by loading it through the wcs1d-fits reader and inspecting how spectral_axis_index and CTYPE are interpreted. The payload names no source file or test, so determine the expected handling of its two axes before adding regression coverage; done means the file no longer produces the reported zero-spectral-axis error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.