Skip to content

Conversation

@mrosseel
Copy link
Collaborator

  • SQM auto exposure should target SNR, not nr of stars seen

Extract RotatingInfoDisplay class to encapsulate state and animation logic.
Reduces code by ~100 lines while preserving cross-fade animation behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mrosseel mrosseel changed the base branch from release to main January 18, 2026 19:16
mrosseel and others added 28 commits January 18, 2026 20:20
- Add from_camera_profile() factory method to ExposureSNRController
- Calculate min/target/max background from bit_depth and bias_offset
- Target background just above min (no benefit to higher values)
- Remove arbitrary 400ms min_exposure floor (now 10ms)
- Remove 5-second rate limiting (averaging handled in SQM code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Check if T_solve exists in solved dict before accessing it.
Previously checked wrong dict (solution vs solved) or didn't check at all.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move saturation handling from auto-exposure to SQM calculation:
- SQM: detect saturated stars (max aperture pixel >= 250) and exclude
  from mzero calculation by setting flux to -1
- Auto-exposure: remove saturation detection, just target background level

This allows longer exposures for better background SNR while ignoring
bright saturated stars that would corrupt the photometric calibration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
colors.get() only takes intensity, not red=True keyword argument.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
SQM state only has value, source, last_update - not value_raw.
Store source in metadata instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change target_background from min*1.25 to min+2 for more linear
camera response and less saturation risk.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add noise_floor to shared state (solver writes, camera reads)
- SNR controller uses adaptive noise floor + 2 as min_background
- Falls back to static camera profile if noise floor not yet available

This gives more accurate exposure control based on real-time
noise measurements instead of static camera profile values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Show 'Saving...' message immediately before creating zip
- Remove +2 margin from noise floor - target exact value for shortest exposure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Includes: mzero, mzero_std, background, pedestal, extinction, star counts,
saturation info, etc. - everything needed for calibration validation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Captures 3 exposures: base, +1 stop, -1 stop (or base, -1, -2 if at max).
Shows progress for each bracket. Re-enables auto-exposure when done.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Faster sweep (~1 min vs ~4 min) while still sampling exposure space.
Launch from SQM view → hold square → DEBUG.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Brighter stars have higher SNR so their mzero estimates are more reliable.
Weight each star's contribution by its flux.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Without margin, background_corrected ≈ 0 when at noise floor,
causing log10(~0) = very negative, making SQM too high.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tion

Two fixes for SQM being ~0.4 mag too high:

1. Use only bias_offset (6.0 ADU) as pedestal instead of full noise_floor
   (7.46 ADU). Read noise and dark current are random fluctuations, not
   systematic offsets that should be subtracted.

2. Disable atmospheric extinction correction. When comparing to ground-based
   SQM meters, both measurements are through the same atmosphere, so no
   correction is needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use 0.1 mag/airmass to match typical consumer SQM meters instead of
the scientific V-band value (0.28). This enables comparing measurements
at different altitudes while staying consistent with reference meters.

At zenith: +0.10 mag
At 45°: +0.14 mag
At 30°: +0.20 mag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ased for science

- Main SQM value uses fixed 0.1 mag extinction (matches consumer SQM meters)
- Also calculate altitude-dependent extinction (0.1 mag/airmass)
- Display altitude-corrected value on SQM view in small font ("alt: XX.XX")
- Enables comparing measurements at different altitudes scientifically

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Main SQM value: raw measurement (no extinction correction)
- Altitude-corrected: adds 0.28*(airmass-1) per ASTAP convention
- Zenith is reference point (extinction=0), only additional extinction
  below zenith is added for altitude comparison

At different altitudes:
- Zenith (90°): extinction = 0
- 45°: extinction = 0.115
- 30°: extinction = 0.28

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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