1 | ! file SHSTRTUP.SHC |
---|
2 | ! ============ |
---|
3 | ! |
---|
4 | ! version 7, 17-Aug-93 |
---|
5 | ! |
---|
6 | ! common startup file of SH |
---|
7 | ! K. Stammler, 18-Sep-92 |
---|
8 | |
---|
9 | ! variables |
---|
10 | sdef path ! path name |
---|
11 | sdef ostype ! type of operating system |
---|
12 | sdef file ! file name |
---|
13 | |
---|
14 | ! this is a startup file |
---|
15 | switch startup off |
---|
16 | |
---|
17 | ! get type of operating system |
---|
18 | fct get_os &ostype |
---|
19 | |
---|
20 | ! setup output channels |
---|
21 | if "ostype eqs atari-tos goto/forward atari_out: |
---|
22 | wdw/dc=s/ic=s/main |
---|
23 | wdw/ic=s |
---|
24 | goto/forward output_ok: |
---|
25 | atari_out: |
---|
26 | ! create DeskJet channel |
---|
27 | wdw create d 0 0 100 100 |
---|
28 | hc/default=d |
---|
29 | ! create text window |
---|
30 | wdw/dc=g1/ic=g1/main/attribs=nfms create g1 2.5 0.0 33.1 3.6 |
---|
31 | ! create graphics window |
---|
32 | wdw/gc=g2h/main/attribs=nfms create g2h 2.5 4.0 33.1 21.0 |
---|
33 | ! set local windows |
---|
34 | wdw/ic=g1/gc=g2d |
---|
35 | output_ok: |
---|
36 | |
---|
37 | |
---|
38 | ! do setup for all types of operating system |
---|
39 | !@ECHO |
---|
40 | !@ECHO SeismicHandler, version $VERSION (K. Stammler) |
---|
41 | !@ECHO processing startup file ... |
---|
42 | !@ECHO |
---|
43 | fct axis timeaxis vpos -0.1 |
---|
44 | fct axis timeaxis lab1cnt 1 |
---|
45 | fct axis timeaxis labcnt 5 |
---|
46 | fct axis timeaxis tick_lth 0.025 |
---|
47 | fct axis timeaxis ltick_lth 0.05 |
---|
48 | fct axis timeaxis labshift -0.02 |
---|
49 | fct axis timeaxis labdist -0.1 |
---|
50 | fct axis timeaxis style 7 |
---|
51 | fct axis timeaxis plot on |
---|
52 | fct axis timeaxis labfmt <%4.1@f> |
---|
53 | fct axis y-axis vpos -0.03 |
---|
54 | fct axis y-axis lab1cnt 1 |
---|
55 | fct axis y-axis labcnt 4 |
---|
56 | fct axis y-axis tick_lth 0.013 |
---|
57 | fct axis y-axis ltick_lth 0.026 |
---|
58 | fct axis y-axis labshift -0.01 |
---|
59 | fct axis y-axis labdist -0.1 |
---|
60 | fct axis y-axis style 7 |
---|
61 | fct axis y-axis plot off |
---|
62 | fct axis y-axis labfmt <%4.1@f> |
---|
63 | trctxtp -.13 -.02 |
---|
64 | trctxt |$x|:| ^station($x) ^comp($x) |
---|
65 | log labshift -0.015 -0.04 -0.05 -0.015 |
---|
66 | title/wdw=1 1;;0 -.3 |
---|
67 | title/wdw=1 2;;0 -.4 |
---|
68 | title/wdw=1 3;;1.15 0.05 |
---|
69 | fct corrmode 3 |
---|
70 | switch cmderrstop on |
---|
71 | sdef/global ret x |
---|
72 | sdef/global g1 |
---|
73 | sdef/global g2 |
---|
74 | sdef/global g3 |
---|
75 | entry define sign i 6 11 |
---|
76 | entry define eventno i 7 12 |
---|
77 | entry define mark i 8 14 |
---|
78 | entry define calib r 1 26 |
---|
79 | entry define distance r 2 11 |
---|
80 | entry define azimuth r 4 12 |
---|
81 | entry define slowness r 3 18 |
---|
82 | entry define inci r 12 13 |
---|
83 | entry define depth r 13 14 |
---|
84 | entry define magnitude r 14 15 |
---|
85 | entry define lat r 15 16 |
---|
86 | entry define lon r 16 17 |
---|
87 | entry define signoise r 17 22 |
---|
88 | entry define pwdw r 18 23 |
---|
89 | entry define dcvreg r 19 24 |
---|
90 | entry define dcvinci r 20 25 |
---|
91 | entry define filter s 10 11 |
---|
92 | entry define quality s 11 12 |
---|
93 | entry define p-onset t 1 22 |
---|
94 | entry define s-onset t 2 23 |
---|
95 | entry define origin t 3 24 |
---|
96 | ! entry define reverse f 0 10 |
---|
97 | ! entry define corrinci f 1 11 |
---|
98 | entry define byteorder f 3 3 |
---|
99 | |
---|
100 | ! delete all logicals |
---|
101 | delalog |
---|
102 | @DEFLOG DATA \data\d1\detector\seed_data\ |
---|
103 | |
---|
104 | ! character sizes |
---|
105 | fct getpath userdir &path |
---|
106 | usp_charsize |"path|sh_user_text_size| |
---|
107 | |
---|
108 | |
---|
109 | ! now branch to system specific stuff |
---|
110 | if "ostype eqs UNIX goto/forward os_unix: |
---|
111 | if "ostype eqs VAX-VMS goto/forward os_vms: |
---|
112 | if "ostype eqs ATARI-TOS goto/forward os_atari: |
---|
113 | if "ostype eqs MS-DOS goto/forward os_dos: |
---|
114 | echo $blank |
---|
115 | @ECHO unknown operating system: "ostype |
---|
116 | @ECHO aborting program |
---|
117 | this will abort SH |
---|
118 | |
---|
119 | |
---|
120 | |
---|
121 | !------------------------------------- |
---|
122 | ! this is UNIX stuff |
---|
123 | !------------------------------------- |
---|
124 | |
---|
125 | os_unix: |
---|
126 | |
---|
127 | !echo |
---|
128 | !@ECHO processing UNIX startup |
---|
129 | !@ECHO reading IASP91 mantle velocities |
---|
130 | fct local getenv:sh_inputs &path |
---|
131 | fct read_vel |"path|iasp91_efa| |
---|
132 | !@ECHO set paths for input files |
---|
133 | fct tt_table "path |
---|
134 | fct fername |"path|fername.dat| |
---|
135 | fct ferindex |"path|fereg.dat| |
---|
136 | fct inci_table |"path|pinci.dat| |
---|
137 | !fct locfile |"path|statinf.dat| |
---|
138 | |
---|
139 | ! define logicals |
---|
140 | fct local getenv:home &path |
---|
141 | calc s &path = |"path|$slash| |
---|
142 | deflog home "path |
---|
143 | fct local getenv:sh_scratch &path |
---|
144 | deflog scratch "path |
---|
145 | goto/forward do_user_startup: |
---|
146 | |
---|
147 | |
---|
148 | |
---|
149 | os_vms: |
---|
150 | |
---|
151 | !------------------------------------- |
---|
152 | ! this is VAX/VMS stuff |
---|
153 | !------------------------------------- |
---|
154 | |
---|
155 | echo |
---|
156 | @ECHO processing VAX-VMS startup |
---|
157 | @ECHO reading IASP91 mantle velocities |
---|
158 | fct read_vel shc_inputs:iasp91_efa |
---|
159 | @ECHO set paths for input files fername,ferindex,inci_table,locfile |
---|
160 | fct fername shc_inputs:fername.dat |
---|
161 | fct ferindex shc_inputs:fereg.dat |
---|
162 | fct inci_table shc_inputs:pinci.dat |
---|
163 | !fct locfile shc_inputs:statinf.dat |
---|
164 | fct tt_table shc_inputs: |
---|
165 | fct path inputs shc_inputs: |
---|
166 | goto/forward do_user_startup: |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | os_atari: |
---|
171 | |
---|
172 | !------------------------------------- |
---|
173 | ! this is ATARI stuff |
---|
174 | !------------------------------------- |
---|
175 | |
---|
176 | echo |
---|
177 | @ECHO processing ATARI startup |
---|
178 | fct setstyle $titlestyle charsize_atari 13 |
---|
179 | fct setstyle $pmstyle charsize_atari 6 |
---|
180 | fct setstyle $timeaxisstyle charsize_atari 6 |
---|
181 | fct setstyle $trcinfostyle charsize_atari 6 |
---|
182 | fct setstyle $zerotrcstyle linestyle 3 |
---|
183 | fct margin b .25 |
---|
184 | fct margin l .2 |
---|
185 | fct margin r .05 |
---|
186 | fct margin t .08 |
---|
187 | fct axis timeaxis vpos -0.03 ! -0.1 |
---|
188 | trctxtp -.18 -.005 |
---|
189 | title/wdw=2 1;;0 -0.18 |
---|
190 | title/wdw=2 2;;0 -0.225 |
---|
191 | title/wdw=2 3;;0 1.03 |
---|
192 | @ECHO reading mantle velocities ... |
---|
193 | fct read_vel shc_inputs:iasp91 |
---|
194 | fct tt_table_old shc_inputs:travtime.dat |
---|
195 | fct tt_table shc_inputs: |
---|
196 | fct inci_table shc_inputs:pinci.dat |
---|
197 | goto/forward do_user_startup: |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | os_dos: |
---|
202 | |
---|
203 | !------------------------------------- |
---|
204 | ! this is MS-DOS stuff |
---|
205 | !------------------------------------- |
---|
206 | |
---|
207 | goto/forward do_user_startup: |
---|
208 | |
---|
209 | |
---|
210 | do_user_startup: |
---|
211 | |
---|
212 | ! user setup |
---|
213 | ! ---------- |
---|
214 | ! |
---|
215 | ! try to find user startup |
---|
216 | switch sherrstop off |
---|
217 | switch cmderrstop off |
---|
218 | switch noerrmsg on |
---|
219 | fct getpath userdir &path |
---|
220 | |"path|sh_user_startup| |
---|
221 | if $status eqi 0 goto/forward user_startup_ok: |
---|
222 | ! echo $blank |
---|
223 | !@ ECHO no user startup available |
---|
224 | ! echo $blank |
---|
225 | user_startup_ok: |
---|
226 | switch noerrmsg off |
---|
227 | switch cmderrstop on |
---|
228 | switch sherrstop on |
---|
229 | |
---|
230 | return |
---|