Debian Codegraph @

stdred/optopus/proc/tutoopto.prg

raw
1 ! @(#)tutoopto.prg 19.1 (ES0-DMD) 02/25/03 14:27:40
2 ! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !.IDENTIFICATION: TUTOOPTO.PRG
4 !.PURPOSE: Demo. procedure for the OPTOPUS package
5 !.USE: Execute as TUTORIAL/OPTOPUS
6 ! The following files are copied into your directory :
7 ! optopus.dat optopus.fmt: test data and format file
8 ! --------------------------------------------------------------------
9 !
10 write/out " ***** Tutorial for the OPTOPUS package *****"
11 write/out " "
12 write/out "This tutorial creates the following files:"
13 write/out " - One test table and format file: optopus.dat and optopus.fmt"
14 write/out " - One output table containing the hole positions on the OPTOPUS"
15 write/out " late: prova1.tbl"
16 write/out " - Two output tables containing the instructions for the milling"
17 write/out " machine to drill the holes (one in ASCII, one in MIDAS table "
18 write/out " format"
19 write/out "First we copy the ascci table and the format file."
20 !
21 -COPY MID_TEST:optopus.dat optopus.dat
22 -COPY MID_TEST:optopus.fmt optopus.fmt
23 create/graphic
24 !
25 define/local flag/i/1/1 0
26 echo/on
27 set/opt label=f034 date=1992,09,20 extim=60.
28 set/opt sitslt=22.0,0.0 ost=23.0
29 set/opt cra=23,57,27.737 cdec=-40,00,00.0
30 show/opt
31 echo/off
32 !
33 echo/on
34 write/out "*** First, create the object table and calculate the"
35 write/out " precessed positions."
36 create/opt optopus prova optopus.fmt ! *** create the tables
37 precess/opt prova ! *** do the precession
38 holes/opt prova prova1 ? ? N ! *** calculate the x and y positions
39 echo/off
40 !
41 indietro:
42 write/out "*** Now, plot the positions of the objects"
43 echo/on
44 modi/opt prova
45 echo/off
46 write/out " "
47 inquire/keyw flag " Enter 1 to zoom the plot, enter 0 to continue:"
48 if flag .EQ. 0 goto avanti
49 write/out " To executing the zooming: when the cursor is on, click the "
50 write/out " leftmost button of the mouse on the position to be zoomed; "
51 write/out " thereafter click the rightmost button"
52 echo/on
53 zoom/opt prova
54 echo/off
55 write/out " "
56 inquire/keyw flag " For re-display enter 1, to continue enter 0:"
57 if flag .EQ. 1 goto indietro
58 !
59 avanti:
60 write/out " "
61 write/out "*** Now, redraw the positions of the holes"
62 echo/on
63 holes/opt prova prova1 ? ? N
64 refrac/opt prova1 prova2
65 plot/opt prova2 ! plot the hole positions
66 copy/graph postscript ! copy the graph to potscript
67 $mv postscript.ps prova2.ps
68 echo/off
69 !
70 write/out " "
71 write/out "*** Now, we make the instruction file for the milling machine"
72 echo/on
73 drill/opt prova2 f034
74 save/opt prova2
75 assign/print file f034tab.txt
76 $mv prova2.tbl f034.tbl
77 print/table f034.tbl
78 assign/print file f034des.txt
79 print/desc f034.tbl *
80 echo/off
81 write/out " *** ALL DONE ****"
82 write/out " The plot is stored in the postscript file prova2.ps. "
83 write/out " Table content and and table descriptor info can be found in "
84 write/out " in the files f034tabl.txt and f034des.txt. "
85 write/out " *** HAVE A GOOD RUN ****"
86 ! $mv f034.tbl prova2.tbl
87 ! rm prova*.tbl
88
89
90
91
92
93
94
95
96
97
98