Submodules
Name | Purpose |
---|---|
ASCII | ASCII file formats (includes GeoCSV, SLIST, and variants) |
FastIO | Replacement low-level I/O functions to avoid thread locking |
Quake | Earthquake seismology |
RandSeis | Generate SeisBase structures with quasi-random entries |
SEED | Standard for the Exchange of Earthquake Data (SEED) file format |
SUDS | Seismic Unified Data System (SUDS) file format |
SeisHDF | Dedicated support for seismic HDF5 subformats |
UW | University of Washington data format |
Using Submodules
At the Julia prompt, type using SeisBase.NNNN where NNNN is the submodule name; for example, using SeisBase.Quake
loads the Quake submodule.
RandSeis
This submodule is used to quickly generate SeisBase objects with quasi-random field contents. Access it with "using SeisBase.RandSeis"
The following are true of all random data objects generated by the RandSeis module:
- Channels have SEED-compliant IDs, sampling frequencies, and data types.
- Random junk fills :notes and :misc.
- Sampling frequency (:fs) is chosen from a set of common values.
- Channel data are randomly generated.
- Time gaps are automatically inserted into regularly-sampled data.
SeisBase.RandSeis.randPhaseCat
— FunctionrandPhaseCat()
Generate a random seismic phase catalog suitable for testing EventChannel, EventTraceData, and SeisEvent objects.
SeisBase.RandSeis.randSeisChannel
— FunctionrandSeisChannel()
Generate a random channel of geophysical time-series data as a SeisChannel.
Keywords
KW | Default | Type | Meaning |
---|---|---|---|
s | false | Bool | force channel to have seismic data? |
c | false | Bool | force channel to have irregular data? |
nx | 0 | Int64 | number of samples in channel [1] |
fs_min | 0.0 | Float64 | channels will have fs ≥ fs_min |
fc | 0.0 | Float64 | rolloff frequency [2] |
- if
nx ≤ 0
, the number of samples is determined randomly - specifing
fc
withc=false
returns a geophone instrument response
See also: randSeisData
, fctoresp
SeisBase.RandSeis.randSeisData
— FunctionrandSeisData()
Generate 8 to 24 channels of random seismic data as a SeisData object.
randSeisData(N)
Generate N
channels of random seismic data as a SeisData object.
Keywords
KW | Default | Type | Meaning |
---|---|---|---|
s | 0.6 | Float64 | chance each channel is seismic data |
c | 0.2 | Float64 | chance each channel is irregular (fs=0) |
nx | 0 | Int64 | number of samples in each channel |
fs_min | 0.0 | Float64 | regular channels have fs ≥ fs_min |
a0 | false | Bool | recalculate :resp constants? |
Behavior
- If
nx
≤ 0, the number of samples is determined randomly for each channel 100*s
is the minimum percentage of channels with guaranteed seismic data100*c
is the maximum percentage of channels with irregularly-sampled datas
takes precedence overc
; they are not renormalized. Thus, for example:randSeisData(12, c=1.0, s=1.0)
works likerandSeisData(12, c=0.0, s=1.0)
randSeisData(c=1.0)
works likerandSeisData(s=0.0)
- For
N
channels,s*N
is rounded up;c*N
is rounded down. Thus:randSeisData(10, c=0.28)
andrandSeisData(10, c=0.2)
are equivalentrandSeisData(10, s=0.28)
andrandSeisData(10, s=0.3)
are equivalent
- By default,
:resp.a0 = 1.0
for all channels;a0=true
callsresp_a0!(S)
:resp.p
and:resp.z
are random;a0=true
isn't guaranteed to work
See also: randSeisChannel
, resp_a0!
SeisBase.RandSeis.randSeisEvent
— FunctionrandSeisEvent([, c=0.2, s=0.6])
Generate a SeisEvent structure filled with random header and channel data.
- 100*c is the percentage of :data channels after the first with irregularly-sampled data (fs = 0.0)
- 100*s is the percentage of :data channels after the first with guaranteed seismic data.
See also: randSeisChannel
, randSeisData
, randSeisHdr
, randSeisSrc
SeisBase.RandSeis.randSeisHdr
— FunctionrandSeisHdr()
Generate a SeisHdr structure filled with random values.
SeisBase.RandSeis.randSeisSrc
— FunctionrandSeisSrc()
Generate a SeisSrc structure filled with random values.
SEED
Submodule for the Standard for the Exchange of Earthquake Data (SEED) file format; includes additional functionality.
Scanning SEED Volumes
SeisBase.SEED.scan_seed
— Functionsoh = scan_seed(fname::String[, KWs])
Scan seed file fname
and report properties in human-readable string array soh
.
General Keywords
- quiet (Bool):
true
to only return compact summary strings (no stdout) - memmap (Bool):
true
to use memory mapping - v (Integer):
v > 0
increases scan verbosity
Output Keywords
These are all Booleans; false
excludes from scan.
npts
: Number of samples per channel (default:true
)ngaps
: Number of time gaps per channel (default:true
)nfs
: Number of unique fs values per channel (default:true
)seg_times
: Exact gap times (default:false
)fs_times
: Exact times of fs changes (default:false
)
Note that seg_times and fs_times dump verbose per-channel tabulation to stdout.
Users are encouraged to submit feature request or issues if there's a need to scan for other changes within a SEED volume.
Interaction with Online Requests
scan_seed cannot interact directly with online SEED requests. As a workaround, do $get_data(..., w=true)$ to dump the raw request directly to disk, then scan the file(s) created.
Rarely, the number of gaps reported is off-by-one from read_data
.
UW
The UW submodule extends functionality for the University of Washington (UW) file format(s).
The UW data format was created in the 1970s by the Pacific Northwest Seismic Network (PNSN), USA, for event archival. It remained in use through the 1990s. A UW event is described by a pickfile and a corresponding data file, whose filenames were identical except for the last character. The data file is self-contained; the pick file is not required to read raw trace data. However, station locations were stored in an external text file.
Only UW-2 data files are supported by SeisBase. We have only seen UW-1 data files in Exabyte tapes from the 1980s.
SeisBase.UW.uwpf
— FunctionH, R = uwpf(pf[, v])
Read UW-format seismic pick file pf
into SeisHdr object H
, with seismic source description (focal mechanism) returned in SeisSrc object R
.
uwpf!(W, pf[, v::Integer=KW.v])
Read UW-format seismic pick info from pickfile f
into SeisEvent object W
. Overwrites W.source and W.hdr with pickfile information. Keyword v
controls verbosity.
Reader has no safety check to guarantee that pf
is from the same event.