View source: R/PulseWaveform.R
preproc | R Documentation |
preproc undertakes a pre-processing routine specific to raw Bioradio data. This entails downsampling the data and then 'undetrending' it. Downsampling removes repeated values (the BioRadio device provides 250 samples per second, but the PPG is only sampled 75 times per second), whilst undetrending reverses a detrending function inherent to Bioradio hardware. To expand on the latter, analysis of device output indicates that the PPG signal is detrended by application of the following formula:
OUT[i] = 80 + (OUT[i-1]-80) * 0.96875 + (IN[i] - [IN[i-1])
where the constant 0.96875 is an approximation fitted to the data. Individual pulse events are more comprehensible once undetrended.
preproc(dat)
dat |
raw Bioradio data as outputted by device |
A downsampled and undetrended time series
data <- read.csv(file.choose(), header = T) undetrended_data <- data.frame(preproc(dat=data))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.