Add a .raw_data attribute to FITS HDUs
- Dominant language
- Python
- Stars
- 5.3k
- Forks
- 2.2k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 74
Description
As @leejjoon suggested way back in #993, it might be nice to have a convenient way to get at the raw, unscaled data of FITS arrays that have scale factors.
I always intended that to be a feature in some kind of FITS data class (that would also be used for columns of tables, so that individual columns can be accessed as scaled or raw).
But in the meantime I think it would be fairly straightforward to add a `.raw_data` attribute to all HDU classes. I think for the most part this could be implemented simply by wrapping the same code used by `.data`, but with `self._do_not_scale_image_data = True` set temporarily. I just set "Effort-medium" because there may be some subtleties I haven't thought of yet, and there may also need to be some refactoring to avoid code duplication.
Contributor guide
Research direction
Start by tracing the existing `.data` implementation across the FITS HDU classes and how `_do_not_scale_image_data` controls scaling. Determine how a `.raw_data` attribute can share that behavior without changing `.data`, including the HDU classes covered. Done means every HDU class exposes unscaled array data while existing scaled-data behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100