Skip to content

Parse charge-exchange polarization data resolved to a level - #16

Merged
beykyle merged 1 commit into
mainfrom
fix-pn-polarization-parsing
Sep 24, 2026
Merged

beykyle merged 1 commit into
mainfrom
fix-pn-polarization-parsing

Conversation

@beykyle

@beykyle beykyle commented Sep 24, 2026

Copy link
Copy Markdown
Owner

EXFOR writes a quasi-elastic (p,n) measurement to the isobaric analog state with the PAR qualifier and a named residual, e.g.
49-TI-49(P,N)23-V-49,PAR,POL/DA,,ANA. Three things stopped that from parsing.

quantity_matches listed PAR variants for dXS/dA but not for the polarization quantities or for XS, so every such subentry was skipped and ExforEntry came back with an empty measurement list and no diagnostic.

is_match called reaction.process.upper() on the path where the caller gave neither a residual nor a process, which is reachable from any product-form Reaction, and raised AttributeError instead of reporting a mismatch.

Reaction rejected a process given together with a residual, although is_match handles that combination and str already formatted it. The process branch now appends the residual to reaction_string and reaction_latex the way the product branch does.

Adds a test module covering entry O0669 (Gosset, Mayer and Escudie, Phys. Rev. C 14, 878 (1976)): all nine targets parse as Ay angular distributions in CM degrees at 22.8 MeV with the analog-state excitation energies of Table I.

EXFOR writes a quasi-elastic (p,n) measurement to the isobaric analog state
with the PAR qualifier and a named residual, e.g.
49-TI-49(P,N)23-V-49,PAR,POL/DA,,ANA. Three things stopped that from parsing.

quantity_matches listed PAR variants for dXS/dA but not for the polarization
quantities or for XS, so every such subentry was skipped and ExforEntry came
back with an empty measurement list and no diagnostic.

is_match called reaction.process.upper() on the path where the caller gave
neither a residual nor a process, which is reachable from any product-form
Reaction, and raised AttributeError instead of reporting a mismatch.

Reaction rejected a process given together with a residual, although is_match
handles that combination and __str__ already formatted it. The process branch
now appends the residual to reaction_string and reaction_latex the way the
product branch does.

Adds a test module covering entry O0669 (Gosset, Mayer and Escudie, Phys.
Rev. C 14, 878 (1976)): all nine targets parse as Ay angular distributions in
CM degrees at 22.8 MeV with the analog-state excitation energies of Table I.
@beykyle
beykyle merged commit 5179900 into main Sep 24, 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