testPhase: tests phase recovery by 'calculatePhase'

View source: R/osciTools.R

testPhaseR Documentation

tests phase recovery by calculatePhase

Description

generates cosine waves with fixed periods but random amplitudes and systematic phase shifts and sampled at varying resolution to test phase recovery performance via Discrete Fourier Transformation in calculatePhase. TODO: allow random phases, noise on period and general addition of noise

Usage

testPhase(n = 5, cyc = 4, T = 24, res = 6, xlim = c(-T/res, T + T/res))

Arguments

n

number of cosines to generate

cyc

numbers of cycles to generate

T

period

res

resolution: samples per period

xlim

x-axis range to show, defaults to one period +/- T/res

See Also

calculatePhase


raim/segmenTools documentation built on April 25, 2024, 10:14 a.m.