Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented using bscale for storing std #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tammojan
Copy link
Contributor

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

@dvida
Copy link
Contributor

dvida commented May 31, 2021

This needs to be conditional on whether the fits format is used or not. RMS can produce the CAMS-format bin files, and this won't work there.
Also, I don't think this is really an issue at all. Even if the stddev is only 1, the meteor still needs to be 4 levels above the background, which is really really faint.

@tammojan
Copy link
Contributor Author

I can make it conditional on using FITS I think.

I think the issue will occur more when the stddev is less than 0.5, which will be rounded to zero and make those pixels unusable. @cbassa mentioned that he ran into this when trying to detect satellites, maybe he can expand a bit.

@dvida
Copy link
Contributor

dvida commented May 31, 2021

The line below the stddev computation limits it to a minimum value of 1, to avoid zero division errors afterwards: https://github.com/CroatianMeteorNetwork/RMS/blob/master/RMS/CompressionCy.pyx#L163
This effectively takes care of those issues.

dvida pushed a commit that referenced this pull request Jan 12, 2024
Reverse-merge master into my dev branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants