Skip to content

Characterise#19

Merged
naushir merged 4 commits into
mainfrom
characterise
Jul 22, 2026
Merged

Characterise#19
naushir merged 4 commits into
mainfrom
characterise

Conversation

@naushir

@naushir naushir commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

naushir added 4 commits July 21, 2026 16:14
Add ctt.characterisation, a hardware-free engine that turns raw-frame bursts
into sensor measurements — temporal/spatial statistics, photon-transfer fits,
DSNU/PRNU and burst discovery — and a Characterise tab built on it. The tab
analyses a project's existing dark and flat-field DNGs offline (black level,
read noise, DSNU, PRNU) and drives a live exposure sweep for the conversion
gain, linearity, full well and dynamic range, streaming progress over SSE and
persisting to <project>/characterisation/results.json.
With a lightbox and light meter attached, the Characterise tab gains an
Auto-characterise cycle that completes a characterisation with the least work:
it inventories what the project already holds (quick_scan + results.json) and
only captures or sweeps what is missing, matched by operating point (gain), so
darks or flats shot earlier at a matching gain are reused rather than repeated.
Per requested gain it runs the meter-gated exposure sweep for missing gains,
captures a flat field for PRNU, and captures dark frames after a lens-cap pause,
then merges everything via the offline analyser. Reuses the auto-capture
stabilisation and lens-cap controls and the existing sweep/analyse streams;
streams structured progress to a popup with cancel.
Preserve a prior live sweep across a fresh offline analyse (it rebuilt
results.json from the DNGs and dropped conversion gain, linearity, full well and
dynamic range, so auto-characterise's final merge — and a manual re-analyse —
wiped them), and base the sweep's single-gain metrics on the applied readback
gain rather than the request so they resolve at non-unity gains. Expose flat
fields to a verified-unclipped level for PRNU. Make Auto-characterise the primary
action with the Analyse/Run-sweep primitives in a Manual-steps disclosure, fix
the photon-transfer fit line (rounded fit gain vs full-precision point gain) and
give the SNR chart a logarithmic x-axis so it reads as a curve, not a vertical
line.
Teach the light-meter API its measurement range: MeasurementLimits + a
LightMeter.limits property (CL-70F: 1–200,000 lx, colour >= 5 lx, CCT
1,563–100,000 K), and a Measurement.in_range flag the driver sets when the
illuminance falls outside it (below range the meter returns sentinels like
-100 lx). The sample API never emits those sentinels — illuminance is clamped
to the nearest bound and invalid colour metrics are dropped — and an
out-of-range reading is never recorded with a capture nor used by the
stabilisation loop, which fails the step with an 'add light' message. The web UI
shows out-of-range values red as '< 1 lx' with dashed colour fields and an
under-range banner. Docs updated.
@naushir
naushir merged commit 1c41e30 into main Jul 22, 2026
2 checks passed
@naushir
naushir deleted the characterise branch July 22, 2026 10:33
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.

1 participant