Command reference

squirrel jackseis

Convert waveform archive data.

squirrel jackseis
usage: squirrel jackseis [--help] [--loglevel LEVEL] [--progress DEST]
                         [--add PATH [PATH ...]] [--include REGEX]
                         [--exclude REGEX] [--optimistic] [--format FORMAT]
                         [--add-only KINDS] [--persistent NAME]
                         [--dataset FILE] [--upgrade-storage] [--config NAME]
                         [--dump-config] [--force] [--append] [--kinds KINDS]
                         [--codes CODES] [--tmin TIME] [--tmax TIME]
                         [--tinc SECONDS] [--downsample RATE]
                         [--quantity QUANTITY]
                         [--band FMIN,FMAX or FMIN,FMAX,CUTFACTOR or FMINCUT,FMIN,FMAX,FMAXCUT]
                         [--instrument-correction-mode {complete,sensor}]
                         [--rotate-to-enz] [--out-path TEMPLATE]
                         [--out-sds-path PATH] [--out-storage-path PATH]
                         [--out-storage-scheme SCHEME] [--out-format FORMAT]
                         [--out-data-type DTYPE]
                         [--out-mseed-record-length INT]
                         [--out-mseed-steim INT] [--out-meta-path PATH]
                         [--traversal GROUPING] [--rename-network REPLACEMENT]
                         [--rename-station REPLACEMENT]
                         [--rename-location REPLACEMENT]
                         [--rename-channel REPLACEMENT]
                         [--rename-extra REPLACEMENT]

Options:

--config NAME

File containing jackseis.Converter settings.

--dump-config

Print configuration file snippet representing given command line arguments to standard output and exit. Only command line options affecting the conversion are included in the dump. Additional --config settings, data collection and data query options are ignored.

--force

Force overwriting of existing files.

--append

Append to existing files. This only works for mseed files. Checks are preformed to ensure that appended traces have no overlap with already existing traces.

--tinc SECONDS

Set time length of output files [s].

--downsample RATE

Downsample to RATE [Hz].

--quantity QUANTITY

Restitute waveforms to selected QUANTITY. Restitution is performed by multiplying the waveform spectra with a tapered inverse of the instrument response transfer function. The frequency band of the taper can be adjusted using the --band option. Choices: acceleration, velocity, displacement, pressure, rotation_displacement, rotation_velocity, rotation_acceleration, temperature, voltage, counts.

--band FMIN,FMAX or FMIN,FMAX,CUTFACTOR or FMINCUT,FMIN,FMAX,FMAXCUT

Frequency band used in restitution (see --quantity) or for (acausal) filtering. Waveform spectra are multiplied with a taper with cosine-shaped flanks and which is flat between FMIN and FMAX. The flanks of the taper drop to zero at FMINCUT and FMAXCUT. If CUTFACTOR is given, FMINCUT and FMAXCUT are set to FMIN/CUTFACTOR and FMAX*CUTFACTOR respectively. CUTFACTOR defaults to 2.

--instrument-correction-mode {complete,sensor}

Select mode of the instrument correction when performing a restition with --quantity. This option selects which stages of the instrument response should be considered completely, i.e. including their frequency dependence, and which stages should be considered by only considering their overall gain factor. Choices: complete – all stages are considered completely (default). sensor – only the first stage of the insrument response is treated completely. The first stage of the instrument response conventionally represents the characteristics of the sensor and is usually given in poles and zeros representation. The frequency response of the FIR filters of the digitizer’s downsampling stages are not considered in sensor mode. Instead, replacement gain factors are computed by evaluating the frequency response of the respective stages at the lower frequency bound of the restitution FMIN (see --band). The assumption here is, that the decimation FIR filters are flat at this frequency and representative for the whole pass band.

--rotate-to-enz

Rotate waveforms to east-north-vertical (ENZ) coordinate system. The samples in the input data must be properly aligned and the channel orientations must by set in the station metadata (StationXML). Output channels are renamed with last letter replaced by E, N, and Z respectively.

--out-path TEMPLATE

Set output path to TEMPLATE. Available placeholders are %n: network, %s: station, %l: location, %c: channel, %b: begin time, %e: end time, %j: julian day of year. The following additional placeholders use the current processing window’s begin and end times rather than trace begin and end times (to suppress producing many small files for gappy traces), %(wmin_year)s, %(wmin_month)s, %(wmin_day)s, %(wmin)s, %(wmin_jday)s, %(wmax_year)s, %(wmax_month)s, %(wmax_day)s, %(wmax)s, %(wmax_jday)s. Example: --out-path 'data/%s/trace-%s-%c.mseed'

--out-sds-path PATH

