obs_factory

Module for observable reader abstract class

class MDMC.readers.observables.obs_reader.ObservableReader(file_name: str)[source]

Abstract class that defines methods common to all readers for observables

ObservableReaders are created using ObservableReaderFactory

assign(observable: Observable) None[source]

Abstract method to assign the parsed information into the Observable

Parameters:

observable (Observable) – An MDMC Observable that will be assigned the data parsed by the reader.

property data: dict

A dictionary of dictionaries containing the independent variables, dependent variables and the associated errors.

Returns:

The independent variables, dependent variables and the errors on the dependent variables

Return type:

dict

abstract property dependent_variables: None

The dependent variables

Returns:

A dictionary of the dependent variables

Return type:

dict

abstract property errors: None

The errors on the dependent variables

Returns:

A dictionary of the errors on the dependent variables

Return type:

dict

abstract property independent_variables: dict

The independent variables

Returns:

A dictionary of the independent variables

Return type:

dict

class MDMC.readers.observables.obs_reader.PDFReader(file_name: str)[source]

Abstract base subclass that adds attributes & methods common to all PDF readers

property PDF: ndarray

Get or set the total pair distribution function between pairs (in barn) :returns: total pair distribution function (in barn) :rtype: numpy.ndarray

property PDF_err: ndarray

Get or set the error on the total pair distribution function between pairs (in barn) :returns: error on the total pair distribution function (in barn) :rtype: numpy.ndarray

property dependent_variables: dict

Get the dependent variable PDF, the pair distribution function (in barn)

Returns:

The dependent variable, PDF (in barn)

Return type:

dict

property errors: dict

Get the errors on the dependent variable

Returns:

The error on PDF (in barn)

Return type:

dict

property independent_variables: dict

Get the independent variable r (in Ang^-1)

Returns:

The independent variable r (in Ang^-1)

Return type:

dict

property r: float

Get or set the value of the atomic separation distance (in Ang)

class MDMC.readers.observables.obs_reader.SQwReader(file_name: str)[source]

Abstract base subclass that adds attributes & methods common to all SQw readers

property E: float

Get or set the energy transfer, E, in meV

Returns:

Energy transfer, E, in meV

Return type:

array

property Q: float

Get or set the momentum transfer, Q, in Ang^-1

Returns:

Momentum transfer, Q, in Ang^-1

Return type:

array

property dependent_variables: dict

Get the dependent variables, SQw (in arb)

Returns:

The dependent variables, SQw (in arb)

Return type:

dict

property errors: dict

Get the errors on the dependent variables

Returns:

The error on SQw (in arb)

Return type:

dict

property independent_variables: dict

Get the independent variables, Q (in Ang^-1) and E (meV)

Returns:

The independent variables Q and E

Return type:

dict

property w: float

Get or set the energy transfer expressed in angular frequency, w, in 1 / ps

Returns:

Energy transfer as angular frequency, w, in 1 / ps

Return type:

array