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

« back to all changes in this revision

Viewing changes to prim/proc/data.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
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
2
!
 
3
! MIDAS procedure data.prg implements WRITE/IMAGE 
 
4
! K. Banse      910104, 930324, 950306, 070314, 110125
 
5
!
 
6
! execute via WRITE/IMAGE  frame  pix_specs  data  all_flg  process_flg
 
7
!          or WRITE/IMAGE  CURSOR,option,[npx],[nln]  constant  process_flg
 
8
!
 
9
! ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
10
!
 
11
! save first letter of command in keyword ACTION
 
12
action(1:1) = mid$cmnd(1:1)
 
13
write/keyw history "WRITE/IMAGE "
 
14
 
15
define/param p1 ? IMA "Enter image name: "
 
16
define/local hidehead/c/1/1 N           !needed because of READ/IMAGE
 
17
!
 
18
if p1(1:6) .eq. "cursor" then           !here with CURSOR option
 
19
   define/maxpar 3
 
20
   write/keyw in_a *                    !this means the displayed frame
 
21
   define/param p2 ? N "Enter constant: "
 
22
   define/param p3 S C "Enter process flag: "
 
23
 
24
   write/keyw inputi/i/1/3 0,5,5
 
25
   write/keyw inputc {p2}               !store constant to write
 
26
   if p1(8:8) .eq. "1" then
 
27
      in_b(1:7) = "_CUR_1_"
 
28
   elseif p1(8:8) .eq. "C" then
 
29
      in_b(1:7) = "_CUR_C_"
 
30
      if  p1(9:9) .eq. "," then         !cursor,C,nolines
 
31
         if m$index(p1(10:),",") .gt. 1 then
 
32
            write/keyw inputi/i/2/2 {p1(10:)}   !npix[,nline] for window
 
33
         else
 
34
            inputi(2) = {p1(10:)}               !nline = npix for square w.
 
35
            inputi(3) = inputi(2)
 
36
         endif
 
37
      endif
 
38
   else
 
39
      in_b(1:7) = "_CUR_2_"
 
40
   endif
 
41
   cursor  = 9999
 
42
   if p3(1:2) .eq. "AL" then            !the mixup of the all flag...
 
43
      define/local process/c/1/1 S
 
44
   else
 
45
      define/local process/c/1/1 {p3(1:1)}      
 
46
   endif
 
47
 
48
else                                    !here with "real" image name
 
49
   define/maxpar 5
 
50
   write/keyw in_a {p1}
 
51
   define/param p2 <,<,20 C "Enter xsta,ysta,nopix: "
 
52
   define/param p5 S C "Enter process flag: "
 
53
 
54
   write/keyw in_b {p2}
 
55
   if mid$in(1:1) .ne. "F" then
 
56
      define/local nn/i/1/1 0
 
57
      nn = m$index(p2,",t")             !test for name,table
 
58
      if nn .lt. 1 nn = m$index(p2,",T")
 
59
      if nn .lt. 1 then
 
60
         define/param p3 ? N "Enter data values: "      !data required
 
61
      else
 
62
         define/param p3 + N "Enter data values: "      !data possible
 
63
      endif
 
64
   endif
 
65
   write/keyw inputc {p3}
 
66
   define/local process/c/1/1 {p5(1:1)} 
 
67
endif
 
68
!
 
69
run MID_EXE:DATA