matador.orm package

class matador.orm.DataContainer(data=None, mutable=False, **kwargs)[source]

Bases: ABC

Base class for matador data classes. This class is a read-only store of the underlying dictionary of raw data; its children can implement useful methods to inspect and analyse the underlying data.

Initalise copy of raw data.

required_keys = []
property root_source
property provenance: str

Returns a string containing a guess of the provenance (i.e., CSP method or structure source) for this object.

property source

Return the source of the data.

pop(key)[source]
get(*args)[source]

Overload dictionary.get() method.

Parameters:

key (str) – key to try and obtain.

Keyword Arguments:

default – return value raise if key is not present.

Returns:

_data[key] if it exists, else None.

Subpackages

Submodules

matador.orm.magres module

This file implements classes to store and manipulate magnetic resonance data.

class matador.orm.magres.MagneticResonance(data=None, mutable=False, **kwargs)[source]

Bases: DataContainer

Initalise copy of raw data.

matador.orm.orm module

This file implements the base DataContainer class which wraps raw matador dictionaries and adds useful methods to be inherited by its children.

class matador.orm.orm.DataContainer(data=None, mutable=False, **kwargs)[source]

Bases: ABC

Base class for matador data classes. This class is a read-only store of the underlying dictionary of raw data; its children can implement useful methods to inspect and analyse the underlying data.

Initalise copy of raw data.

required_keys = []
property root_source
property provenance: str

Returns a string containing a guess of the provenance (i.e., CSP method or structure source) for this object.

property source

Return the source of the data.

pop(key)[source]
get(*args)[source]

Overload dictionary.get() method.

Parameters:

key (str) – key to try and obtain.

Keyword Arguments:

default – return value raise if key is not present.

Returns:

_data[key] if it exists, else None.