8.6.3.1. pymodaq_data.post_treatment.process_to_scalar module

Created the 04/11/2022

@author: Sebastien Weber

class pymodaq_data.post_treatment.process_to_scalar.ArgMaxProcessor[source]

Bases: DataProcessorBase

Methods

operate(sub_data)

Extract info from sub-DataWithAxes

operate(sub_data)[source]

Extract info from sub-DataWithAxes

Retrieve the signal axis values of the maximum position of the data

Notes

For more complex processors, such as the argmin, argmax … , one cannot use directly the numpy function (compared to min, max, mean…). Indeed one has to first flatten the data arrays on the signal axes, then apply the function on the flatten dimension, here get the indexes of the minimum along the flattened dimension (as a function of the eventual navigations dimensions). From this index, on then obtain as many indexes as signal dimensions (1 for 1D Signals, 2 for 2D signals). And we do this for as many data there is in sub_data.

apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.ArgMeanProcessor[source]

Bases: DataProcessorBase

Methods

operate(sub_data)

Extract info from sub-DataWithAxes

operate(sub_data)[source]

Extract info from sub-DataWithAxes

Retrieve the signal mean axis values

Notes

For more complex processors, such as the argmin, argmax … , one cannot use directly the numpy function (compared to min, max, mean…). Indeed one has to first flatten the data arrays on the signal axes, then apply the function on the flatten dimension, here get the indexes of the minimum along the flattened dimension (as a function of the eventual navigations dimensions). From this index, on then obtain as many indexes as signal dimensions (1 for 1D Signals, 2 for 2D signals). And we do this for as many data there is in sub_data.

apply_to: DataDim = 1
class pymodaq_data.post_treatment.process_to_scalar.ArgMinProcessor[source]

Bases: DataProcessorBase

Methods

operate(sub_data)

Extract info from sub-DataWithAxes

operate(sub_data)[source]

Extract info from sub-DataWithAxes

Retrieve the signal axis values of the minimum position of the data

Notes

For more complex processors, such as the argmin, argmax … , one cannot use directly the numpy function (compared to min, max, mean…). Indeed one has to first flatten the data arrays on the signal axes, then apply the function on the flatten dimension, here get the indexes of the minimum along the flattened dimension (as a function of the eventual navigations dimensions). From this index, on then obtain as many indexes as signal dimensions (1 for 1D Signals, 2 for 2D signals). And we do this for as many data there is in sub_data.

apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.ArgStdProcessor[source]

Bases: DataProcessorBase

Methods

operate(sub_data)

Extract info from sub-DataWithAxes

operate(sub_data)[source]

Extract info from sub-DataWithAxes

Retrieve the signal mean axis values

Notes

For more complex processors, such as the argmin, argmax … , one cannot use directly the numpy function (compared to min, max, mean…). Indeed one has to first flatten the data arrays on the signal axes, then apply the function on the flatten dimension, here get the indexes of the minimum along the flattened dimension (as a function of the eventual navigations dimensions). From this index, on then obtain as many indexes as signal dimensions (1 for 1D Signals, 2 for 2D signals). And we do this for as many data there is in sub_data.

apply_to: DataDim = 1
class pymodaq_data.post_treatment.process_to_scalar.DataProcessorBase[source]

Bases: object

Apply processing functions to signal data. This function should return a DataWithAxes.

apply_to

Specify on which type of data dimensionality this processor can be applied to, if only 1D: apply_to = DataDim[‘Data1D’]

Type:

DataDim

Methods

__call__(**kwargs)

apply_to

flatten_signal_dim(sub_data)

flattens data's ndarrays along the signal dimensions

operate

process

apply_to

alias of abstractproperty

static flatten_signal_dim(sub_data)[source]

flattens data’s ndarrays along the signal dimensions

Return type:

Tuple[Tuple, ndarray]

abstractmethod operate(sub_data)[source]
process(data)[source]
Return type:

DataWithAxes

class pymodaq_data.post_treatment.process_to_scalar.DataProcessorFactory[source]

Bases: ObjectFactory

Attributes:
functions

Get the list of processor functions

Methods

functions_filtered(dim)

Get the list of processor functions that could be applied to data having a given dimensionality

get

functions_filtered(dim)[source]

Get the list of processor functions that could be applied to data having a given dimensionality

get(processor_name, **kwargs)[source]
Return type:

DataProcessorBase

property functions

Get the list of processor functions

class pymodaq_data.post_treatment.process_to_scalar.MaxProcessor[source]

Bases: DataProcessorBase

Methods

operate

operate(sub_data)[source]
apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.MeanProcessor[source]

Bases: DataProcessorBase

Methods

operate

operate(sub_data)[source]
apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.MinProcessor[source]

Bases: DataProcessorBase

Methods

operate

operate(sub_data)[source]
apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.StdProcessor[source]

Bases: DataProcessorBase

Methods

operate

operate(sub_data)[source]
apply_to: DataDim = 3
class pymodaq_data.post_treatment.process_to_scalar.SumProcessor[source]

Bases: DataProcessorBase

Methods

operate

operate(sub_data)[source]
apply_to: DataDim = 3