Support per-sample Delta-E references via NAME > REF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-23 09:33:52 +03:30
parent bb6e6d9b64
commit f7e3731724
6 changed files with 108 additions and 78 deletions

View File

@@ -29,8 +29,8 @@ average repeated scans, and relate results to ink mix formulas.
`samples.txt`.
5. **Updates the averages** — re-averages **all** complete scan CSVs in
the folder into `averaged.csv` (L\*, a\*, b\* mean and standard
deviation per sample, plus a `dE00` CIEDE2000 column against the
reference sample) and a formatted `averaged.html` view, then asks
deviation per sample, plus a `dE00` CIEDE2000 column against each
sample's named reference) and a formatted `averaged.html` view, then asks
whether to rebuild the formula table `formula.csv` (default: yes).
### Options
@@ -87,15 +87,15 @@ cp samples.example.txt samples.txt
```
Lines starting with `#` are ignored. Material names can be any codes.
Prefix one sample with `*` to mark it as the **Delta-E reference** that the
`dE00` column is measured against (if none is marked, the first sample is
used). Mix samples use the pattern `NAME_A+NAME_B[w1 to w2 mix]`, e.g.:
Append ` > REF` to measure that sample's `dE00` against another sample; a
bare name (no `>`) is itself a **reference**. Mix samples use the pattern
`NAME_A+NAME_B[w1 to w2 mix]`, e.g.:
```text
*INK_A
INK_B
INK_A+INK_B[75 to 15 mix]
INK_A+INK_C[30 to 80 mix]
INK_A
INK_B > INK_A
INK_A+INK_B[75 to 15 mix] > INK_A
INK_A+INK_C[30 to 80 mix] > INK_A
```
The weights are converted to percentages in the formula table
@@ -108,7 +108,7 @@ discovers the material names automatically from your sample list.
|------|----------|
| `scan_D50_<timestamp>.tsv` | Raw spotread log (Lab + XYZ + spectrum 380–730 nm) |
| `scan_D50_<timestamp>.csv` | Same data as CSV with `sample_id` column |
| `averaged.csv` | Per-sample L\*, a\*, b\* mean and std, plus `dE00` vs the reference |
| `averaged.csv` | Per-sample L\*, a\*, b\* mean and std, plus `dE00` vs each sample's reference |
| `averaged.html` | Formatted view of `averaged.csv` with color swatches |
| `formula.csv` | Averaged Lab plus one percentage column per ink |
| `archive/` | Discarded or superseded scans |