Skip to content

Calculating XS ratio statistics - #327

Merged
gonuke merged 5 commits into
svalinn:mainfrom
eitan-weinstein:xs_relative_stats
Oct 14, 2026
Merged

gonuke merged 5 commits into
svalinn:mainfrom
eitan-weinstein:xs_relative_stats

Conversation

@eitan-weinstein

Copy link
Copy Markdown
Contributor

Follows #307.

This PR updates the function xs_plotting.plot_relative_group_xs() to calculate the mean and standard deviation of every plotted ratio series using np.nanmean() or np.nanstd() respectively (to account for regions in which the control series may be zero). These values are included both in the legend of the ratio plots, akin to the approach in alara_output_processing/alara_output_plotting.py, while also saving all statistics to a DataFrame corresponding to each ratio plot produced that is saved as a CSV upon the completion of the script.

@gonuke gonuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just one quick clarification...

Comment thread tools/ALARAJOYWrapper/xs_plotting.py Outdated
Comment on lines +170 to +173
reference_group (str): Group name of the reference group against which
to divide other group structures' cross-sections. Will be an empty
string if none of the provided DSV paths in `dsv_list` contain a
'(reference)' tag in the string (i.e. example.dsv (reference)).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this actually get returned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope, good catch. That was a holdover from before the rebase

@gonuke gonuke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good - thanks @eitan-weinstein

@gonuke
gonuke merged commit cdd1eca into svalinn:main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants