Learn R Programming

IRISMustangMetrics (version 1.0.1)

PSDMetric: Power Spectral Density of a signal

Description

The PSDMetric() function performs spectral analysis on a seismic signal and returns 'PSD' metrics with discretized spectral components as well as other metrics based on PSD's

Usage

PSDMetric(st, expLoPeriod=4/(st@traces[[1]]@stats@sampling_rate), expHiPeriod=100, linLoPeriod=16/(st@traces[[1]]@stats@sampling_rate), linHiPeriod=50)

Arguments

st
a Stream object containing a seismic signal
expLoPeriod
the low end of the period band use for calculating the exponential dead channel detector
expHiPeriod
the high end of the period band use for calculating the exponential dead channel detector
linLoPeriod
the low end of the period band use for calculating the linear dead channel detector
linHiPeriod
the high end of the period band use for calculating the linear dead channel detector

Value

A list of lists is returned containing:
  • spectrumMetricList = list of SpectrumMetric objects
  • svMetricList = list of SingleValueMetric objects:
    • pct_above_nhnm
    • pct_below_nlnm
    • dead_channel_exp
    • dead_channel_lin

Details

This metric calculates average power spectra for a seismic signal as described in the McNamara paper. See the McNamaraPSD method of Stream objects in the seismic package for details.

Uncorrected spectral density values are returned in spectrumMetricList in units of dB.

Other metrics calculated from the PSDs are returned in svMetricList. These metrics are:

pct_above_nhnm -- "percent above New High Noise Model"
Percentage of PSD values that are above the New High Noise Model for their frequency. This value is calculated over the entire time period.

pct_below_nlnm -- "percent below New Low Noise Model"
Percentage of PSD values that are below the New Low Noise Model for their frequency. This value is calculated over the entire time period.

dead_channel_exp -- "dead channel metric - exponential fit"
A "dead channel" metric is calculated from the mean of all the PSDs generated. (Typically 47 for a 24 hour period.) Values of the PSD mean line over the band (expLoPeriod:expHiPeriod) are fit to an exponential. The dead_channel_exp metric is the standard deviation of the fit residuals. Lower numbers indicate a better fit and a higher likelihood that the mean PSD is exponential -- an indication of a "dead channel".

dead_channel_lin -- "dead channel metric - linear fit"
A "dead channel" metric is calculated from the mean of all the PSDs generated. (Typically 47 for a 24 hour period.) Values of the PSD mean line over the band (linLoPeriod:linHiPeriod) are fit to a line. The dead_channel_lin metric is the standard deviation of the fit residuals. Lower numbers indicate a better fit and a higher likelihood that the mean PSD is linear -- an indication of a "dead channel".

References

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

See Also

SpectrumMetric SingleValueMetric

Examples

Run this code
  ## Not run: 
# # Open a connection to IRIS DMC webservices
# iris <- new("IrisClient")
# 
# # NOTE:  The following trace has 1.728 million points.
# # NOTE:  Downloading and calculating PSD may take a few seconds.
# starttime <- as.POSIXct("2010-02-27",tz="GMT")
# endtime <- as.POSIXct("2010-02-28",tz="GMT")
#   
# # Get the waveform
# st <- getDataselect(iris,"IU","ANMO","00","BHZ",starttime,endtime)
# 
# # Calculate the PSD metric and show the SingleValueMetric results
# listOfLists <- PSDMetric(st)
# svMetricList <- listOfLists[['svMetricList']]
# 
# dummy <- lapply(svMetricList, show)
#   ## End(Not run)

Run the code above in your browser using DataLab