lowpass {astrochron}R Documentation

Lowpass filter stratigraphic series

Description

Lowpass filter stratigraphic series using rectangular, Gaussian or tapered cosine window. This function can also be used to highpass filter a record (see examples).

Usage

lowpass(dat,padfac=2,fcut=NULL,win=0,demean=T,detrend=F,addmean=T,alpha=3,p=0.25,
        xmin=0,xmax=Nyq,genplot=T,verbose=T)

Arguments

dat

Stratigraphic series for lowpass filtering. First column should be location (e.g., depth), second column should be data value.

padfac

Pad with zeros to (padfac*npts) points, where npts is the original number of data points.

fcut

Cutoff frequency for lowpass filtering.

win

Window type for bandpass filter: 0 = rectangular , 1= Gaussian, 2= Cosine-tapered window.

demean

Remove mean from data series? (T or F)

detrend

Remove linear trend from data series? (T or F)

addmean

Add mean value to bandpass result? (T or F)

alpha

Gaussian window parameter: alpha is 1/stdev, a measure of the width of the Dirichlet kernal. Larger values decrease the width of data window, reduce discontinuities, and increase width of the transform. Choose alpha >= 2.5.

p

Cosine-tapered window parameter: p is the percent of the data series tapered (choose 0-1).

xmin

Smallest frequency for plotting.

xmax

Largest frequency for plotting.

genplot

Generate summary plots? (T or F)

verbose

Verbose output? (T or F)

See Also

bandpass, noKernel, noLow, prewhiteAR, prewhiteAR1, and taner

Examples

# generate example series with periods of 405 ka, 100 ka, 40ka, and 20 ka, plus noise
ex=cycles(freqs=c(1/405,1/100,1/40,1/20),end=1000,dt=5,noisevar=.1)

# lowpass filter eccentricity terms using cosine-tapered window
lowpass_ex=lowpass(ex,fcut=.02,win=2,p=.4)

# highpass filter obliquity and precession terms using cosine-tapered window
#  if you'd like the final notch filtered record to be centered on the mean proxy 
#  value, set addmean=FALSE
highpass_ex=lowpass(ex,fcut=.02,win=2,p=.4,addmean=FALSE)
highpass_ex[2] <- ex[2]-highpass_ex[2]
pl(2)
plot(ex,type="l",main="Eccentricity+Obliquity+Precession")
plot(highpass_ex,type="l",main="Obliquity+Precession highpassed signal")


[Package astrochron version 1.0 Index]