Help with web service Fetch scripts¶
- Table of contents
- Help with web service Fetch scripts
Overview of scripts¶
FetchData (Perl)
Fetch time series and optionally, related metadata, matching SAC Poles and Zeros and matching SEED RESP files. Time series data are returned in miniSEED format, metadata is saved as a simple ASCII list.
FetchMetadata (Perl)
Fetch station metadata and output simple ASCII. Optionally, the XML returned by the service can be saved.
FetchEvent (Perl)
Fetch event parameters and print simple ASCII summary.
FetchSyn (Python)
Fetch synthetics seismograms from the IRIS Syngine service.
FetchSyn usage
Quick start¶
- Download the latest version of desired scripts from the Files section
- Make the scripts executable (e.g 'chmod +x FetchData-2013.077')
- Run script to print usage message
Tutorial with examples¶
See Running the scripts and examples
Using the scripts with data centers other than the IRIS DMC¶
See Use with other data centers
Running the Perl scripts on Windows¶
Most Windows computers do not have Perl by default and one must be installed. Any distribution of Perl should work as long as the required modules are included. The Strawberry Perl distribution for Windows is known to work and is recommended. Downloads are available here:
Once installed, the Fetch scripts may be run from a command prompt (either Windows PowerShell or Command Prompt) by typing perl
followed by the name of the script. For example:
PS C:\Users\username\Downloads> perl .\FetchData-2015.246
Note: the Fetch scripts are command-line oriented with no GUI, double-clicking them in Explorer using does not do anything useful.
Perl Requirements¶
The Perl scripts should run with any relatively recent Perl interpreter. In some cases, particularly for older Perl releases, you might need to install some required modules, namely XML::SAX and Bundle::LWP (libwww-perl). The procedure to install these modules is system dependent, for most Unix/Linux OSes they can be installed using the package management system. In addition to Perl only network access to the IRIS DMC's web server is needed.
For large data requests installing the XML::SAX::ExpatXS Perl module will significantly increase the parsing speed of XML metadata used by all scripts.