mctools / ncrystal

NCrystal : a library for thermal neutron transport in crystals and other materials
https://mctools.github.io/ncrystal/
Other
41 stars 18 forks source link

Test cross section curves w.r.t. references. #197

Open tkittel opened 2 months ago

tkittel commented 2 months ago

It would be super useful with a test which would (for all materials most likely) compare cross section curves with a reference, and only fail if they changed by more than some low tolerance (e.g. 1e-7). However, it would hopefully be easy to maintain since it should report:

  1. Any missing or new files.
  2. The difference for each file, as well as the worst difference seen.
  3. Also investigate per-component (e.g. inelastic, coh_elas, ...).

So when we would update something and expect small differences, it would be trivial to quickly look at the summary of changes, verify they are meaningful (possibly with a utility to show the plot differences), and ultimately run a script to update the values.

This would be both a great test, and easy to maintain with fewer false positives in failures.

tkittel commented 2 months ago

Scatter sampling would be harder, but those should be covered by making our MiniMC-based tests portable and apply them more widely.