dispel.signal.sensor module#
Sensor functionality for signal processing tasks.
- dispel.signal.sensor.SENSOR_UNIT = {'acc': 'G', 'diss': 'pixel', 'gyr': 'rad/s'}#
A dictionary for sensor units.
- dispel.signal.sensor.check_amplitude(data, min_amplitude, max_amplitude)[source]#
Check if the signal amplitudes belong to a reasonable range.
The function will return true only if all the values of each column are between the min and max amplitude bounds.
- Parameters:
- Returns:
True
if all the values are in the range.False
otherwise.- Return type:
- dispel.signal.sensor.detrend_signal(signal)[source]#
Detrend signal and remove offset component.
The final signal will end up centered on zero and stationary. This function is based on
scipy.stats.linregress()
.- Parameters:
signal (pandas.Series) – The raw signal.
- Returns:
The detrended signal.
- Return type: