# 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)
# calculate the Fourier coefficients using periodogram function. this must be done with
# no normalization (nrm=0)
fc_ex <- periodogram(ex,demean=TRUE,output=2,nrm=0)
# bandpass precession term using Taner window
bandpass_ex <- tanerFC(fc=fc_ex,npts=201,flow=0.045,fhigh=0.055,roll=10^10)
# lowpass filter eccentricity terms using Taner window
lowpass_ex <- tanerFC(fc=fc_ex,npts=201,fhigh=.02,roll=10^10)
Run the code above in your browser using DataLab