Skip to content

Conversation

@eitan-weinstein
Copy link
Contributor

Follow up to #145.

This PR introduces a function relative_contributions() to alarajoy_QA.py that 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 with plot_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.

df.columns = [c.replace('_', '') for c in df.columns]
key = f'{current_parameter} - {current_block}'
self.results[key] = adf
self.results[key] = ALARADFrame(df)
Copy link
Contributor Author

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.

@eitan-weinstein eitan-weinstein marked this pull request as draft December 1, 2025 22:28
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.

2 participants