psdStatistics: Return statistics for a set of PSDs

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/spectralUtils.R

Description

The psdStatistics function calculates a variety of information associated with the incoming set of PSDs.

Usage

1
psdStatistics(PSDs, evalresp=NULL)

Arguments

PSDs

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

evalresp

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

Value

A list of elements:

A variety of plots can be generated form the information in this list.

Author(s)

Jonathan Callahan jonathan@mazamascience.com

References

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

See Also

McNamaraPSD, psdList, psdPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Not run: 
# 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)

# Generate Statistics
stats <- psdStatistics(psdList)

# Just for fun plot
logPeriod <- log10(1/stats$freq)
plot(logPeriod,stats$max,ylim=c(-200,-50), las=1,
     xlab="log10(period)", ylab="Power (dB)",
     main="Model 'normal background noise' area and area of seismic signal.")
points(logPeriod,stats$min)

# Overlay a polygon showing the range between the noise models
x <- c(logPeriod,rev(logPeriod),logPeriod[1])
y <- c(stats$nhnm,rev(stats$nlnm),stats$nhnm[1])
transparentBlack <- adjustcolor('black',0.4)
polygon(x,y,col=transparentBlack)

# Overlay a polygon showing the range of measured values
y <- c(stats$max,rev(stats$min),stats$max[1])
transparentBlue <- adjustcolor('blue',0.6)
polygon(x,y,col=transparentBlue)  

## End(Not run)

IRISSeismic documentation built on Oct. 7, 2021, 9:10 a.m.