SimPEG Props

The API

Property

class SimPEG.props.Model(*args, **kwargs)[source]
class_info = 'a numpy array'
class SimPEG.props.Mapping(*args, **kwargs)[source]
class_info = 'a SimPEG Map'
property prop
property reciprocal
property reciprocal_prop
clear_props(instance)[source]
validate(instance, value)[source]

Check if the value is valid for the Property

If valid, return the value, possibly coerced from the input value. If invalid, a ValueError is raised.

Warning

Calling validate again on a coerced value must not modify the value further.

Note

This function should be able to handle instance=None since valid Property values are independent of containing HasProperties class. However, the instance is passed to error for a more verbose error message, and it may be used for additional optional validation.

get_property()[source]

Establishes access of Property values

as_pickle(instance)[source]
class SimPEG.props.PhysicalProperty(*args, **kwargs)[source]
class_info = 'a physical property'
reciprocal = None
property mapping
clear_mappings(instance)[source]
validate(instance, value)[source]

Check if the value is valid for the Property

If valid, return the value, possibly coerced from the input value. If invalid, a ValueError is raised.

Warning

Calling validate again on a coerced value must not modify the value further.

Note

This function should be able to handle instance=None since valid Property values are independent of containing HasProperties class. However, the instance is passed to error for a more verbose error message, and it may be used for additional optional validation.

get_property()[source]

Establishes access of Property values

as_pickle(instance)[source]
summary(instance)[source]
class SimPEG.props.Derivative(*args, **kwargs)[source]
physical_property = None
property mapping

The mapping looks through to the physical property map.

get_property()[source]

Establishes access of GettableProperty values

class SimPEG.props.BaseSimPEG(*args, **kwargs)[source]
class SimPEG.props.Array(*args, **kwargs)[source]
class_info = 'a numpy, Zero or Identity array'
validate(instance, value)[source]

Determine if array is valid based on shape and dtype

class SimPEG.props.Float(*args, **kwargs)[source]
class_info = 'a float, Zero or Identity'
validate(instance, value)[source]

Checks that value is a float and in min/max bounds

Non-float numbers are coerced to floats

class SimPEG.props.Integer(*args, **kwargs)[source]
class_info = 'an Integer or *'
validate(instance, value)[source]

Checks that value is an integer and in min/max bounds

class SimPEG.props.LocationVector(*args, **kwargs)[source]
class_info = 'A location array (1-dimensional numpy array)'
validate(instance, value)[source]

Determine if array is valid based on shape and dtype

class SimPEG.props.HasModel(*args, **kwargs)[source]

Optional Properties:

  • model (Model): Inversion model., a numpy array of <class ‘float’>, <class ‘int’> with shape (*, *) or (*)

property model

model (Model): Inversion model., a numpy array of <class ‘float’>, <class ‘int’> with shape (*, *) or (*)

property needs_model

True if a model is necessary

summary()[source]