mcsas3.mcmodelhistogrammer.McModelHistogrammer#

class mcsas3.mcmodelhistogrammer.McModelHistogrammer(coreInstance: McCore, histRanges: pandas.DataFrame, resultIndex: int = 1)[source]#

Bases: object

This class takes care of the analysis of an optimized model instance parameters. That means it histograms the result based on the histogram range settings, and calculates the five population modes. These are not weighted by the scaling factor, and exist therefore in non-absolute units. Contribution weighting is assumed to be 0.5, i.e. volume-weighted.

McModelHistogrammer is calculated for every repetition individually.

Besides this class, there will be an McAnalysis class that combines the results from McModelHistogrammer (and calculates the resulting mean and standard deviations), its optimization-instance parameters, and calculates the observability limits.

McModelHistogrammer is expected to be called from other routines, and so only minimal input-checking is done.

histRanges argument should contain the following keys:
  • parameter: name of the parameter to histogram - must be a fitparameter (is checked)

  • autoRange: Boolean which will use fitparameterlimits to define histogram width,

    overrides presetRange

  • presetRangeMin: a min value that defines the histogram lower limit

  • presetRangeMax: a max value that defines the histogram upper limit

  • nBins: the number of bins to divide into

  • binScale: “linear” or “log”

  • binWeighting: “vol” implemented only. Future options: “num”, “volsqr”, “surf”

The histogrammer and McAnalysis classes can be run independent from the optimization procedure, to allow re-histogramming using different settings without needing re- optimisation (like our original McSAS did).

__init__(coreInstance: McCore, histRanges: pandas.DataFrame, resultIndex: int = 1) None[source]#

Methods

__init__(coreInstance, histRanges[, resultIndex])

debugPlot(histIndex)

Plots a single histogram, for debugging purposes only, can only be done after histogramming is complete.

genX(histRange, parameterSet, volumes)

Generates bin edges

histogram(histRange, histIndex)

histograms the data into an individual range

modes(histRange, histIndex)

store(filename, repetition)

debugPlot(histIndex: int) None[source]#

Plots a single histogram, for debugging purposes only, can only be done after histogramming is complete.

genX(histRange: pandas.DataFrame, parameterSet: pandas.DataFrame, volumes: ndarray) ndarray[source]#

Generates bin edges

histogram(histRange: pandas.DataFrame, histIndex: int) None[source]#

histograms the data into an individual range