Skip to content

Comparison Tool Part 5: Relative Plots#146

Merged
gonuke merged 2 commits intosvalinn:mainfrom
eitan-weinstein:relative_plots
Jan 13, 2026
Merged

Comparison Tool Part 5: Relative Plots#146
gonuke merged 2 commits intosvalinn:mainfrom
eitan-weinstein:relative_plots

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
@eitan-weinstein eitan-weinstein marked this pull request as ready for review January 13, 2026 14:45
@gonuke
Copy link
Member

gonuke commented Jan 13, 2026

I only see changes in the Jupyter Notebook here... is that the intent?

@eitan-weinstein
Copy link
Contributor Author

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.

Copy link
Member

@gonuke gonuke left a comment

Choose a reason for hiding this comment

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

Not closely reviewing notebook changes...

@gonuke gonuke merged commit a0b5708 into svalinn:main Jan 13, 2026
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