mcsas3.mcmodel.McModel#

class mcsas3.mcmodel.McModel(loadFromFile: Path | None = None, loadFromRepetition: int | None = None, resultIndex: int = 1, **kwargs: dict)[source]#

Bases: object

Specifies the fit parameter details and contains random pickers. Configuration can be alternatively loaded from an existing result file.

Parameters:
  • fitParameterLimits (dict of value pairs {“param1”: (lower, upper), … }) – for fit parameters

  • staticParameters (dict of parameter-value pairs {“param2”: value, …}) – to keep static during the fit

  • seed – random number generator seed, should vary for parallel execution

  • nContrib – number of individual SasModel contributions from which the total model intensity is calculated

  • modelName – SasModels model name to load, default ‘sphere’

  • OR (alternatively:)

  • loadFromFile (str) – A filename from a previous optimization that contains the required settings

  • loadFromRepetition (int) – If the filename is specified, load the parameters from this particular repetition

__init__(loadFromFile: Path | None = None, loadFromRepetition: int | None = None, resultIndex: int = 1, **kwargs: dict) None[source]#

Methods

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

availableModels()

calcModelIV(parameters)

checkSettings()

fitKeys()

generateRandomParameterValues()

to be depreciated as soon as models can generate their own...

load(loadFromFile, loadFromRepetition)

loads a preset set of contributions from a previous optimization, stored in HDF5 nContrib is reset to the length of the previous optimization.

loadMcsasSphereModel()

loadModel()

loadSimModel()

modelExists()

pick()

pick new random model parameter

resetParameterSet()

fills the model parameter values with random values

showModelParameters()

store(filename, repetition)

Attributes

fitParameterLimits

func

modelDType

modelName

nContrib

parameterSet

pickIndex

pickParameters

randomGenerators

seed

settables

staticParameters

volumes

generateRandomParameterValues() None[source]#

to be depreciated as soon as models can generate their own…

kernel#

alias of object

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

loads a preset set of contributions from a previous optimization, stored in HDF5 nContrib is reset to the length of the previous optimization.

pick() None[source]#

pick new random model parameter

resetParameterSet() None[source]#

fills the model parameter values with random values