Add allsky_skyquality: calibrated mag/arcsec² Sky Quality Meter - #339
Open
benhartwich wants to merge 1 commit into
Open
Add allsky_skyquality: calibrated mag/arcsec² Sky Quality Meter#339benhartwich wants to merge 1 commit into
benhartwich wants to merge 1 commit into
Conversation
An advanced alternative to the bundled allsky_sqm module: reports sky brightness in mag/arcsec2 with exposure/gain normalisation (Allsky auto-exposes at night, so raw ADU is not comparable between frames), plus sensor-free star-count, cloud and aurora indices. Writes a rolling skyquality.json for charting. Night event only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
allsky_skyquality — calibrated mag/arcsec² Sky Quality Meter
Adds a new module
allsky_skyquality.What it does
Reports night sky brightness in mag/arcsec² and writes a rolling
skyquality.jsonfor time-series charting — no database or external sensor required.
How it differs from the bundled
allsky_sqmallsky_sqmreports a raw ROI mean ADU. Because Allsky auto-exposes andauto-gains at night, raw ADU is not comparable between frames (a darker sky just
gets a longer exposure and lands at a similar ADU). This module normalises first:
so the reading tracks true sky brightness.
offsetis a one-time per-cameracalibration constant. It also records three sensor-free extras: template-matched
star count, a cloud index (star-deficit grid) and a candidate aurora index
(green excess on the north horizon).
Notes
cv2+numpy(already shipped with Allsky) — no extra requirements.https://github.com/benhartwich/allsky-skyquality
Tested live on a ZWO 4K fisheye camera (astronomy.garden): monotonic night curve,
darkest reading ≈ 20.8 mag/arcsec² after calibration.