~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to prim/proc/plotgra.prg

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 
 
10
!          P4/P3: grey scales
 
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]]
 
15
!                 options can be: 
 
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)
 
20
!
 
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
!----------------------------------------------------------------------------
 
26
 
27
DEFINE/PARAM P1 *         IMA
 
28
define/local cmnd/c/1/20 "{mid$cmnd(1:20)}"          !save initial command
 
29
!
 
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"
 
35
         RETURN
 
36
      ENDIF
 
37
   ELSE
 
38
      DEFINE/PARAM P2 MANUAL   C
 
39
   ENDIF
 
40
ELSE
 
41
   DEFINE/PARAM P2 MANUAL   C
 
42
ENDIF
 
43
!
 
44
!if mid$sess(7:7) .eq. " " .or. mid$sess(7:7) .eq. "-" then
 
45
!   create/graphics
 
46
!   write/keyw mid$cmnd/c/1/20 "{cmnd(1:20)}"            !reset MID$CMND
 
47
!endif
 
48
!
 
49
IF P2 .EQ. "C" THEN
 
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
 
53
ENDIF
 
54
!
 
55
WRITE/KEYW IN_A {P1}
 
56
WRITE/KEYW IN_B {P2}
 
57
!
 
58
IF MID$CMND(1:1) .EQ. "P" THEN
 
59
   DEFINE/PARAM P3 0.0,0.0,-999,-999 NUM
 
60
   @ plscoff.prg_o {P3}
 
61
   DEFINE/PARAM P4 DEF       C
 
62
   DEFINE/PARAM P5 0         NUM
 
63
   DEFINE/PARAM P6 1.0       NUM
 
64
   DEFINE/PARAM P7 "CONT,LINE,POS"
 
65
!
 
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
 
70
   DATTIM = M$TIME()
 
71
ELSE
 
72
   DEFINE/PARAM P3 DEF     C
 
73
   DEFINE/PARAM P4 0       NUM
 
74
   DEFINE/PARAM P5 1.0     NUM
 
75
   DEFINE/PARAM P6 "CONT,LINE,POS"
 
76
!
 
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
 
81
ENDIF
 
82
!
 
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       "
 
86
copy/graph
 
87