1
! @(#)plotgra.prg 19.2 (ESO-DMD) 06/05/03 11:34:02
2
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
!.IDENTIFICATION: PLOTGRA.PRG
4
!.PURPOSE: MIDAS procedure to produce a gray scale map of a two-dim.
5
!.USE: PLOT/GRAY P1 [P2] [P3] [P4] [P5] [P6] [P7]
6
! OVERPLOT/GRAY P1 [P2] [P3] [P4] [P5] [P6] where:
7
! P1: image is the image to be plotted
8
! P2: coord_string is the area
9
! P3: scal_x,scal_y, off_x,off_y
11
! P5/P4: smooth_par is the parameter which represents the
12
! size of smoothing box
13
! P6/P5: determines the greyness of the plot (0.0 --> 1.0)
14
! P7/P6: options in the format option1[,option2[,option3]]
16
! LOG = logarythmic greyness (def.: LINEAR)
17
! NEG = inverse grey scale (def.: original values)
18
! ABS = abs. values are taken (def.: not absolute)
19
! STAP = greyness increases stepw. (def.: CONTINUOUS)
21
!.AUTHOR: R.H. Warmels, ESO - Garching 870806
22
!.VERSION: K.Banse 880922, 900409, 900712, 920413
23
!.VERSION: R.H. Warmels 890601
24
!.VERSION: 920224 RHW Offset in x and y included
25
!----------------------------------------------------------------------------
28
define/local cmnd/c/1/20 "{mid$cmnd(1:20)}" !save initial command
30
IF PLRSTAT(1) .EQ. 0.0 .AND. PLRSTAT(2) .EQ. 0.0 THEN
31
IF PLRSTAT(5) .EQ. 0.0 .AND. PLRSTAT(6) .EQ. 0.0 THEN
32
DEFINE/PARAM P2 [<,<:>,>] C
33
IF P2(1:1) .EQ. "M" THEN
34
WRITE/OUT "*** FATAL: axes not properly set; use SET/GRAPHICS"
38
DEFINE/PARAM P2 MANUAL C
41
DEFINE/PARAM P2 MANUAL C
44
!if mid$sess(7:7) .eq. " " .or. mid$sess(7:7) .eq. "-" then
46
! write/keyw mid$cmnd/c/1/20 "{cmnd(1:20)}" !reset MID$CMND
50
IF P1 .NE. "?" LOAD/IMAGE {P1}
51
GET/CURSOR ? ? NN 1,2 ! use cursor rectangle once
52
write/keyw mid$cmnd/c/1/20 "{cmnd(1:20)}" !reset MID$CMND
58
IF MID$CMND(1:1) .EQ. "P" THEN
59
DEFINE/PARAM P3 0.0,0.0,-999,-999 NUM
63
DEFINE/PARAM P6 1.0 NUM
64
DEFINE/PARAM P7 "CONT,LINE,POS"
66
WRITE/KEYW INPUTC/C/1/40 {P4}
67
WRITE/KEYW INPUTI/I/1/1 {P5} ! smoothing parameter
68
WRITE/KEYW INPUTR/R/3/1 {P6} ! grayness parameter
69
WRITE/KEYW INPUTC/C/41/40 {P7} ! options
74
DEFINE/PARAM P5 1.0 NUM
75
DEFINE/PARAM P6 "CONT,LINE,POS"
77
WRITE/KEYW INPUTC/C/1/40 {P3}
78
WRITE/KEYW INPUTI/I/1/1 {P4} ! smoothing parameter
79
WRITE/KEYW INPUTR/R/3/1 {P5} ! grayness parameter
80
WRITE/KEYW INPUTC/C/41/40 {P6} ! options
83
RUN MID_EXE:PLOTGRA ! make the bloddy plot
84
WRITE/KEYW PLCDATA/C/1/60 {P1} ! name, type data struct.
85
WRITE/KEYW PLCDATA/C/61/20 "FRAME "