bandpass {astrochron} R Documentation

## Bandpass filter stratigraphic series

### Description

Bandpass filter stratigraphic series using rectangular, Gaussian or tapered cosine (a.k.a. Tukey) window. This function can also be used to notch fiter a record (see examples).

### Usage

bandpass(dat,padfac=2,flow=NULL,fhigh=NULL,win=0,alpha=3,p=0.25,demean=T,


### Arguments

 dat Stratigraphic series for bandpass 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. flow Lowest frequency to bandpass. fhigh Highest frequency to bandpass. win Window type for bandpass filter: 0 = rectangular , 1= Gaussian, 2= Cosine-tapered window (a.k.a. Tukey window). alpha Gaussian window parameter: alpha is 1/stdev, a measure of the width of the Dirichlet kernel. Choose alpha >= 2.5. p Cosine-tapered (Tukey) window parameter: p is the percent of the data series tapered (choose 0-1). 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) output Output: (1) filtered series, (2) bandpass filter window. xmin Smallest frequency for plotting. xmax Largest frequency for plotting. genplot Generate summary plots? (T or F) verbose Verbose output? (T or F)

### Value

bandpassed stratigraphic series.

lowpass, 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)

# bandpass precession term using cosine-tapered window
bandpass_ex <- bandpass(ex,flow=0.045,fhigh=0.055,win=2,p=.4)

# notch filter (remove) obliquity term using cosine-tapered window
#  if you'd like the final notch filtered record to be centered on the mean proxy