Debian Codegraph @

stdred/optopus/proc/finishopto.prg

raw
1 ! @(#)finishopto.prg 19.1 (ES0-DMD) 02/25/03 14:27:38
2 ! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 !.COPYRIGHT (c) 1991 European Southern Observatory
4 !.TYPE Procedure
5 !.IDENT finishopto.prg
6 !.AUTHOR Roland den Hartog, Sterrewacht Leiden
7 !.PURPOSE Read MIDAS table with object positions for OPTOPUS
8 ! and create ASCII command for drilling machine,
9 ! make necessary prints and plots
10 !.USAGE FINISH/OPTOPUS in_table [file] [plot_label] [flip]
11 !.VERSION 1.0 920722 RH Creation
12 !.VERSION 1.1 920810 RHW UNIX and VMS
13 ! ------------------------------------------------------------------
14 CROSSREF TABLE NAME
15 DEFINE/PARAM P1 opto3.tbl T "Enter name of OPTOPUS table [opto3.tbl]: "
16 DEFINE/PARAM P2 opto C "Enter name of output files (without extension) : "
17 DEFINE/PARAM P3 Optopus C "Enter label of plots : "
18 DEFINE/PARAM P4 {EWFLAG} C "EW flag: "
19 !
20 DEFINE/LOCAL INDX/I/1/1 0
21 DEFINE/LOCAL OUTPUTFI/C/1/80 " "
22 !
23 WRITE/KEYW IN_A/C/1/60 'P1'
24 WRITE/KEYW OUT_A/C/1/60 'P2'.dat
25 WRITE/KEYW PRINT/C/1/20 " " ALL
26 PRINT = M$SYMBOL("LASER")
27 !
28 ! *** here for the printout of the Optopus table
29 WRITE/KEYW OUTPUTFI 'P2'.lis
30 ASSIGN/PRINT FILE 'OUTPUTFI'
31 PRINT/TABLE {P1}
32 IF AUX_MODE(1) .LT. 2 THEN
33 $PRINT/QUEUE={PRINT} {OUTPUTFI}
34 ELSE
35 ! $lpr -h -P{PRINT} {OUTPUTFI}
36 $ {syscoms(1:16)}{PRINT} {OUTPUTFI}
37 ENDIF
38 !
39 ! *** here for the descriptor listing of the Optopus table
40 WRITE/KEYW OUTPUTFI 'P2'.dat
41 ASSIGN/PRINT FILE 'OUTPUTFI'
42 PRINT/DESC {P1}.tbl
43 IF AUX_MODE(1) .LT. 2 THEN
44 $PRINT/QUEUE={PRINT} {OUTPUTFI}
45 ELSE
46 ! $lpr -h -P{PRINT} {OUTPUTFI}
47 $ {syscoms(1:16)}{PRINT} {OUTPUTFI}
48 ENDIF
49 !
50 ! *** here for the printout of the drill
51 RUN STD_EXE:OPTPLATE
52 !IF AUX_MODE(1) .LT. 2 THEN
53 ! $PRINT/QUEUE={PRINT} {OUT_A}
54 !ELSE
55 ! $lpr -h -P{PRINT} {OUT_A}
56 !ENDIF
57 !
58 ! *** here for the drill plot
59 ASSIGN/PLOT {PRINT} NOSPOOL
60 PLOT/OPTO {P1} {P3} {P4}
61 WRITE/KEYW OUTPUTFI {P2}.plt
62 IF AUX_MODE(1) .LT. 2 THEN
63 $RENAME axes.plt {OUTPUTFI}
64 ELSE
65 $mv axes.plt {OUTPUTFI}
66 ENDIF
67 COPY/GRAPH {PRINT} {OUTPUTFI}
68 !
69 WRITE/OUT "Please pick up your results at the printer {PRINT}"
70 WRITE/OUT "Your will find - the Optopus table with XY positions;"
71 WRITE/OUT " - the descriptor listing of the table;"
72 WRITE/OUT " - and a plot of the XY positions."
73 WRITE/OUT "Your Optopus drill command file is: {OUT_A}"
74 !
75 SAVE/OPTO {P1} ! save the session
76 ASSIGN/GRAPH GRAPH
77