Signal Processor¶
- class mrsimulator.signal_processor.SignalProcessor(*, name: str = None, description: str = None, label: str = None, property_units: Dict = {}, processed_dataset: CSDM = None, operations: List[Operation] = [])¶
Bases:
Parseable
SignalProcessor class to apply a series of operations to the dependent variables of the simulation dataset.
- Parameters:
operations (List[mrsimulator.signal_processor._base.Operation]) – A list of operations.
Examples
>>> post_sim = SignalProcessor(operations=[o1, o2])
- apply_operations(dataset, **kwargs)¶
Function to apply all the operation functions in the operations member of a SignalProcessor object. Operations applied sequentially over the dataset member.
- Returns:
A copy of the dataset 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.
- Returns:
A Dict object.
- classmethod parse_dict_with_units(py_dict: dict)¶
Parse a list of operations dictionary to a SignalProcessor class object.
- Parameters:
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.
- Parameters:
exclude – A list of keys to exclude from the dictionary.
Return: A dict.