Command reference
squirrel service¶
Fire up web UI.
- squirrel service¶
usage: squirrel service [--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] [--codes CODES]
[--codes-exclude CODES] [--tmin TIME] [--tmax TIME]
[--time TIME] [--mantra PATH[:PATTERN,...]]
[--help-port-forwarding] [--port INT] [--host HOST]
[--open] [--page PATH] [--cookie-secret-path PATH]
[--debug]
Starts a local web server providing a browser-based UI to interactively explore the data available through a Squirrel selection: waveforms, carpets (e.g. spectrograms) and their data coverage, channel and response metadata, and events are shown on a scrollable timeline, station positions on a map.
Downsampled waveform overviews are computed (up to a given threshold) on the fly while panning and zooming. Downsampled carpet overviews (cascades) can be pre-computed using squirrel cascade for seamless presentation of multi-year long datasets.
Data is served through “gates”. The default gate provides the data from the selected inputs as it is. Use --mantra to add gates with processed data: each of the selected mantras gets a gate named like the mantra, and its outputs (e.g. restituted waveforms or spectrograms) appear alongside the raw data in the timeline. Mantra names must be unique and may only contain lowercase letters, digits and underscores. Since data from all gates is shown together, the codes of the provided data should be distinct between gates; this can for example be achieved by including the mantra name in the operators’ output codes (see squirrel mantra show).
By default, the service only listens on localhost and is not reachable from other machines. Use --host to bind to a different address, and see --help-port-forwarding for ways to access a service running on a remote host. Use --open to open the UI in a web browser automatically.
Examples: squirrel service --dataset campaign.dataset.yaml – serve the data of a preconfigured dataset. squirrel service --add data/ --mantra mantras.yaml:restitution – serve the raw data together with the additional data produced by the restitution mantra defined in mantras.yaml.
Options:
- --mantra PATH[:PATTERN,...]
Read mantra configurations from PATH. If PATTERN(s) are specified, restrict execution to matching mantra names.
- --help-port-forwarding
Print help about how to set up SSH port forwarding or reverse proxying.
- --port INT
Set the port to bind to.
- --host HOST
IP address to bind to, or
publicto bind to what appears to be the public IPv4 address of the host in the local network, orip4-all,ip6-all,ip4-allto bind to all available interfaces of the protocol family, orlocalhost(default)ip4-localhostorip6-localhost.
- --open
Open in web browser.
- --page PATH
Serve custom pages from directory PATH.
- --cookie-secret-path PATH
Use cookie secret stored in file PATH. The file will be created on first run. Default:
None.
- --debug
Activate debug mode. In debug mode, server tracebacks are shown in the browser, verbosity level of the server logger is increased, auto-restart on module change is activated, and static pages are served from the Pyrocko sources directory (if available and not overridden with
--page) rather than from the installed 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:
- --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
🐿️