getphaselag2 {RSEIS} | R Documentation |
Use MTM spectrum to estimate phase lag between two signals.
getphaselag2(y1, y2, DT = 0.008, frange = c(0, 20), PLOT = FALSE, PLOT1 = FALSE, PLOT2 = FALSE)
y1 |
vector times series one |
y2 |
vector times series two |
DT |
deltaT sample rate, s |
frange |
vector, frequency bounds for analysis |
PLOT |
logical, TRUE=diagnostic plot |
PLOT1 |
logical, TRUE=diagnostic plot |
PLOT2 |
logical, TRUE=diagnostic plot |
uses the slope of the cross spectrum to estimate the phase lag.
phase lag, seconds
Jonathan M. Lees<jonathan.lees.edu>
mtapspec
data("GH") Xamp1=GH$JSTR[[1]] Xamp1=Xamp1[1123:2000] Xamp2= GH$JSTR[[4]] Xamp2=Xamp2[1123:2000] plot(Xamp1,type='l') lines(Xamp2,type='l',col='red') pshift = getphaselag2(Xamp1, Xamp2, DT=GH$info$dt[1], frange=c(5, 15), PLOT=TRUE)