2. Developer documentation
2.2. fdsnws2sds module
- exception fdsnwsscripts.fdsnws2sds.Error
Bases:
Exception
2.3. fdsnws2seed module
2.4. fdsnws_fetch module
A command-line FDSN Web Service client using EIDA routing and authentication.
2.4.1. Usage Examples
Request 60 minutes of the "LHZ" channel of EIDA stations starting with
"A" for a seismic event around 2010-02-27 07:00 (UTC). Optionally add
"-v" for verbosity. Resulting Mini-SEED data will be written to file
"data.mseed".
$ %(prog)s -N '*' -S 'A*' -L '*' -C 'LHZ' -s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" -v -o data.mseed
The above request is anonymous and therefore restricted data will not be included. To include restricted data, use a file containing a token obtained from an EIDA authentication service and/or a CSV file with username and password for each node not implementing the EIDA auth extension.
$ %(prog)s -a token.asc -c credentials.csv -N '*' -S 'A*' -L '*' -C 'LHZ' -s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" -v -o data.mseed
StationXML metadata for the above request can be requested using the following command:
$ %(prog)s -N '*' -S 'A*' -L '*' -C 'LHZ' -s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" -y station -q level=response -v -o station.xml
Multiple query parameters can be used:
$ %(prog)s -N '*' -S '*' -L '*' -C '*' -s "2010-02-27T07:00:00Z" -e "2010-02-27T08:00:00Z" -y station -q format=text -q level=channel -q latitude=20 -q longitude=-150 -q maxradius=15 -v -o station.txt
Bulk requests can be made in ArcLink (-f), breq_fast (-b) or native FDSNWS POST (-p) format. Query parameters should not be included in the request file, but specified on the command line.
$ %(prog)s -p request.txt -y station -q level=channel -v -o station.xml
- exception fdsnwsscripts.fdsnws_fetch.AuthNotSupported
Bases:
Exception
- exception fdsnwsscripts.fdsnws_fetch.Error
Bases:
Exception