Characterise#19
Merged
Merged
Conversation
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.
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.
No description provided.