Repository navigation
Pairing xs_plotting with flux data to plot radiation environment-specific reaction rates - #335
Conversation
e4b5e1d to
11d9b11
Compare
|
This needs a rebase from the recently merged PR on plotting |
11d9b11 to
ace4673
Compare
gonuke
left a comment
There was a problem hiding this comment.
A couple of little clarifications...
| if ratio_plotting: | ||
| nuc_dir /= 'ratio_plots' | ||
| ratio_suffix ='_ratios' | ||
| stem_suffix ='_ratios' |
There was a problem hiding this comment.
This overwrites the previous suffix - does this mean you can't use reaction_rates with ratio_plotting?
| if not isinstance(fluxes, np.ndarray): | ||
| fluxes = np.asarray(fluxes, dtype=float) |
There was a problem hiding this comment.
Do this once outside of the loop
|
|
||
| if ratio_plotting: | ||
| ylabel = 'Ratio of Cross-Sections' | ||
| ylabel = f'Ratio of {ylabel}'.split(' [')[0] + 's' |
There was a problem hiding this comment.
again, are reaction_rates incompatible with ratio_plotting. If so, this may be better as an else if
There was a problem hiding this comment.
That's a good catch. In principle, there's no reason that they should be incompatible. On the contrary, to the same extent that ratio plotting could be useful for cross-section plots, so too could they be for reaction rate plots. I'll update accordingly.
gonuke
left a comment
There was a problem hiding this comment.
I think one extra flux multiplication crept in during the last update.
| if _is_rxn_rate(fluxes): | ||
| values = _xs_to_rxn_rate(values, fluxes) |
There was a problem hiding this comment.
If this is a reaction rate ratio, then I don't think you want to multiply by fluxes. Both the numerator and denominator of the ratio should be multiplied by the flux, thus cancelling out.
There was a problem hiding this comment.
Good catch, I'll fix that
gonuke
left a comment
There was a problem hiding this comment.
LGTM - thanks @eitan-weinstein
Follows #307.
This PR updates
xs_plotting.pyto include the functionality to read in groupwise fluxes and multiply them by their associated cross-sections to produce per-nucleus reaction rates. This can be a helpful tool in assessing more specifically the effect of a cross-section distribution as it relates to a given neutron irradiation environment.