nook.compare¶
Cross-source comparison: levels and masses where the backends overlap.
Two questions this module answers:
levels()– RIPL’s discrete levels derive from ENSDF, so matching a RIPL scheme against an ENSDF one (or Livechart’s adopted levels) checks a parsing chain end to end, and the disagreements that remain are real: levels RIPL dropped, spins RIPL invented, and the two completeness cutoffs – RIPL’s evaluatedNmaxagainst the heuristiccomplete_up_to().masses()– the same nuclide’s mass excess across evaluations: AME via Livechart, Audi-as-shipped via RIPL, and the FRDM95/HFB-14 theory values.sigma_betweensays whether two experimental values actually disagree; theory-minus-experiment is a model residual, not a discrepancy.
Level matching is energy-sorted greedy nearest-neighbour, one-to-one,
within max(tolerance_kev, 3 * combined sigma). Ground states always
match each other.
- class nook.compare.LevelMatch(a, b, delta_kev, combined_sigma_kev, jpi_agree)[source]¶
Bases:
objectOne matched pair of levels.
- class nook.compare.LevelComparison(nuclide: 'Nuclide', source_a: 'str', source_b: 'str', matched: 'tuple[LevelMatch, ...]', only_a: 'tuple[Level, ...]', only_b: 'tuple[Level, ...]', cutoff_a: 'int | None' = None, cutoff_b: 'int | None' = None)[source]¶
Bases:
object- matched: tuple[LevelMatch, ...]¶
- nook.compare.levels(nuclide, sources=('file', 'ripl3'), below=None, tolerance_kev=2.0, path=None, ripl_path=None, cache=None)[source]¶
Match one nuclide’s level scheme across two sources.
sourcesnames any two of"file","ripl3","livechart".belowtruncates both schemes first; floating (offset) levels are dropped because their absolute position is undefined.
- class nook.compare.MassComparison(nuclide, entries=<factory>)[source]¶
Bases:
objectOne nuclide’s mass excess across evaluations, keV.
entrieskeys:"ame-livechart","ripl-exp"(experimental) and"frdm95","hfb14"(theory).