aux_psdsummary: Calculate aggregated PSDs over long time periods

View source: R/aux_psdsummary.R

aux_psdsummaryR Documentation

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,
  window,
  component = "BHZ",
  sensor,
  logger,
  gain = 1,
  dir,
  hours_skip,
  res = 1000,
  n = 100,
  cpu,
  verbose = FALSE
)

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

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.

component

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

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.

dir

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

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.

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.

Value

eseis object, a spectrogram

Author(s)

Michael Dietze

Examples


## Not run: 

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)


## End(Not run)


eseis documentation built on Aug. 10, 2023, 5:08 p.m.

Related to aux_psdsummary in eseis...