implemented using bscale for storing std #77
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 stores the standard deviation as uint8 with the standard FITS keyword
BSCALE=0.1
, which means all stored values will be scaled down by a factor 10 by all FITS-compliant software (including Astropy). This means that the values for the standard deviation with this change are limited to the range 0 to 25.5, and have one digit of precision.I have tested this on my camera NL000D, so far everything works as expected, but I'll report back when I've had a clear night.
A side effect of this is that when opening FITS files with astropy and writing them back (something that RMS and CMN_binviewer do not) the values will be stored as floating point numbers, increasing the file size. This can be avoided by opening them with
astropy.io.fits.open(FFbla.fits, scale=True)
(note that the scaling always happens, this refers only to the writing behavior).As suggested by @cbassa in #74