FindUndetrendingParams: FindUndetrendingParams

FindUndetrendingParamsR Documentation

FindUndetrendingParams

Description

FindUndetrendingParams is specific to the ISO study analysis and preprocesses the data therein. However, it may also be useful for preprocessing any PPG time series data in need of morphological correction due to hardware detrending algorithms. It functions by optimising factor and offset undetrending parameters across a number of sample waveforms from the four PPG time series per participant in the ISO study. From this reasonable values to apply to all four time series are inferred.

Usage

FindUndetrendingParams(direc, gs = model2.GetSegment, u = UnDetrend, oa = OffsetAdjust, fa = FactorAdjust, factorCutoff = 0, sr = samplingRate, pk_thrshd, pairs, plot = T)

Arguments

direc

the directory for an individual participant in the ISO study

gs

model2.GetSegment function

u

UnDetrend function

oa

OffsetAdjust function

fa

FactorAdjust function

factorCutoff

the maximum acceptable tail gradient (default 0)

sr

sample rate

pk_thrshd

the objective threshold for initial identification of peaks in the 1st derivative (see ISO main script)

pairs

file names of the two pairs of time series used for each participant in the ISO study analysis

plot

logical, if TRUE plots data during both factor and offset adjustment

Value

values

a vector containing the offset and factor values required to undetrend the raw PPG data

Examples

temp <- FindUndetrendingParams(direc = direc[1], gs = model2.GetSegment, oa = OffsetAdjust,
                                     fa = FactorAdjust, u = UnDetrend, factorCutoff = 0, sr = samplingRate,
                                     pairs = pairs, pk_thrshd = pk_thrshd, plot = F)










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