Nn corpora - #15
Merged
Merged
Conversation
…umns
is_match normalized EXFOR's -3000 natural-target sentinel for the target but not
for the residual, so the elastic check residual == reaction.target compared
(-3000, Z) against (0, Z) and every natural-abundance elastic data set failed to
match. This silently dropped a large fraction of natural-target data.
parse_differential_data and parse_energy_dependent_xs refused any subentry with
a repeated error label ("Expected only one DATA-ERR column"). A label repeats
legitimately: some subentries carry two DATA-ERR columns, one in per-cent and
one absolute, each mostly null, which together make up the uncertainty. Each
occurrence is now taken in turn, and determine_error_categories collects them
all, so the default quadrature combination merges them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LSfNX9V6VEYiSsSmaJPyq5
quantity_matches accepted only "POL/DA,ANA" for Ay, so data tabulated as a bare "POL/DA" (the outgoing-particle polarization, equal to the analyzing power for elastic scattering by time-reversal invariance) or as "POL/DA,ASY" (the measured asymmetry) were never matched. Older entries use both forms; recognising them raises KDUQ proton analyzing power coverage from 51% to 79%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSfNX9V6VEYiSsSmaJPyq5
EXFOR qualifies the differential cross section in ways that do not change what the observable is: "AV" is averaged over an energy interval, "DERIV" is derived rather than tabulated directly, and "EXL" and "DI"/"MSC" appear on data whose reaction string is plain elastic scattering or scattering with an unresolved low-lying level - the "pseudo-elastic" case the KDUQ notes describe as having been analyzed as elastic. Likewise "SIG,AV" for the total cross section. None of these were matched, so the data sets carrying them were dropped. The reaction match still requires the right target, projectile and process. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSfNX9V6VEYiSsSmaJPyq5
EXFOR writes some level-resolved measurements as (n,SCT) with the level in an E-LVL column, rather than splitting them into (n,EL) and (n,INL). is_match rejected these outright, so the elastic channel of such a data set was unreachable. SCT now satisfies a query for EL, leaving the excitation-energy filter to select the ground state; callers wanting only elastic pass elastic_only=True, which forces Ex_range to (0, 0). Raises Test corpus neutron elastic coverage from 75% to 99.5%. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSfNX9V6VEYiSsSmaJPyq5
The EXFOR dictionary defines SCT as "Total scattering (elastic + inelastic)". Summed, that is a different observable from elastic scattering and must not satisfy a query for it. The previous commit accepted SCT unconditionally, which happened to be safe against the current database - every such data set the corpora reach is resolved by an E-LVL or LVL-NUMB column - but would silently admit summed data if EXFOR added any. SCT now matches an elastic query only for level-resolved data, where the excitation-energy filter can select the ground state. Also corrects the quantity-modifier comment against the dictionary: DI is the direct-interaction part and MSC flags an approximate reaction code, rather than both denoting a "pseudo-elastic" sum. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSfNX9V6VEYiSsSmaJPyq5
The SSH URL requires a key on file, which breaks 'git clone --recurse-submodules' for anyone without push access and for CI runners. Claude-Session: https://claude.ai/code/session_01RhxcrnjrJXFSncVyYfkQkP
beykyle
commented
Aug 27, 2026
beykyle
left a comment
Owner
Author
There was a problem hiding this comment.
- fixes a bug in recording failed parses (subentry over-writes)
- fixes a bug in which only one column is taken when labels repeat
- adds support for parsing processes with niche EXFOR process tags like
SCTwhich are actually elastic (e.g. by verifying byLVL-NUMorEXetc.) - handles nat targets
- switches to https submodule so recursive cloning is ok
is_level_resolved returned True for E-LVL-MAX, E-EXC-MAX and E-EXC-MX-A as well, since each contains E-LVL or E-EXC as a substring. Those columns bound the excitation rather than resolving it: the data set is summed over every level below the bound. Fourteen of the twenty-two (n,SCT) subentries the published corpora place in elastic sectors are of this kind, with bounds from 30 keV on 93Nb up to 800 keV, so admitting them is intended -- but it was accidental, and the name claimed the opposite. No behaviour changes. The predicate is renamed specifies_excitation, and both it and the SCT branch of is_match now say that a bound is not a resolution. Claude-Session: https://claude.ai/code/session_01RhxcrnjrJXFSncVyYfkQkP
Two effects, both intended. 239Pu 21782031 is (n,SCT) tabulated against E-LVL-MIN 0 to E-LVL-MAX 7.85 keV; it now satisfies an elastic query, as the range-bounded scattering data sets in the published corpora do, so the entry picks up sixteen angles from 20 degrees instead of ten from 70. And print_failed_parses now lists every failed subentry of an entry rather than only the last one recorded, so the O0253 failures appear in full. Verified with 'pytest --nbval-lax examples/examples_2023_release/': 102 passed. Claude-Session: https://claude.ai/code/session_01RhxcrnjrJXFSncVyYfkQkP
beykyle
commented
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Further updates needed for full parsing of KDUQ, CHUQ and test corpora from supplemental material of Pruitt et al