Signal Processing

class mrsimulator.signal_processing.SignalProcessor(*, name: str = None, description: str = None, label: str = None, property_units: Dict = {}, processed_data: csdmpy.csdm.CSDM = None, operations: List[mrsimulator.signal_processing._base.Operation] = [])

Bases: mrsimulator.utils.parseable.Parseable

Signal processing class to apply a series of operations to the dependent variables of the simulation dataset.


operations (List[mrsimulator.signal_processing._base.Operation]) – A list of operations.


>>> post_sim = SignalProcessor(operations=[o1, o2]) 
apply_operations(data, **kwargs)

Function to apply all the operation functions in the operations member of a SignalProcessor object. Operations applied sequentially over the data member.


A copy of the data member with the operations applied to it.

Return type

CSDM object

json() → dict

Parse the class object to a JSON compliant python dictionary object, where the attribute value with physical quantity is expressed as a string with a value and a unit.


A Dict object.

classmethod parse_dict_with_units(py_dict: dict)

Parse a list of operations dictionary to a SignalProcessor class object.


pt_dict – A python dict object.

reduced_dict(exclude={}) → dict

Returns a reduced dictionary representation of the class object by removing all key-value pair corresponding to keys listed in the exclude argument, and keys with value as None.


exclude – A list of keys to exclude from the dictionary.

Return: A dict.