-
Notifications
You must be signed in to change notification settings - Fork 24
Comparison Tool Part 5: Relative Plots #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7683869 to
1622242
Compare
tools/alara_output_processing.py
Outdated
| df.columns = [c.replace('_', '') for c in df.columns] | ||
| key = f'{current_parameter} - {current_block}' | ||
| self.results[key] = adf | ||
| self.results[key] = ALARADFrame(df) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was creating the relative_contributions() function, it was running into issues with the column operations from this method, but worked fine if I executed line 72 on a DataFrame, rather than an ALARADFrame. I'm not sure exactly why this is the case, but as far as the output from `_parse_table_data() is concerned, converting the DataFrame to an ALARADFrame after its initialization is all the same, and it appeared to be necessary for proper column operations.
0b62e5c to
0e5f7bd
Compare
Follow up to #145.
This PR introduces a function
relative_contributions()toalarajoy_QA.pythat converts each cell to it's relative contribution to the total at each time. In the Jupyter notebook, this function is used prior to plotting again withplot_single_response(), with additional parameters specified for it being a relative plot, to expand the individual time slices represented in the pie charts to a cohesive view of a single variable's nuclide responses over time.