Skip to content

Nn corpora - #15

Merged
beykyle merged 8 commits into
mainfrom
nn-corpora
Aug 28, 2026
Merged

Nn corpora#15
beykyle merged 8 commits into
mainfrom
nn-corpora

Conversation

@beykyle

@beykyle beykyle commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Further updates needed for full parsing of KDUQ, CHUQ and test corpora from supplemental material of Pruitt et al

beykyle and others added 6 commits August 25, 2026 22:58
…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 beykyle left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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 SCT which are actually elastic (e.g. by verifying by LVL-NUM or EX etc.)
  • 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 beykyle left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • updates nb outputs consistent with prev reviewed commits
  • and adds some inline descriptive comments related to the 'SCT' reaction label

@beykyle
beykyle merged commit c623ddd into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant