1 | ! file mapslow_wavedsp.shc |
---|
2 | ! =================== |
---|
3 | ! |
---|
4 | ! version 1, 13-Mar-2003 |
---|
5 | ! |
---|
6 | ! Display beam traces |
---|
7 | ! |
---|
8 | ! K. Stammler, 13-Mar-2003 |
---|
9 | |
---|
10 | default 1 grf station list |
---|
11 | default 2 time center time |
---|
12 | default 3 seclth length of window |
---|
13 | default 4 cutlth cut length at start |
---|
14 | default 5 slow slowness |
---|
15 | default 6 baz back azimuth |
---|
16 | default 7 filter filter to apply |
---|
17 | default 8 ;; origin time |
---|
18 | default 9 ;; distance |
---|
19 | default 10 ;; depth |
---|
20 | default 11 z component |
---|
21 | |
---|
22 | sdef rtime ! read time |
---|
23 | sdef rlth ! read length |
---|
24 | sdef tmp ! scratch |
---|
25 | sdef key ! key pressed |
---|
26 | sdef daysold ! that man days old |
---|
27 | sdef rpath db: ! read path |
---|
28 | |
---|
29 | calc r &tmp = #3 div 2 |
---|
30 | !calc r &tmp = #3 |
---|
31 | calc t &rtime = #2 tadd |-|"tmp| |
---|
32 | calc t &rtime = "rtime tadd |-|#4| |
---|
33 | |
---|
34 | calc r &rlth = #3 + #4 |
---|
35 | |
---|
36 | ! disabled for use in Beijing !!! |
---|
37 | !! check how old is the data |
---|
38 | !unix_time |
---|
39 | !calc t &daysold = "g1 tdiff #2 |
---|
40 | !calc r &daysold = "daysold div 86400 |
---|
41 | !if "daysold ltr 40 goto/forward path_ok: |
---|
42 | ! calc s &rpath = jk: |
---|
43 | !path_ok: |
---|
44 | |
---|
45 | nr |
---|
46 | |
---|
47 | if #11 eqs z goto/forward read_z: |
---|
48 | readhoriz_lnx "rpath "rtime "rlth #1 #11 bh #6 |
---|
49 | goto/forward read_ok: |
---|
50 | read_z: |
---|
51 | !reads/noswap/invhdr "rpath "rtime "rlth #1 z bh |
---|
52 | ! changed for use in Beijing |
---|
53 | reads/noswap "rpath "rtime "rlth #1 z bh |
---|
54 | read_ok: |
---|
55 | fili f #7 |
---|
56 | calc i &tmp = $dsptrcs |
---|
57 | filter f all |
---|
58 | del |1-|"tmp| |
---|
59 | demean all |
---|
60 | |
---|
61 | shift all |-|#4| |
---|
62 | beam all #6 #5 |
---|
63 | sum all |
---|
64 | cut all 0 #3 |
---|
65 | zoom all 1.5 |
---|
66 | |
---|
67 | calc s &tmp = |^start|$blank|slow:|#5|$blank|baz:| |
---|
68 | title 1 |"tmp|#6|$blank|fil:|#7| |
---|
69 | |
---|
70 | rd |
---|
71 | |
---|
72 | loop_start: |
---|
73 | |
---|
74 | time &tmp;;;;&key |
---|
75 | echo "tmp |
---|
76 | |
---|
77 | if "key eqs e goto/forward loop_exit: |
---|
78 | if "key eqs q goto/forward loop_exit: |
---|
79 | if "key eqs u goto/forward fct_zoom_up: |
---|
80 | if "key eqs d goto/forward fct_zoom_down: |
---|
81 | if "key eqs t goto/forward fct_show_theo: |
---|
82 | |
---|
83 | fct_zoom_up: |
---|
84 | zoom/rel all 1.5 |
---|
85 | goto loop_start: |
---|
86 | |
---|
87 | fct_zoom_down: |
---|
88 | zoom/rel all 0.6666 |
---|
89 | goto loop_start: |
---|
90 | |
---|
91 | fct_show_theo: |
---|
92 | markp_ii 1 0.0 mapslowlist #9 #10 #8 0.4 |
---|
93 | goto loop_start: |
---|
94 | |
---|
95 | goto loop_start: |
---|
96 | loop_exit: |
---|
97 | |
---|
98 | return |
---|