OpenMPCD
|
Public Member Functions | |
def | __init__ (self) |
def | addData (self, data) |
def | getData (self) |
def | getOrderedData (self) |
def | keepOnlyEveryNthDataPoint (self, keepEveryNth) |
def | getMPLAxes (self, showStandardErrorOfTheMean=True, showStandardDeviation=0.3, singularSampleTreatment="raise", plotEveryNth=1) |
Represents a collection of instances of `OnTheFlyStatistics`.
Definition at line 7 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.__init__ | ( | self | ) |
The constructor.
Definition at line 13 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.addData | ( | self, | |
data | |||
) |
Adds the given data to the statistics in this instance. @param[in] data A dictionary, the values of which will be supplied to the instances of `OnTheFlyStatistics` stored at the respective keys. The values may either be integers or floating point values, or instances of `OnTheFlyStatistics`, in which case the underlying sample will be merged with the current state.
Definition at line 29 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.getData | ( | self | ) |
Returns the current dictionary of instances of `OnTheFlyStatistics`.
Definition at line 54 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.getMPLAxes | ( | self, | |
showStandardErrorOfTheMean = True , |
|||
showStandardDeviation = 0.3 , |
|||
singularSampleTreatment = "raise" , |
|||
plotEveryNth = 1 |
|||
) |
Returns an `matplotlib.axes.Axes` object that contains the current data. @throw ValueError Throws if both `showStandardErrorOfTheMean` and `showStandardDeviation` are of floating-point type. @param[in] showStandardErrorOfTheMean Whether to show, for each data point, the standard error of the mean using errorbars. Set to `False` to not show the information. Set to `True` to show the information as error bars. Set to a floating-point value between `0.0` and `1.0` (excluding `0.0`) to use a shaded area to show the information. @param[in] showStandardDeviation Whether to show the standard deviation as a shaded region around the data points. Set to `False` to not show the information. Set to `True` to show the information as error bars. Set to a floating-point value between `0.0` and `1.0` (excluding `0.0`) to use a shaded area to show the information. @param[in] singularSampleTreatment If neither `showStandardErrorOfTheMean` nor `showStandardDeviation` are `True`, this parameter has no effect. Otherwise, it controls whether an exception of type `RuntimeError` is to be raised if a data point consists of a sample of sample size `1`, in which case no error bars or standard deviations can be computed. To cause this behavior, pass the string `"raise"`. If the string `"discard"`, is passed, those data points are silently discarded. If the string `"warn"` is passed, a warning message is printed to the standard output stream if there are singular samples. The affected data points are assigned a standard deviation and standard error of the mean of `0`. If the string `"warnAndDiscard"` is passed, a warning message is printed to the standard output stream if there are singular samples. Those samples will be discarded. Other parameter values are not allowed in any case.
Definition at line 154 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.getOrderedData | ( | self | ) |
Returns the current instances of `OnTheFlyStatistics`, ordered by their key in an instance of `collections.OrderedDict`. The returned value can be freely altered, without changing the state of this instance.
Definition at line 67 of file OnTheFlyStatisticsCollection.py.
def MPCDAnalysis.OnTheFlyStatisticsCollection.OnTheFlyStatisticsCollection.keepOnlyEveryNthDataPoint | ( | self, | |
keepEveryNth | |||
) |
Keeps only every `keepEveryNth` data point, and discards the rest. @param[in] keepEveryNth Set to any integer value greater than `1` to discard `keepEveryNth - 1` data points between data points that are kept. Setting this to `1` amounts to not changing this instance at all.
Definition at line 89 of file OnTheFlyStatisticsCollection.py.