Learn R Programming

eseis (version 0.8.0)

aux_psdsummary: Calculate aggregated PSDs over long time periods

Description

The function generates a long time PSD with aggregated time and frequency resolution.

Usage

aux_psdsummary(
  start,
  stop,
  ID,
  component = "BHZ",
  dir,
  window,
  sensor,
  logger,
  gain = 1,
  hours_skip,
  res = 1000,
  n = 100,
  cpu,
  verbose = FALSE
)

Value

eseis object, a spectrogram

Arguments

start

POSIXct value, start time for PSD calculation. If a character string (or vector) is provided, the function will try to convert it to POSIXct.

stop

POSIXct value, stop time for PSD calculation. If a character string (or vector) is provided, the function will try to convert it to POSIXct.

ID

Character vector, station ID to be processed

component

Character value or vector, seismic component to be used. If omitted, the function will use "BHZ" by default.

dir

Character value, path to directory that contains the seismic files. See read_data for details and constraints on the data structure.

window

Numeric value, time window size for the PSD calculation. Should be appropriately large to avoid extensive calculation times, usually at the order of 0.1 percent of the total PSD duration.

sensor

Character value, sensor keyword for the deconvolution step (see signal_deconvolve for details and keywords). If omitted, no deconvolution will be attempted.

logger

Character value, logger keyword for the deconvolution step (see signal_deconvolve for details and keywords). If omitted, no deconvolution will be attempted.

gain

Numeric value, signal preamplification factor used for the deconvolution step (see signal_deconvolve for details. Default value is 1.

hours_skip

Integer vector, one or more full hours that will be excluded from the PSD generation. This optional value is useful if one wants to omit noisy daytime hours.

res

Numeric value, frequency resolution of the PSD, by default set to 1000. This is used to reduce the resulting data size.

n

Numeric value, number of times to try to find a time snippet with data to estimate the frequency vector length. By default set to 100.

cpu

Numeric value, fraction of CPUs to use. If omitted, only one CPU will be used.

verbose

Logical value, option to show extended function information as the function is running. Default is FALSE.

Author

Michael Dietze

Details

The function will calculate PSDs using the Welch method (see signal_spectrogram), with no overlap of the main time windows. The sub-windows will be automatically set to 10 the overlap of sub-windows to 0.5.

Examples

Run this code

if (FALSE) {

p <- aux_psdsummary(start = "2017-04-15 19:00:00 UTC",
                    stop = "2017-04-15 22:00:00 UTC",
                    ID = "RUEG1",
                    component = "BHE",
                    dir = "~/data/sac/",
                    sensor = "TC120s", 
                    logger = "Cube3ext",
                    window = 600,
                    res = 1000,
                    verbose = TRUE)
                    
plot(p)

}

Run the code above in your browser using DataLab