Ensure the bin_edge version of `SpectralAxis` specification has a consistent wcs
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
It's not clear to me that the implementation of #645 (and future additions like #661) fully follow the convention that if the user does `spectrum.wcs.pixel_to_world([0,1,2,3,...])` (i.e. integer pixels) they get the bin-edges, while `spectrum.wcs.pixel_to_world([0.5,1.5,2.5,...])` should give the centers. A test of this should be added to ensure this is the case, and fixed if not.
This is a follow-on to #645 based on some of the discussion in #176 and https://github.com/astropy/specutils/pull/645#discussion_r405718570 .
cc @rosteen
Contributor guide
Research direction
Start by reviewing the implementation of #645 and the discussion in #176 and the linked pull-request comment. Add a regression test comparing pixel_to_world results for integer pixels and half-integer pixels, then fix the implementation if the integer inputs do not produce bin edges and the half-integer inputs do not produce centers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100