Set output path to create an SDS archive (https://www.seiscomp.de/seiscomp3/doc/applications/slarchive/SDS.html), rooted at PATH. Implies --tinc 3600 if not specified otherwise. Equivalent to --out-storage-path PATH --out-storage-scheme sds. Example: --out-sds-path data/sds

--out-storage-path PATH

Create storage directory under PATH. The storage scheme can be set with --out-storage-scheme.

--out-storage-scheme SCHEME

Set storage scheme to produce when using --out-storage-path. Choices: default, sds

--out-format FORMAT

Set output file format. Choices: mseed [default], sac, text, yaff, gse2

--out-data-type DTYPE

Set numerical data type. Choices: int32, int64, float32, float64. The output file format must support the given type. By default, the data type is kept unchanged.

--out-mseed-record-length INT

Set the Mini-SEED record length in bytes. Choices: 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288. Default is 4096 bytes, which is commonly used for archiving.

--out-mseed-steim INT

Set the Mini-SEED STEIM compression. Choices: 1 or 2. Default is STEIM-2. Note: STEIM-2 is limited to 30 bit dynamic range.

--out-meta-path PATH

Set output path for station metadata (StationXML) export.

--traversal GROUPING

By default the outermost processing loop is over time. Add outer loop with given GROUPING. Choices: network, station, channel, sensor

--rename-network REPLACEMENT

Replace network code. REPLACEMENT can be a string for direct replacement, a mapping for selective replacement, or a regular expression for tricky replacements. Examples: Direct replacement: XX - set all network codes to XX. Mapping: AA:XX,BB:YY - replace AA with XX and BB with YY. Regular expression: /A(\d)/X\1/ - replace A1 with X1 and A2 with X2 etc.

--rename-station REPLACEMENT

Replace station code. See --rename-network.

--rename-location REPLACEMENT

Replace location code. See --rename-network.

--rename-channel REPLACEMENT

Replace channel code. See --rename-network.

--rename-extra REPLACEMENT

Replace extra code. See --rename-network. Note: the extra code is not available in Mini-SEED.

General options:

--help, -h

Show this help message and exit.

--loglevel LEVEL

Set logger level. Choices: critical, error, warning, info, debug. Default: info.

--progress DEST

Set how progress status is reported. Choices: terminal, log, off. Default: terminal.

Data collection options:

--add PATH [PATH ...], -a PATH [PATH ...]

Add files and directories with waveforms, metadata and events. Content is indexed and added to the temporary (default) or persistent (see --persistent) data selection.

--include REGEX

Only include files whose paths match the regular expression REGEX. Examples: --include='\.MSEED$' would only match files ending with .MSEED. --include='\.BH[EN]\.' would match paths containing .BHE. or .BHN.. --include='/2011/' would match paths with a subdirectory 2011 in their path hierarchy.

--exclude REGEX

Only include files whose paths do not match the regular expression REGEX. Examples: --exclude='/\.DS_Store/' would exclude anything inside any .DS_Store subdirectory.

--optimistic, -o

Disable checking file modification times for faster startup.

--format FORMAT, -f FORMAT

Assume input files are of given FORMAT. Choices: datacube, hdf5_optodas, mseed, pyrocko_events, pyrocko_stations, sac, spickle, stationxml, tdms_idas, virtual, yaml. Default: detect.

--add-only KINDS

Restrict meta-data scanning to given content kinds. KINDS is a comma-separated list of content kinds. Choices: waveform, station, channel, response, event, waveform_promise. By default, all content kinds are indexed.

--persistent NAME, -p NAME

Create/use persistent selection with given NAME. Persistent selections can be used to speed up startup of Squirrel-based applications.

--dataset FILE, -d FILE

Add files, directories and remote sources from dataset description file. This option can be repeated to add multiple datasets. Run squirrel template to obtain examples of dataset description files.

--upgrade-storage

Upgrade storage layout of cached data to latest version.

Data query options:

--kinds KINDS

Content kinds to query. KINDS is a comma-separated list of content kinds. Choices: waveform, station, channel, response, event, waveform_promise. By default, all content kinds are queried.

--codes CODES

Code patterns to query (STA, NET.STA, NET.STA.LOC, NET.STA.LOC.CHA, or NET.STA.LOC.CHA.EXTRA). The pattern may contain wildcards * (zero or more arbitrary characters), ? (single arbitrary character), and [CHARS] (any character out of CHARS). Multiple patterns can be given by separating them with commas.

--tmin TIME

Begin of time interval to query. Format: YYYY-MM-DD HH:MM:SS.FFF, truncation allowed.

--tmax TIME

End of time interval to query. Format: YYYY-MM-DD HH:MM:SS.FFF, truncation allowed.


Manual: https://pyrocko.org/docs/current/apps/squirrel

Tutorial: https://pyrocko.org/docs/current/apps/squirrel/tutorial.html

Examples: https://pyrocko.org/docs/current/apps/squirrel/manual.html#examples

🐿️