mcsas3.mccore.McCore#

class mcsas3.mccore.McCore(measData: dict | None = None, model: McModel | None = None, opt: McOpt | None = None, loadFromFile: Path | None = None, loadFromRepetition: int | None = None, resultIndex: int = 1)[source]#

Bases: object

The core of the MC procedure.

Parameters:
  • modelFunc – SasModels function

  • measData (dict) – measurement data dictionary with Q, I, ISigma containing arrays. For 2D data, Q is a two-element list with [Qx, Qy]. This is why it’s not a Pandas Dataframe.

  • pickParameters (dict) – dict of values with new random picks, named by parameter names

  • modelParameterLimits (dict) – dict of value pairs (tuples) with random pick bounds, named by parameter names

  • x0 – continually updated new guess for total scaling, background values.

  • weighting – volume-weighting / compensation factor for the contributions

  • nContrib – number of contributions

__init__(measData: dict | None = None, model: McModel | None = None, opt: McOpt | None = None, loadFromFile: Path | None = None, loadFromRepetition: int | None = None, resultIndex: int = 1)[source]#

Methods

__init__([measData, model, opt, ...])

accept()

accept pick

contribIndex()

evaluate([testData])

scale and calculate goodness-of-fit (GOF) from all contributions

initModelI()

calculate the total intensity from all contributions

iterate()

pick, re-evaluate and accept/reject

load(loadFromFile, loadFromRepetition[, ...])

loads the configuration and set-up from the extended NXcanSAS file

optimize()

iterate until target GOF or maxiter reached

reEvaluate()

replace single contribution with new contribution, recalculate intensity and GOF

reject()

reject pick

store(filename)

stores the resulting model parameter-set of a single repetition in the NXcanSAS object, ready for histogramming

accept() None[source]#

accept pick

evaluate(testData: dict | None = None) float[source]#

scale and calculate goodness-of-fit (GOF) from all contributions

initModelI() None[source]#

calculate the total intensity from all contributions

iterate() None[source]#

pick, re-evaluate and accept/reject

load(loadFromFile: Path, loadFromRepetition: int, resultIndex: int = 1) None[source]#

loads the configuration and set-up from the extended NXcanSAS file

optimize() None[source]#

iterate until target GOF or maxiter reached

reEvaluate() float[source]#

replace single contribution with new contribution, recalculate intensity and GOF

reject() None[source]#

reject pick

store(filename: Path) None[source]#

stores the resulting model parameter-set of a single repetition in the NXcanSAS object, ready for histogramming