Comparison Tool Part 5: Relative Plots#146
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.
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
944511e to
eb6ec3b
Compare
|
I only see changes in the Jupyter Notebook here... is that the intent? |
Yes. All of the actual plotting functionality already existed for this in previous PRs, this is just the example implementation in the notebook. |
gonuke
left a comment
There was a problem hiding this comment.
Not closely reviewing notebook changes...
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.