FetchSyn usage » History » Version 11

Alexander Hutko, 12/10/2015 10:11 AM

1 1 Alexander Hutko
h1. FetchSyn usage
2 1 Alexander Hutko
3 10 Chad Trabant
{{>toc}}
4 6 Alexander Hutko
5 7 Alexander Hutko
h2. Download
6 7 Alexander Hutko
7 7 Alexander Hutko
Users should download the latest version:  "FetchSyn":https://seiscode.iris.washington.edu/projects/ws-fetch-scripts/files
8 1 Alexander Hutko
9 1 Alexander Hutko
h2. Executing the scripts
10 1 Alexander Hutko
11 1 Alexander Hutko
After downloading the scripts they can be executed from the command line either by explicitly invoking python or by making the scripts executable and installing the path to python in the first line.  To explicitly invoke python to execute a script type the following:
12 1 Alexander Hutko
13 1 Alexander Hutko
<pre>
14 1 Alexander Hutko
$ python FetchSyn
15 1 Alexander Hutko
</pre>
16 1 Alexander Hutko
17 11 Alexander Hutko
Note: currently FetchSyn is written for python2 and will not run in python3.  We are working to fix this.
18 11 Alexander Hutko
19 2 Alexander Hutko
h2. Help menu to list parameters
20 1 Alexander Hutko
21 1 Alexander Hutko
To access the help menu, which lists all input parameters:
22 1 Alexander Hutko
23 1 Alexander Hutko
<pre>
24 1 Alexander Hutko
$ FetchSyn --u
25 1 Alexander Hutko
</pre>
26 1 Alexander Hutko
27 1 Alexander Hutko
h2. Examples
28 1 Alexander Hutko
29 2 Alexander Hutko
To generate a synthetic for IU.ANMO for the Tohoku earthquake using it's GCMT origin and moment tensor:
30 1 Alexander Hutko
31 1 Alexander Hutko
<pre>
32 10 Chad Trabant
$ FetchSyn --N IU --S ANMO --evid GCMT:M201103110546A
33 2 Alexander Hutko
</pre>
34 2 Alexander Hutko
35 2 Alexander Hutko
Same request, but add station KIP and make the source depth 35km and return the vertical (Z), radial (R) and transverse (T) components rather than the default ZNE components:
36 2 Alexander Hutko
37 2 Alexander Hutko
<pre>
38 10 Chad Trabant
$ FetchSyn --N IU --S ANMO,KIP --C ZRT --evid GCMT:M201103110546A --sdepm 35000
39 2 Alexander Hutko
</pre>
40 2 Alexander Hutko
41 2 Alexander Hutko
42 2 Alexander Hutko
Same request, but:
43 2 Alexander Hutko
*include all stations in the virtual network _GSN
44 2 Alexander Hutko
*use a different model
45 2 Alexander Hutko
*change the sample rate to 0.05 sps
46 2 Alexander Hutko
*make the output miniseed rather than saczip
47 2 Alexander Hutko
*return velocity not the default (displacement)
48 2 Alexander Hutko
*cut the traces to 10 seconds before P
49 2 Alexander Hutko
*make traces 300 seconds in duration
50 2 Alexander Hutko
51 2 Alexander Hutko
<pre>
52 4 Alexander Hutko
$ FetchSyn --N _GSN --model prem_a_20s --dt 0.05 --format mseed --units velocity --start P-10 --end 300 --C ZRT --evid GCMT:M201103110546A --sdepm 35000
53 2 Alexander Hutko
</pre>
54 1 Alexander Hutko
55 8 Alexander Hutko
h3. Manually input source and use a file with a list of receivers
56 1 Alexander Hutko
57 4 Alexander Hutko
Example using a text file with receiver names.  Each line of the receiver file is an example of valid formatting.  The networkcode, stationcode, locationcode in the later lines is optional.
58 4 Alexander Hutko
59 9 Alexander Hutko
recfile.txt:
60 1 Alexander Hutko
<pre>
61 4 Alexander Hutko
IU ANMO 
62 4 Alexander Hutko
II *
63 4 Alexander Hutko
-89 -179
64 4 Alexander Hutko
-89 -178 S0002
65 4 Alexander Hutko
-89 -177 N2 S0003 L2
66 1 Alexander Hutko
</pre>
67 2 Alexander Hutko
68 4 Alexander Hutko
Manually input the origin using a double couple source (strike,dip,rake[,optional_scalar_moment_in_NM])
69 2 Alexander Hutko
70 2 Alexander Hutko
<pre>
71 4 Alexander Hutko
$ FetchSyn --recfile rec.txt --origin 2011,03,11,05,46,24 --slat 38.3 --slon 142.3 --sdepm 24400 --dc 203,10,88,5.3e22 --C Z
72 1 Alexander Hutko
</pre>