preproc: preproc

View source: R/PulseWaveform.R

preprocR Documentation

preproc

Description

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.

Usage

preproc(dat)

Arguments

dat

raw Bioradio data as outputted by device

Value

A downsampled and undetrended time series

Examples

data <- read.csv(file.choose(), header = T)
undetrended_data <- data.frame(preproc(dat=data))

stw32/PulseWaveform documentation built on Dec. 6, 2022, 2:50 a.m.