Skip to content

Darktable-session empirical verification (umbrella for #94, #95-EXIF, #96-curves, #98) #100

Description

@chipi

Darkroom-session umbrella — capture-and-verify checklist

One place to look when you sit down with darktable's GUI open. Each item below is a discrete capture or verification task that needs a real raw photograph, the GUI module configured a specific way, and the resulting .dtstyle (or rendered output) byte-compared / visually inspected against what chemigram emits.

Estimated total session: ~3-4 hours if running all open items end-to-end. Items can run independently, in any order. Stop after any item — partial-session progress is a partial close on this umbrella.

Setup (~5 min)

  • Pull latest from main so you have all the parameterize decoders + camera-aware apply paths (RFC-039 / commits 29995b8 / e30a931 / 0d2e97d)
  • Pull LFS so the bundled raws are available: git lfs pull
  • Open darktable; confirm version is 5.4.x (chemigram pins to mv5/mv6/mv4/etc. per module — incompatible darktable versions will produce mismatched bytes)
  • Pick a representative raw to author against. The two Sony fixtures (tests/fixtures/raws/landscape.ARW, tests/fixtures/raws/portrait.ARW) are CC BY-SA and known-good; or use your own. Item D (colorzones) needs a raw with vivid color content — landscape with sky + foliage works best.
  • Have a terminal next to darktable. You'll be running xxd / hex / python3 -c '...' to byte-compare exports.

Sub-task A — Tone curve baselines (#94) — ~45 min

Why: the tonecurve mv5 decoder is blocked on empirical baselines. The struct has 60 spline-node slots (480 bytes of curves), per-channel active-node counts, interpolation-type enums, autoscale enum, preset enum — every one needs a verified value.

What to capture: four reference dtstyles, one per curve:

  • tone_identity — apply the tonecurve module in default state (no edits). Export as .dtstyle. This gives the "identity curve" baseline — what darktable encodes for a no-op pass-through.
  • curve_filmic_subtle — apply a gentle S-curve via the GUI (drag the curve so blacks lift slightly, whites compress slightly). Export.
  • curve_filmic_strong — same shape but more aggressive. Export.
  • curve_lifted_shadows — drag the shadow region up significantly, leave highlights at default. Export.

Where the exports go: drop into vocabulary/packs/expressive-baseline/layers/L3/tonecurve/ (create the dir; mkdir if it doesn't exist).

Verification before closing #94:

  • Byte-diff tone_identity.dtstyle against chemigram.core.parameterize.tonecurve's expected identity output (decoder needs to be implemented; the byte capture comes first)
  • Add manifest entries for the 4 captured curves
  • Run uv run pytest tests/unit/core/parameterize/test_tonecurve.py — at minimum, every captured blob should decode + re-encode round-trip

Sub-task B — Lens lensfun baseline diff (#95 verification) — ~20 min

Status: implementation shipped in commit 0d2e97d (RFC-039 #136). EXIF auto-binding populates camera[128] / lens[128] / focal at apply time. The verification step that remains:

  • Open darktable on the Sony landscape fixture (or any wide-angle raw with EXIF). Enable the lens-correction module; let lensfun auto-detect.
  • Export .dtstyle. Inspect the camera/lens char arrays:
    python3 -c "import struct; d=open('exported.dtstyle').read(); ..."
    Or simpler: open in a hex viewer, look at offsets 36..291.
  • Render the same raw through chemigram's lens_correction entry with raw_path supplied — confirm the visible lens correction matches darktable's GUI render.
  • If correction direction / strength differs, the decoder + EXIF reader need adjustment.

Sub-task C — Denoise wavelet-curve baseline verification (#96) — ~15 min

Why: the denoise decoder ships x[6][7] and y[6][7] curve bytes constructed from source defaults (x = j/6 evenly-spaced, y = 0.5). The parameterized strength axes work regardless, but the curve bytes might disagree with what darktable's GUI emits — risking sub-mode mismatches.

  • Open darktable on any raw. Enable the denoise module in default state. Don't touch the strength sliders.
  • Export .dtstyle. Byte-diff bytes 60..395 (84 floats = 336 bytes of curve data) against the shipped baseline at vocabulary/packs/expressive-baseline/layers/L3/denoiseprofile/denoise.dtstyle.
  • If different: update the shipped baseline. The parameterized strength axes are unaffected; only the curve region bytes change.
  • Re-render a noisy raw with the parameterized denoise entry (camera-aware via RFC-039 follow-up: camera-aware denoise (per-ISO threshold) #134 / commit 237b451) and confirm the visual character matches darktable's GUI default-denoise output.

Sub-task D — Colorzones HSL precision presets (#98) — ~1 hour

Why: RFC-023 / colorequal covers 95% of HSL work; the 5% case needs explicit per-zone spline curves (sharp blue desat at exact hue, orange-skin protection curve, etc.). These ship as discrete entries only — no decoder, no parameterization.

Capture 4-8 reference curves from darktable's colorzones GUI:

  • hsl_blue_sky_steep — a sharp blue-desaturation curve targeting deep sky (around 215° hue). Drag the saturation curve down hard at blue, leave other hues alone.
  • hsl_orange_skin_protect — preserves orange at the central skin-tone hue (~30°), attenuates at the edges. Curve shape: peak at center, falloff at boundaries.
  • hsl_green_foliage_warm_curve — curve-based green→yellow shift (warm foliage). Hue curve pulled toward yellow in the green band.
  • 4-5 more as photographic cases dictate. Suggested: hsl_red_pop (red saturation lift), hsl_cyan_tame (reduces cyan in pale skies), hsl_purple_separate (lavender/purple hue separation).

Where the exports go: vocabulary/packs/expressive-baseline/layers/L3/colorzones/ (create dir).

Verification before closing #98:

  • Manifest entries added (no parameters block — these are discrete; modversion 5 per ADR-082 drift coverage)
  • Lab-grade direction-of-change tests for each (the saturation curves should show measurable chroma decrease in the affected hue zone on colorchecker patches)
  • Each renders without darktable crashing — colorzones is fragile to mal-formed curves

After the session

For each sub-task touched:

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions