Support bin_lo/bin_hi as an alternative to bin_edges
- Dominant language
- Python
- Stars
- 204
- Forks
- 134
- Avg merge
- 12h 55m
- Merged PRs (30d)
- 1
Description
As of #645 `SpectralAxis`'s bin edges support only allows continguous bins specified via edges or centers. An enhancement (particularly useful for Xray and other high-energy astronomy - see @eblur's points in #176 and https://github.com/astropy/specutils/pull/645#issuecomment-614884201) is to allow the bins to be specified fully as "lower" and "upper" edges - a common convention here is `bin_lo` and `bin_hi` (although @eblur pointed out this might be better as `bin_left` and `bin_right` since `spectral_axis` can go in either "direction"). This allows both overlapping *and* non-contiguous bins.
The catch here in my mind is that I'm not really sure how to relate this back to the WCS: there may not be a natural way to have non-contiguous bins in either FITS-WCS or gwcs. (maybe @nmearl or @nden can comment?)
There's some further context on this in: https://github.com/astropy/specutils/pull/645#issuecomment-614884201, https://github.com/astropy/specutils/pull/645#discussion_r405718570, #494, and #176 (this is basically the sub-set of the discussion in #176 that #645 has not yet addressed)
cc @rosteen
Contributor guide
Research direction
Start by reviewing SpectralAxis and the discussion in #645, #176, and #494, including the linked pull request comments. Determine how bin_lo/bin_hi or bin_left/bin_right should represent overlapping and non-contiguous bins, and how that relates to FITS-WCS or gwcs. Done means the design is resolved and the requested alternative bin representation is supported without an unresolved WCS model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100