source: SH_SHM/trunk/command/SHSTRTUP.SHC @ 185

Revision 185, 5.3 KB checked in by marcus, 13 years ago (diff)

r106 | walther | 2010-01-20 16:57:03 +0100 (Mi, 20 Jan 2010) | 2 lines

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