pobm package¶
pobm.prep¶
-
pobm.prep.
set_range
(signal, Range_min=50, Range_max=100)[source]¶ Range function. Remove values lower than Range_min or greater than Range_max, considered as non-physiological
- Parameters
signal – 1-d array, of shape (N,) where N is the length of the signal
Range_min (int, optional) – minimum value for removing the data
Range_max (int, optional) – maximum value for removing the data
- Returns
preprocessed signal, 1-d numpy array.
-
pobm.prep.
resamp_spo2
(signal, OriginalFreq)[source]¶ Resample the SpO2 signal to 1Hz. Assumption: any missing/abnormal values are represented as ‘np.nan’
- Parameters
signal – 1-d array, of shape (N,) where N is the length of the signal
OriginalFreq – the original frequency.
- Returns
resampled signal, 1-d numpy array, the resampled spo2 time series at 1Hz
-
pobm.prep.
dfilter
(signal, Diff=4)[source]¶ Apply Delta Filter to the signal.
- Parameters
signal – 1-d array, of shape (N,) where N is the length of the signal
Diff (int, optional) – parameter of the delta filter.
- Returns
preprocessed signal, 1-d numpy array.
-
pobm.prep.
median_spo2
(signal, FilterLength=9)[source]¶ Apply a median filter to the SpO2 signal. Median filter used to smooth the spo2 time series and avoid sporadic increase/decrease of spo2 which could affect the detection of the desaturations. Assumption: any missing/abnormal values are represented as ‘np.nan’
- Parameters
signal – 1-d array, of shape (N,) where N is the length of the signal
FilterLength (int, optional) – The length of the filter.
- Returns
preprocessed signal, 1-d numpy array.