Skip to content

M1: IES LM-63 and EULUMDAT readers, symmetry expansion, emergency flux - #1

Merged
Erry91 merged 1 commit into
mainfrom
feat/m1-photometry
Oct 21, 2026
Merged

Erry91 merged 1 commit into
mainfrom
feat/m1-photometry

Conversation

@Erry91

@Erry91 Erry91 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What this changes

M1: photometric files become usable.

  • luxpath-photometry reads IES LM-63 (1986, 1991, 1995, 2002, 2019; type C; relative and absolute photometry; TILT=INCLUDE) and EULUMDAT (all five symmetry indicators, Latin-1, decimal commas). Both are read into one full C-γ table in cd/klm.
  • Symmetry expansion works for rotational, C0–C180, C90–C270, quadrant and full distributions. Outside the measured γ range the table gives 0 (no invented light).
  • Emergency flux is set from a ballast lumen factor in (0, 1] or from lumens. Values out of range are errors.
  • Errors name their line. Unsupported variants are refused with that line, never guessed: type A/B, TILT=<file>, several lamp sets.
  • luxpath photometry <file> shows the format, the flux, the symmetry, the peak intensity and the light output ratio.
  • cargo xtask fuzz [seconds] runs the mutation fuzzer.

Existing crates were evaluated first (docs/architecture.md):

  • eulumdat and gldf-rs are AGPL and l3d_rs is GPL, so they are excluded.
  • lidrs (MIT) is dormant since 2022. It panics on mutated input, has todo!() for type A/B files, and accepts truncated files as valid.

How you verified it

  • cargo xtask ci, natively (macOS) and in the local Linux container. Merged on the local checks (hosted CI unavailable).
  • Exit criteria:
    • synthetic files of every symmetry read identically from IES and LDT (tests/formats.rs, plus property tests);
    • cargo xtask fuzz 600 tried 22,847,141 inputs without a panic.
  • Watched the tests fail:
    • a broken C90–C270 mirror turns formats.rs red;
    • a planted panic is found by fuzz_briefly.
  • Real files: the two public sample files bundled with lidrs both read. The LDT's integrated light output (100.1 %) matches its declared value (100 %).
  • The light output in the end-to-end test is checked by hand: the hand-written downlight gives 84.5 % from the zonal sums.

Life safety (AGENTS.md §2)

  • No path reports "pass" when data is missing or ambiguous. Missing emergency output has no default, and unsupported variants are refused.
  • Assumptions are documented: zero light outside the measured γ range, and the edition-specific factors are unverified against the texts (gap 14).

Never panic (AGENTS.md §3)

  • No new unwrap/expect/panic!/indexing on input outside tests; NaN/inf guarded; allocations capped (16 MB files, MAX_TABLE_VALUES, 10,000 tilt angles)
  • Fuzzed: 2-second run on every test, 10-minute run done

Provenance (AGENTS.md §1)

  • No text, tables or figures from a standard
  • Nothing from closed tools; no GPL/AGPL code
  • Only synthetic fixtures committed (listed in crates/photometry/tests/fixtures/README.md)

Records

  • parity/features.toml: symmetry, emergency flux shipped; IES and LDT readers partial (no real manufacturer files yet)
  • docs/status.md, docs/gaps.md (rows 1–2 closed, 12–15 added), docs/roadmap.md, ROADMAP.md log

Readers for IES LM-63 (1986-2019, type C, relative and absolute, tilt
tables) and EULUMDAT (every symmetry indicator) into one full C-gamma
table, with located errors; symmetry expansion; emergency-mode flux;
property tests and a mutation fuzzer (cargo xtask fuzz: 22.8 million
inputs in 600 s, no panic); `luxpath photometry <file>`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Erry91
Erry91 merged commit 82a36e8 into main Oct 21, 2026
0 of 3 checks passed
@Erry91
Erry91 deleted the feat/m1-photometry branch October 21, 2026 07:52
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