armi.utils.reportPlotting module¶
Plotting Utils specific to reports.
This module makes heavy use of matplotlib. Beware that plots generated with matplotlib may not free their memory, even after the plot is closed, and excessive use of plotting functions may gobble up all of your machine’s memory.
Therefore, you should use these plotting tools judiciously. It is not advisable to, for instance, plot some sequence of objects in a loop at every time node. If you start to see your memory usage grow inexplicably, you should question any plots that you are generating.
- armi.utils.reportPlotting.plotReactorPerformance(reactor, dbi, buGroups, extension=None, history=None)[source]¶
Generates a set of plots useful in reactor analysis given a populated reactor.
- Parameters
reactor (armi.reactor.reactors.Reactor) – The reactor to plot
dbi (armi.bookkeeping.db.DatabaseInterface) – The DatabaseInterface object from which to pull historical data
buGroups (list of float) – The burnup groups in the problem
extension (str, optional) – The file extention for saving plots
history (armi.bookkeeping.historyTracker.HistoryTrackerInterface object) – The history tracker interface
- armi.utils.reportPlotting.valueVsTime(name, x, y, key, yaxis, title, ymin=None, extension=None)[source]¶
Plots a value vs. time with a standard graph format.
- Parameters
name (str) – Reactor.name
x (iterable) – The x-axis values (the abscissa)
y (iterable) – The y-axis values (the ordinate)
key (str) – A key word to add the item to the report interface
yaxis (str) – The y axis label
title (str) – the plot title
ymin (str, optional) – The minimum y-axis value. If any ordinates are less than this value, it will be ignored.
extension (str, optional) – The file extention for saving the figure
- armi.utils.reportPlotting.keffVsTime(name, time, keff, keffUnc=None, ymin=None, extension=None)[source]¶
Plots core keff vs. time.
- Parameters
- armi.utils.reportPlotting.buVsTime(name, scalars, extension=None)[source]¶
produces a burnup and DPA vs. time plot for this case.
Will add a second axis containing DPA if the scalar column maxDPA exists.
- armi.utils.reportPlotting.xsHistoryVsTime(name, history, buGroups, extension=None)[source]¶
Plot cross section history vs. time.
- armi.utils.reportPlotting.movesVsCycle(name, scalars, extension=None)[source]¶
make a bar chart showing the number of moves per cycle in the full core.
A move is defined as an assembly being picked up, moved, and put down. So if two assemblies are swapped, that is 2 moves. Note that it does not count temporary storage for such swaps. This is an approximation because in a chain of moves, only one out of the chain would have to be temporarily stored. So as the chains get longer, this approximation gets more accurate.
- Parameters
See also
FuelHandler.outage
sets the number of moves in each cycle
- armi.utils.reportPlotting.plotCoreOverviewRadar(reactors, reactorNames=None)[source]¶
Plot key features of a set of reactors on radar/spider plots.
Useful for comparing reactors to one another.
- armi.utils.reportPlotting.createPlotMetaData(title, xLabel, yLabel, xMajorTicks=None, yMajorTicks=None, legendLabels=None)[source]¶
Create plot metadata (title, labels, ticks).
- Parameters
title (str) – Plot title
xLabel (str) – x-axis label
yLabel (str) – y-axis label
xMajorTicks (list of float) – List of axial position at which to insert major ticks
yMajorTicks (list of float) – List of axial position at which to insert major ticks
legendsLabels (list of str) – Labels to used in the plot legend
- Returns
metadata – Dictionary with all plot metadata information
- Return type
- armi.utils.reportPlotting.plotAxialProfile(zVals, dataVals, fName, metadata, nPlot=1, yLog=False)[source]¶
Plot the axial profile of quantity zVals.
- Parameters
zVals (list of float) – Axial position of the quantity to be plotted
dataVals (list of float) – Axial quantity to be plotted
fName (str) – The file name for the plot image file.
metadata (bool) – Metadata (title, labels, legends, ticks)
nPlot (int) – Number of plots to be generated
yLog (bool) – Boolean flag indicating that y-axis is to be plotted on a log scale.