Command reference
squirrel cascade¶
Create hierarchical data overviews.
- squirrel cascade¶
usage: squirrel cascade [--help] [--loglevel LEVEL] [--progress DEST]
[--threads-loading INT] [--add PATH [PATH ...]]
[--include REGEX] [--exclude REGEX] [--optimistic]
[--format FORMAT] [--add-only KINDS]
[--persistent NAME] [--samples-block N]
[--dataset FILE] [--upgrade-storage] [--kinds KINDS]
[--codes CODES] [--codes-exclude CODES] [--tmin TIME]
[--tmax TIME] [--time TIME] [--levels INT] [--fold INT]
[--methods METHODS] [--out-storage-path PATH] [--force]
[--append] [--merge]
Pre-compute downsampled overviews of carpets (e.g. spectrograms), so that long datasets can be browsed quickly, e.g. in squirrel service. Each level reduces the sampling rate of the previous one by a factor (see --fold), taking the mean, minimum and/or maximum of the folded samples (see --methods). The results are stored as new carpets in the directory given with --out-storage-path, with -L<method><level> (e.g. -Lmax03) appended to the extra code. Only carpets are processed, waveforms are ignored. Folding is aligned to an absolute time grid, so that incomplete blocks at the beginning and end of the data are left out.
Example: squirrel cascade --add data/spectrograms/main --levels 8 --out-storage-path data/spectrograms/cascade – create 8 levels of overviews for the spectrograms computed with squirrel spectrogram (see there for the suggested directory layout). Keeping the overviews next to the spectrograms, in data/spectrograms/, allows to view both at once.
Next step: browse the spectrograms with squirrel service --add data/spectrograms.
Options:
- --levels INT
Number of levels to create.
- --fold INT
Decimation factor applied in each level.
- --methods METHODS
Methods of reduction, comma-separated list. Choices:
mean,min,maxDefault:mean,min,max
- --out-storage-path PATH
Store output in directory PATH.
- --force
Force overwriting of existing files.
- --append
Append to existing files. Checks are performed to ensure that appended data has no overlap with already existing data.
- --merge
Merge with existing data in files.
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.
- --threads-loading INT
Set number of threads used in file content loading/decoding. Default: 1
Data collection options:
- --add, -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 subdirectory2011in 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_Storesubdirectory.
- --optimistic, -o
Disable checking file modification times for faster startup.
- --format, -f FORMAT
Assume input files are of given
FORMAT. Choices:datacube,hdf5_optodas,mseed,pyrocko_events,pyrocko_stations,rug,sac,spickle,sqlite-ELK1,stationxml,tdms_idas,virtual,yaff,yaml. Default:detect.
- --add-only KINDS
Restrict meta-data scanning to given content kinds.
KINDSis a comma-separated list of content kinds. Choices:waveform,station,channel,response,event,carpet,waveform_promise. By default, all content kinds are indexed.
- --persistent, -p NAME
Create/use persistent selection with given
NAME. Persistent selections can be used to speed up startup of Squirrel-based applications.
- --samples-block N
When downloading data, use blocks with approximately
Nsamples. Default: 100000
- --dataset, -d FILE
Add files, directories and remote sources from dataset description file. This option can be repeated to add multiple datasets. Run
squirrel templateto 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.
KINDSis a comma-separated list of content kinds. Choices:waveform,station,channel,response,event,carpet,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, orNET.STA.LOC.CHA.EXTRA). The pattern may contain wildcards*(zero or more arbitrary characters),?(single arbitrary character), and[CHARS](any character out ofCHARS). Multiple patterns can be given by separating them with commas.
- --codes-exclude CODES
Code patterns to exclude. See
--codes.
- --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.
- --time TIME
Time instant 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
🐿️