Learn R Programming

eseis (version 0.8.1)

aux_checkfiles: Check structured seismic files for consistency

Description

The function checks seismic files organised by aux_organisecubefiles or aux_organisecentaurfiles for completeness. The tests include agreement of file name and seismic file meta data.

Usage

aux_checkfiles(
  dir,
  station,
  component = "BHZ",
  method = "thorough",
  period = "weekly",
  format = "sac",
  duration_set = 3600,
  plot = TRUE
)

Value

Data frame containing check results and meta data.

Arguments

dir

Character value, path to directorythat contains the seismic files to check.

station

Character value, ID of the station of which the files will be checked. ID must match the IDs as used in the file names.

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 of a sac file).

method

Character value, method used to check files. One out of "fast" (only file names are used to check the files, the actual files are not read and examined) and "thorough" (files are imported to R and their meta data will be used for checking, as well). Option "thorough" is many times slower. Default is "thorough".

period

Character value, aggregation period, i.e., the time period used to generate plots. One out of "total","yearly", "monthly", "weekly", "daily". Default is "weekly".

format

Character value, seismic data format. One out of "sac" and "mseed". Default is "sac".

duration_set

Numeric value, anticipated length of the seismic time series of the files to test in seconds. Default is 3600 (one hour).

plot

Logical value, option to visualise the output of the function. Default is TRUE.

Author

Michael Dietze

Examples

Run this code

if (FALSE) {

## set seismic data directory
dir_data <- paste0(system.file("extdata", package="eseis"), "/")

## check data archive for record completeness
chk <- aux_checkfiles(dir = dir_data, 
                      station = "RUEG1", 
                      component = "BHZ",
                      plot = TRUE)

}

Run the code above in your browser using DataLab