Skip to content

Extend cross-engine verification suite with FullProf references#196

Merged
AndrewSazonov merged 115 commits into
developfrom
more-validation-notebooks
Jun 8, 2026
Merged

Extend cross-engine verification suite with FullProf references#196
AndrewSazonov merged 115 commits into
developfrom
more-validation-notebooks

Conversation

@AndrewSazonov

Copy link
Copy Markdown
Member

Expands the verification pages that check each calculation engine (cryspy, crysfml) against an independent FullProf reference.

AndrewSazonov and others added 27 commits June 8, 2026 13:12
Drop peak-normalisation in pattern_closeness: metrics are computed on
absolute intensities so a seeded FullProf scale gives a real scale
comparison. Rename max_deviation -> max_deviation_percent, make the
intensity ratio the absolute area ratio, relabel it "Area ratio" and
correlation "Shape correlation" to mark the scale vs shape axes, and
tighten the default tolerances. Remove the scale_to_reference and
report_reference_scales helpers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop peak-normalisation in plot_calc_comparison and
plot_reflection_comparison so the overlay and the F-squared scatter show
the true absolute scale; remove the now-unused _peak_normalized helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename the max_deviation field, flip the scale-independence test to
assert the metrics now reflect absolute scale, and update the tolerance
defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seed each page with the FullProf .pcr scale and compare on absolute
intensities; annotate every input with its FullProf parameter name.
Where an engine then disagrees, add a per-engine refinement that frees
the differing parameter (asymmetry on asym-PbSO4, the Lorentzian gamma
and scale on Si, scale on NCAF and Pr2NiO4) and reports the before/after
closeness. Point lab6 at the new background-free FullProf .sub, keep its
SyCos/SySin lines ready to uncomment, and skip NCAF in CI while its TOF
scale convention is refined.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reconstruct the x grid from the number of intensities rather than the
header maximum, so a maximum rounded a fraction of a step off (a common
FullProf quirk, hit by the Jorgensen Si .sub) no longer adds a spurious
point; keep the header maximum as a one-step sanity check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verify the plain Jorgensen TOF profile (Gaussian plus back-to-back
exponentials, no Lorentzian) for Si against FullProf. Both engines
diverge from FullProf's Jorgensen shape, so the page seeds the .pcr
scale, reports the absolute comparison, and refines the broadening terms
and scale with cryspy to quantify the residual. Skipped in CI like the
other report-only TOF pages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Return nothing so a notebook cell ending in the call shows only the
rendered before/after table, not an echoed metrics tuple; callers that
need the numbers use pattern_closeness directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mark the verification pages listed in ci_skip.txt as xfail(strict=False)
instead of skip, so nbmake still executes them — they render in the docs
and --overwrite writes their outputs — while a known discrepancy or
pending-feature page stays an expected failure rather than a suite
failure. The script-test runner still skips them as the fast regression
check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Give every page the same cell order and section headers, move project
creation into its own cell, drop the asym Conclusion cell, normalise the
FullProf comment spacing, and correct the ncaf/asym descriptions (they
are investigation pages, not script-test regression checks). Parameter
values are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AndrewSazonov AndrewSazonov added the [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) label Jun 8, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.66%. Comparing base (28e4179) to head (9fb0ed2).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #196      +/-   ##
===========================================
- Coverage    90.89%   90.66%   -0.23%     
===========================================
  Files          264      265       +1     
  Lines        22225    22494     +269     
  Branches      2587     2612      +25     
===========================================
+ Hits         20201    20394     +193     
- Misses        1507     1577      +70     
- Partials       517      523       +6     
Flag Coverage Δ
unittests 90.66% <ø> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easydiffraction/analysis/verification.py 89.71% <ø> (ø)
src/easydiffraction/display/plotters/base.py 96.96% <ø> (+0.04%) ⬆️
src/easydiffraction/display/plotters/plotly.py 94.03% <ø> (-2.29%) ⬇️
src/easydiffraction/display/plotting.py 90.24% <ø> (-1.18%) ⬇️
src/easydiffraction/project/display.py 97.10% <ø> (-2.90%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AndrewSazonov AndrewSazonov merged commit 2a6c0e1 into develop Jun 8, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant