Learn R Programming

eseis (version 0.6.0)

aux_psdpanels: Generate spectrogram panels for a seismic network

Description

The function generates a set of spectrogram (PSD) panels on single to several hours basis. It depends on seismic files being organised in a coherent structure as, for example generated by aux_organisecubefiles. The function is similar to aux_psdsummary but arranges PSDs of all stations by time, rather than creating individual PSDs by time and station.

Usage

aux_psdpanels(
  station,
  component = "BHZ",
  period,
  span = 1,
  input_dir,
  output_dir,
  cpu,
  aggregate = c(1, 5),
  n_dates = 2000,
  jpg_dim = c(4444, 2500, 300, 90),
  verbose = FALSE,
  ...
)

Value

A set of JPEG images wirtten to disk

Arguments

station

Character value, seismic station ID, which must correspond to the ID in the file name of the data directory structure (cf. aux_organisecubefiles).

component

Character value, seismic component, which must correspond to the component name in the file name of the data directory structure (cf. aux_organisecubefiles). Default is "BHZ" (vertical component).

period

POSIXct vector of length two, time period to be processed.

span

Numeric vector, time span per PSD in hours. Value can range between 1 and 24. For each time span a separate jpeg-file will be produced. Default is 1 hour.

input_dir

Character value, path to directory where the seismic files are stored.

output_dir

Character value, path to directory where PSD image files are saved to.

cpu

Numeric value, fraction of CPUs to use for parallel processing. If omitted, one CPU is used.

aggregate

Numeric vector of length two, aggregation factors for the processed PSD matrics. First entry denotes time aggregation, second entry frequency aggregation. Default is c(1, 5).

n_dates

Numeric value, final number of spectra per output PSD. Default is 2000.

jpg_dim

Numeric vector of length four, JPEG image properties in the form c(width, height, resolution, quality). Default is c(4444, 2500, 300, 90).

verbose

Logical value, optional screen output of processing progress. Default is FALSE.

...

Additional arguments passed to different functions. See details section for default values.

Author

Michael Dietze

Details

The function calls a series of other functions, partly with modified default values, which can be changed by the ...-argument. By default, the seismic files are imported as eseis objects using aux_getevent(..., eseis = TRUE). The signals are deconvolved with signal_deconvolve() using the default options, i.e., sensor = "TC120s" and logger = "Cube3extBOB". Then, the signals are bandpass filtered with signal_filter, using f = c(1, 90). The PSDs are calculated with signal_spectrogram using Welch = TRUE, window = 30 and window_sub = 15.

This and all other aux-functions are primarily written for internal use in the GFZ Geomorphology Section group members and their usual data handling scheme. Thus, they may be of limited use when adopted for other scopes. However, many of these functions are internally consistent in usage.

Examples

Run this code

if (FALSE) {

## PSD generation with minimum input arguments
aux_psdpanels(station = stations$ID, 
              input_dir = "input/")
              
}

Run the code above in your browser using DataLab