Learn R Programming

IRISSeismic (version 1.6.7)

psdPlot: Generate plots from a set of PSDs

Description

The psdPlot function is used to generate plots from the data in a psdList or psdDF dataframe.

Usage

psdPlot(PSDs, style='psd', evalresp=NULL, ylo=-200, yhi=-50, showNoiseModel=TRUE, 
        showMaxMin=TRUE, showMode=TRUE, showMean=FALSE, showMedian=FALSE, ...)

Arguments

PSDs

either a list as returned by psdList or a dataframe of PSD values obtained from the BSS

style

character identifier of plot type: 'psd' plots PSD lines, 'pdf' plots the pdfMatrix

evalresp

dataframe of freq, amp, phase information matching output of getEvalresp, optional

ylo

numeric setting lower limit of plot y-axis (default=-200)

yhi

numeric setting upper limit of plot y-axis (default=-50)

showNoiseModel

logical controlling plotting of noise model lines (default=TRUE)

showMaxMin

logical controlling plotting of PSD max and min lines (default=TRUE)

showMode

logical controlling plotting of PDF mode line (default=TRUE)

showMean

logical controlling plotting of PSD mean line (default=FALSE)

showMedian

logical controlling plotting of PSD median line (default=FALSE)

...

arguments to be passed to plotting methods

Author

Jonathan Callahan jonathan@mazamascience.com

Details

The psdPlot function creates visualizations for sets of PSDs. Plots generated with style='pdf' mimic the plots presented in the McNamara paper.

References

Seismic Noise Analysis System Using Power Spectral Density Probability Density Functions (McNamara and Boaz 2005)

See Also

McNamaraPSD, psdList, psdStatistics

Examples

Run this code
if (FALSE) {
# Create a new IrisClient
iris <- new("IrisClient", debug=TRUE)

# Get seismic data
starttime <- as.POSIXct("2011-05-05", tz="GMT") # 2011.125
endtime <- starttime + 1*24*3600
st <- getDataselect(iris,"IU","GRFO","--","BHE",starttime,endtime)

# Generate power spectral density for each hour long segment
psdList <- psdList(st)

# 'psd' line plot
psdPlot(psdList,style='psd',type='l',col=adjustcolor('black',0.3))

# McNamara 'pdf' plot
psdPlot(psdList,style='pdf')
}

Run the code above in your browser using DataLab