-
Notifications
You must be signed in to change notification settings - Fork 27
Function: SSSC (Spectrophotometric Standard Star Calibration)
No-QE-curve color calibration. SSSC calibrates the color of your image using the stars already in it — compared against real measured spectra from the Gaia space mission — without ever asking you for a sensor QE curve.
Traditional tools (SPCC-style) need you to pick your camera's quantum efficiency curve from a list. The problem: those curves are marketing material. They're measured at room temperature on a bare sensor die, and they know nothing about your AR coating, your telescope's mirrors, your flattener, or your sky. SSSC flips the problem around: instead of assuming your system's response, it solves for it from your own data. The only curves you supply are your filter curves — the one thing manufacturers actually measure well.
This is the same calibration philosophy the Gaia mission uses internally to calibrate nearly two billion stars — pointed at your camera instead.
📄 SSSC White Paper (PDF) — full technical details, mathematical derivations, and references.
Code: sssc.py
For every calibrator star, Gaia has measured a real spectrum (~330–1050 nm). SSSC pushes those spectra through your filter curves and asks:
"What system response R(λ) best explains the difference between what Gaia says this star emits and what my camera actually recorded?"
The model for each star and channel:
measured_c = k_c \times \int flux_{star}(\lambda) \cdot T_{filter}(\lambda) \cdot R(\lambda)\, d\lambda
R(λ) — the effective system response — absorbs everything a QE datasheet can't tell you: true sensor QE at operating temperature, AR coating, mirror/lens throughput, flattener transmission, and atmospheric extinction that night. It's solved, not assumed.
How detailed a solution you get depends on how many calibrator stars your field has, and how much color variety they span (hot blue stars pin down the blue edge of each filter; cool red stars pin down the red edge). SSSC picks the best stage automatically:
| Stage | Requires | What it solves | Roughly equivalent to |
|---|---|---|---|
| Stage 1 | 5+ stars | Scalar gains k_R, k_G, k_B | Traditional scalar SPCC white balance |
| Stage 2 | 50+ stars | Color-dependent gain within each band | Polynomial SPCC — but with no QE assumption |
| Stage 3 | 200+ stars, B−V span ≥ 1.5 | The full R(λ) shape per channel | Nothing else does this |
| Stage 4 | Future (Gaia DR4 + multi-night data) | Hardware vs. atmosphere separated | Your rig's actual measured QE curve |
Every stage that runs reports its residual RMS on the same scale, so the diagnostics show you exactly how much each stage improved things.
Stage 3 gets smarter over time. Each run on the same filter+camera combination is saved and seeds the next run. The R(λ) solution refines with every session — calibration accuracy accumulates.
The Stage 4 endgame: once enough multi-night data at different airmasses exists, the stable hardware part of R(λ) gets separated from the changing atmospheric part and locked in permanently. From then on, every calibration runs at Stage 2 speed with Stage 3+ accuracy — using your empirically measured QE curve instead of a datasheet guess. And it self-maintains: mirror aging, sensor drift, or a filter swap shows up as drift in the curve.
Detects stars in your (plate-solved) image and gathers reference data for them:
- Matches detections against the local Gaia DR3 library (stars with XP spectra become primary calibrators)
- Queries SIMBAD for spectral types and magnitudes
- Falls back to Pickles templates for stars without a Gaia spectrum
After Step 1 you'll see a spectral type histogram and a pie chart showing where your calibrators came from.
- R / G / B Filter: your channel filter curves. For OSC, use the matching Bayer curves.
- LP/Cut 1 & 2: any light-pollution or cut filters in the light path. These multiply into all three channels.
- White Reference: the reference SED (G2V solar is the usual choice).
Free-text label (e.g. IMX492 · EdgeHD f/7). This separates the saved R(λ) history per sensor/optical train, so solutions from different rigs sharing a filter set don't mix. Leave blank if you only have one setup.
- BG Neutralize: optional background neutralization before/after calibration.
- Star σ: SEP star detection threshold. Default 15. Lower it for sparse fields if you need more calibrators.
-
R(λ) ctrl pts: resolution of the Stage 3 response curve.
- 8 — default, good for 200–600 stars
- 12 — finer, ~600+ stars
- 16 — high resolution, ~1000+ stars
- More points on too few stars fits noise, not your system. Leave at 8 unless you have a dense field.
- Max stars: photometry cap (default 500). Stars are chosen brightest-first, Gaia-spectrum stars prioritized. Dim stars add noise, not accuracy.
Deletes all saved R(λ) solutions for the current filter+camera combination. The next run starts fresh. Use this if you changed something in the optical train and want to rebuild the solution from scratch.
After Step 2 you get a four-panel report:
- Solved R(λ) per channel — your system's actual measured response inside each filter passband (Stage 3), with the filter curves shaded behind it. This is the plot that replaces the QE datasheet.
- Residuals before/after — the calibrator stars collapsing onto the zero line after correction.
- Calibration Quality by Stage — the RMS waterfall. Shows each stage's residual, the improvement it contributed, and (for stages you haven't reached) how many more stars you'd need.
- B−V coverage — the color spread of your calibrators, i.e. whether the field supports Stage 3.
- Plate solve the image first (SSSC needs a WCS to match stars).
- Open SSSC and run Step 1: Fetch Stars & Spectra.
- Set your R/G/B filters, any LP/cut filters, and your Camera/Rig label.
- Run Step 2: Run SSSC Calibration.
- Check the diagnostics — especially the stage waterfall and the B−V coverage.
- Run it again on other images from the same rig. Each run refines R(λ) and seeds the next. This is the whole point — the solution gets better the more you use it.
Apply commits to the active document with full undo, and the calibration details (stage, star count, gains, RMS, session ID) are written into the document metadata.
- You do not need a QE curve. Ever. If you've been agonizing over which QE curve in a list "matches" your camera — that entire problem is gone.
- More runs = better calibration. Unlike other tools where every image is a fresh start, SSSC accumulates. Same filters + same rig label = shared, refining solution.
- Wide-field images are Stage 3 gold. A 0.5–2° field typically has 200–600 Gaia XP calibrators — plenty. Narrow fields may land at Stage 2, which already matches or beats QE-based calibration.
- OSC users: the green Bayer filter has a sneaky secondary red leak. SSSC handles this automatically (half-power passband clip on green) — no action needed, just know it's accounted for.
- Weird fields (carbon stars, extreme colors) are guarded against: the Stage 2 fit validates itself and degrades gracefully rather than blowing up.
- Changed your optical train? Update the Camera/Rig label (starts a new history) or hit Clear History for the current one.
- Gaia DR4 will roughly triple the calibrator count per field — fields stuck at Stage 2 will reach Stage 3, and Stage 4 (permanent measured hardware curve) becomes possible. SSSC is already built for that migration.