Code Documentation

In this page the most important functions of WaveDec are documented. You will find this page interesting if you wish to understand or modify the functioning of WaveDec.

Reading of input files

Some code to read data and metadata from SAC files.

Routines for reading SAC files

ReadSAC.readSac(sacFile)[source]

Load a single SAC file.

Parameters
sacFilestring

Path to the SAC file.

Returns
datafloat array

Data, amplitudes

tfloat array

Time axis

sacheadfloat array

SAC header

ReadSAC.readSacDir(sac_dir)[source]

Load SAC files from a folder.

Parameters
sac_dirstring

Path to the folder containing the SAC files.

Returns
y2d float array

It is an array of size (K, L). Each column contains the signal at the l-th location.

info2d array

An array containing information about sensor location and channels. It has L rows, where L is the number of channels. Each rows has the following form:

pos_x, pos_y, pos_z, cmp, Ts

where the first three fields are the position of the sensor in [m]. cmp is the component code. Ts is the sampling time as read from the SAC file.

Tsfloat

Sampling time in [s].

Synthetic wavefield generation

These functions are used to generate monochromatic waves. Mostly useful for code testing.

Estimation routines

Here is the code used for several estimation tasks.