Skip to content

Ensuring unit consistency in ALARAPlot - #331

Open
eitan-weinstein wants to merge 1 commit into
svalinn:mainfrom
eitan-weinstein:unit_consistency_check
Open

eitan-weinstein wants to merge 1 commit into
svalinn:mainfrom
eitan-weinstein:unit_consistency_check

Conversation

@eitan-weinstein

Copy link
Copy Markdown
Contributor

This PR introduces a small function get_var_unit() to alara_output_plotting that ensures that all units for a single-variable ALARADFrame are the same. This will either raise a ValueError if they are not, or return the singular unit type. Additionally, in its implementation, each filtered_adf is concatenated to an accumulated ADF used for cross-checking singular unit compliance across data from all runs in a single plot.

While I have not run into any issues of mismatching units, this fix seemed to me like a valuable defensive measure.

Part of the #328 changes.

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.

1 participant