alaraplot shading for dominant nuclide contributions to single response plots#278
alaraplot shading for dominant nuclide contributions to single response plots#278eitan-weinstein wants to merge 8 commits into
Conversation
89ec723 to
8144371
Compare
gonuke
left a comment
There was a problem hiding this comment.
This looks like a nice features - just a couple of questions for now...
a81c3c6 to
f6498d1
Compare
gonuke
left a comment
There was a problem hiding this comment.
Just trying to simplify things a little more.
Also - is it too much to plot dominance ranges for multiple run labels on the same plot? They overlap each other and are hard to see.
| bounds[i], | ||
| bounds[i + 1], |
There was a problem hiding this comment.
This doesn't seem to take advantage of the work you did to build these dominance ranges, especially since you just throw them away. I think these data structures are more complicated than they need to be.
Related, I'm not sure how you assign alpha when you have multiple adjacent regions that are dominated by the same nuclide, but with different values of dominance. If they are treated as separate regions, then maybe you don't actually need to build the dominance_ranges at all?
| for i, (nuc, dominance) in enumerate(zip(dominant_nucs, relative_max)): | ||
| for _ in dominance_ranges[nuc]: | ||
| ax.axvspan( | ||
| bounds[i], | ||
| bounds[i + 1], | ||
| color=color_map[nuc], | ||
| # Shading transparency as an inverse function of the relative | ||
| # contribution of the dominant nuclide | ||
| alpha=0.2 * dominance, | ||
| linewidth=0, | ||
| label=None | ||
| ) |
There was a problem hiding this comment.
I don't think you need to care about dominance_ranges in this loop - I'd recommend:
| for i, (nuc, dominance) in enumerate(zip(dominant_nucs, relative_max)): | |
| for _ in dominance_ranges[nuc]: | |
| ax.axvspan( | |
| bounds[i], | |
| bounds[i + 1], | |
| color=color_map[nuc], | |
| # Shading transparency as an inverse function of the relative | |
| # contribution of the dominant nuclide | |
| alpha=0.2 * dominance, | |
| linewidth=0, | |
| label=None | |
| ) | |
| for lower, upper, nuc, dominance in zip(bounds[:-1], bounds[1:], dominanct_nucs, relative_max): | |
| ax.axvspan( | |
| lower, | |
| upper, | |
| color=color_map[nuc], | |
| # Shading transparency as an inverse function of the relative | |
| # contribution of the dominant nuclide | |
| alpha=0.2 * dominance, | |
| linewidth=0, | |
| label=None | |
| ) |
This PR introduces new functionality to
tools/alara_output_processing/alara_output_plotting.plot_single_response()to shade regions of a decay response vs time plot to indicate the dominant nuclide contributor at those times and the relative dominance of said contribution. An example for the comparison of the Total Specific Activity vs Time for the irradiation of elemental iron between ALARA with TENDL-2017 cross-sections, ALARA with EAF-2010 cross-sections, and FISPACT-II with TENDL-2017 cross-sections looks like this:The darkness of the shading of a region corresponds to the proportion of the total response contributed by the dominant nuclide, with a higher proportion leading to a less transparent shading. Furthermore, if multiple runs are plotted comparatively, the shading is cumulative, so darker regions can also indicate agreement between runs.
I figured an addition like this would be helpful to include in our plotting module, especially to make "total" plots more informative in showing which nuclides are most prominent across cooling times.