From e2f828248c80ea84d73e0f034a49cb8335090fff Mon Sep 17 00:00:00 2001 From: Paullo9 Date: Sat, 31 Oct 2026 16:04:45 +0100 Subject: [PATCH] docs: sigma row names the thickness and dose terms, Si K alpha bias in the parity list parity.md: the sigma on wt% and at% row says the per-spectrum quantifyWithSigma takes thicknessSigmaNm (Cliff-Lorimer) and doseRelativeSigma (zeta, cross section), names the four new sigma fields, and gives the coverage the planted-case tests hold (0.63 to 0.71 within 1 sigma, 0.93 to 0.97 within 2 sigma). The open-areas list said Si 8.7 % low; since the absorption-truth test counts the Si internal-fluorescence peak it is 20 % low against the whole planted peak, as the EDS note and open-items already say. open-items.md: item 9 keeps only the detector term and the per-pixel sigma map. The Si internal-fluorescence note and open-items item 3 were already updated by the PR that pinned the bias. The dead-layer row, the take-off-angle and map sigma, and the pile-up sentence of item 8 wait for their PRs to merge. Done: rows for the thickness and dose sigma. Next: the detector and map sigma rows and the dead-layer row when they merge. Co-Authored-By: Claude Opus 5.5 --- docs/open-items.md | 2 +- docs/parity.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/open-items.md b/docs/open-items.md index 5df6f1a..b029aca 100644 --- a/docs/open-items.md +++ b/docs/open-items.md @@ -20,7 +20,7 @@ Slowest against Python first. Diagnose before changing a number: state the cause 6. **App-side `@testable` reach**, done: 0.9.0 opened the window, segment, candidate and proposal-result initialisers and the `PooledQuantificationInput` fields (`axis`, `method`, `metadata`, `regionName`, `pixelCount` are public); the computed or typed k (`PooledQuantification.kFactors`), the line energy (`Row.lineEnergyKeV`) and the take-off angle (`EDXQuantification.takeOffDegrees`) are public since 0.8.2; the next release opens `UnlistedLineCheck.Candidate`, `.Move` and `UnlistedLineCheck.init` (SpectroKit#13). 7. **Validation**: every quantification stays `validation: "none"` until a standard of known composition is measured. 8. **EDS 0.10.0 asks, what is open**: the sum/escape model's pile-up coefficient is one number for the whole spectrum and the parents are the alpha lines of the strongest groups (family lines such as Kb are not parents); a real detector's escape fraction depends on energy, the common fraction is a first model. It is not tested on real data and has no standard: it needs one measured spectrum with a known sum peak (a thick pure Cu or Fe sample at a high rate) before the badge can change. `PooledQuantification.plotModel` includes the peaks, but the proposer and the unlisted-line check still use their own pile-up columns and do not know the model's. -9. **Sigma on wt% and at%**: the thickness sigma, the dose and the detector are not in the per-spectrum `quantifyWithSigma` (the pooled quantification has the thickness term); a per-pixel sigma map is not provided. +9. **Sigma on wt% and at%**: the per-spectrum `quantifyWithSigma` takes the typed thickness sigma (Cliff-Lorimer) and the dose relative sigma (zeta and cross section) as optional terms; the detector (take-off angle) is still exact there, and a per-pixel sigma map is not provided. 10. **k-factor import**: the table is taken in exSpy's convention (C_A/C_B = k_A/k_B I_A/I_B); a vendor table in the inverse convention is the caller's to invert. A real Velox export has not been read (none in the data folder); the layouts are the ones the task named. 11. **Auto ID, what 0.11.0 left**: the identification loop finds every true element on the three files; open: the method's overlap check (an element whose every peak sits under a modelled one leaves no residual peak and is not reported; the method reports diff --git a/docs/parity.md b/docs/parity.md index 0905ba8..c2c3df2 100644 --- a/docs/parity.md +++ b/docs/parity.md @@ -87,7 +87,7 @@ differ from raw SciPy where the CPU-dependent tie rule says so. 2. **The dielectric function** (`kramers_kronig_analysis`) and the EELS model on real data (no validation yet). 3. **EDS calibration and model operations**: `rebin`, `get_calibration_from`, `calibrate_xray_lines`, free/fix of line parameters, the public background-window parameters (`line_width`, `windows_width`, `integration_window_factor`), `vacuum_mask` (the mask is an input now). -4. **EDX fit accuracy on real Al alloys** (Mg K alpha about 300 counts low, Si 8.7 % low, sigma 5 to 12 % small; auto ID misses Mg in 37 of 38 +4. **EDX fit accuracy on real Al alloys** (Mg K alpha about 300 counts low, Si K alpha 20 % low against the whole planted peak on the simulated recipe-A pool (Si internal fluorescence below), sigma 5 to 12 % small; auto ID misses Mg in 37 of 38 Al-Mg-Si files): the diagnosis needs the pure-Al standard; `docs/open-items.md` carries the cause as far as it is known. 5. **The app-side `@testable` reach**: 0.9.0 opened `PooledQuantificationInput`'s fields and the window, segment and proposal initialisers; the next release opens `UnlistedLineCheck.Candidate` and `.Move` (fields and initialisers) and `UnlistedLineCheck.init` with its stored fields (SpectroKit#13). Nothing the apps reach stays `package`. @@ -147,7 +147,7 @@ differ from raw SciPy where the CPU-dependent tie rule says so. | `material.density_of_mixture` | none | missing | NO | useful | `test_material.py::test_density_of_mixture` allclose defaults | | | `utils.eds.electron_range`, `xray_range` | none | missing | NO | useful | `test_eds_sem.py::test_electron_range`, `test_xray_range` allclose defaults | | | (none) k-factor table import | `KFactorImport.parse`, `typedK`, `apply`, `cliffLorimerFactors` (public, 0.10.0) | partial | PART | study | none for the table; the convention is `quantification_cliff_lorimer`, tests atol 1e-3 on percent | SpectroEDXTests/KFactorImportTests (layouts, refusals by line); SpectroKitParityTests/KFactorImportPinsTests: the planted text in 4 layouts x 2 sets parses to exSpy's documented list `[1, 1.47, 1.72]` and to a second list, and drives the kit's Cliff-Lorimer to exSpy's own weight fractions (32 runs, difference 0.0; `tools/edx-kfactor-import/pins.py`). exSpy has no k table, so the parser itself is planted-text only | -| (none: neither HyperSpy nor eXSpy reports a sigma on a composition) sigma on wt% and at% | `EDXQuantification.quantifyWithSigma` (public, 0.10.0), `EDXQuantificationSigma` | present | NOPIN | study | none | SpectroEDXTests/QuantificationSigmaTests: Monte Carlo over seeded Poisson draws of a planted 3-element case, propagated against standard deviation within 5 % (measured worst: CL 1.0 %, CL with typed-k sigma 0.6 %, CL with absorption 1.7 %, zeta 1.2 %, cross section 1.5 %); two-element CL against the hand-derived sigma to 1e-6. First order; thickness, dose and detector exact | +| (none: neither HyperSpy nor eXSpy reports a sigma on a composition) sigma on wt% and at% | `EDXQuantification.quantifyWithSigma` (public, 0.10.0), `EDXQuantificationSigma` | present | NOPIN | study | none | SpectroEDXTests/QuantificationSigmaTests: Monte Carlo over seeded Poisson draws of a planted 3-element case, propagated against standard deviation within 5 % (measured worst: CL 1.0 %, CL with typed-k sigma 0.6 %, CL with absorption 1.7 %, zeta 1.2 %, cross section 1.5 %); two-element CL against the hand-derived sigma to 1e-6. First order. The typed film thickness (`thicknessSigmaNm:`, Cliff-Lorimer) and the dose (`doseRelativeSigma:`, zeta and cross section) add one ln-derivative term each, returned as `weightThicknessSigma`, `atomicThicknessSigma`, `weightDoseSigma`, `atomicDoseSigma` and inside `massThicknessSigma`; SpectroEDXTests/QuantificationSigmaCoverageTests draw the thickness (10 %) and dose (5 %) with their sigma on planted cases: 0.63 to 0.71 within 1 sigma and 0.93 to 0.97 within 2 sigma (before: down to 6 % and 13 %). The detector stays exact; no per-pixel sigma map | | (none) per-region quant result and report row | `RegionQuantResult.make`, `.csvHeader`, `.csvRow`, `.reportRow`, `.csvLongRows` (public, 0.10.0) | present | NOPIN | useful | none | SpectroEDXTests/RegionQuantResultTests: every number equals the pooled row; k, hash, absorption note, unlisted-line outcome, validation carried; Codable round trip; CSV rows line up with the headers | ### Model