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.
This fixes #16 and preserves the uint16 fix introduced at 50e68a8.
@oguyon please review and merge. @mileslucas for the chuckles.
The FITS standard defines that TBYTE operates on a canonical BZERO=0, but that TSBYTE is offset with BZERO=-128. Which is contrary to the signed/unsigned behavior on other integer lengths.
This creates a quirk where BZERO needs in some case to be negative, in other larger than the largest possible signed integer...
BZERO also can't afford to be float because that sometimes causes a forced cast into float when reading the data with astropy, preventing from accessing the natural data with astropy.
So, BZERO becomes an integer type. Which puts us out of compliance with the Subaru FITS requirement that BZERO if float.