BaseModel

sans.models.BaseModel

Provide base functionality for all model components

The following has changed since going from BaseComponent to BaseModel:

  • Arithmetic operation between models is no longer supported. It was found to be of little use and not very flexible.
  • Parameters are now stored as Parameter object to provide the necessary extra information like limits, units, etc...
class sans.models.BaseModel.BaseModel

Bases: sans.models.ModelAdaptor.ModelAdaptor

Basic model component

__add__()
__call__()

Evaluate the model. Equivalent to runXY(x)

Parameters:x – input value
Returns:value of the model
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01DD5790>
__div__()
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.models.BaseModel'
__mul__()
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__sub__()
__weakref__

list of weak references to the object (if defined)

calculate_ER()
clone()

Returns a new object identical to the current object

getParam()

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
getParamList()

Return a list of all available parameters for the model

getParamListWithToken()
getParamWithToken()
name = 'BaseModel'
run()
runXY()
setParam()

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
setParamWithToken()
class sans.models.BaseModel.Parameter

Bases: object

Parameter class

__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x01DD53B0>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__()
__module__ = 'sans.models.BaseModel'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

x.__repr__() <==> repr(x)

__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__()
__weakref__

list of weak references to the object (if defined)

name = ''
value = 0.0
sans.models.BaseModel.ParameterProperty

Parameter property allow direct access to the parameter values

Table Of Contents

Previous topic

BaseComponent

Next topic

BCCrystalModel

This Page