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

« back to all changes in this revision

Viewing changes to stdred/mos/proc/average.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
! @(#)average.prg       3.1 (ESO-IPG) 3/23/92 11:10:29 
 
2
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
!
 
4
! MIDAS procedure  average.prg  for AVERAGE/IMAGE, /WEIGHTS, /WINDOW
 
5
! K. Banse      880919, 910318, 920326, 930123, 931103
 
6
 
7
! use via
 
8
! AVER/IMA out = inframes [mergeflg] [null] [option] [valid_interval]
 
9
! with inframes: frame1,frame2,...,framen  or  catalog.cat
 
10
 
11
! or      AVER/WEI out = inframes [mergeflg]  [null]
 
12
! and     AVER/ROW out = input start,end [NO]
 
13
! and     AVER/COL out = input start,end [NO]
 
14
!
 
15
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
16
!
 
17
define/par p1 ? ima "Enter result frame: "
 
18
if p2(1:2) .ne. "= " then
 
19
      write/out 2. parameter:
 
20
      goto errors
 
21
   endif
 
22
!
 
23
if mid$cmnd(11:13) .eq. "ROW" then              !AVERAGE/ROW
 
24
   define/par p3 ? ima "Enter input frame: "
 
25
   define/par p4 <,> c "Enter start,endpixel in row: "
 
26
   define/par p5 Y C
 
27
   define/maxpar 5
 
28
   write/key history "AVERAGE/ROW"
 
29
   run STD_EXE:AVEROW
 
30
!
 
31
elseif mid$cmnd(11:13) .eq. "COL" then          !AVERAGE/COL
 
32
   define/par p3 ? ima "Enter input frame:"
 
33
   define/par p4 <,> c "Enter start,endpixel in column: "
 
34
   define/par p5 Y C
 
35
   define/maxpar 5
 
36
   write/key history "AVERAGE/COLUMN"
 
37
   run STD_EXE:AVEROW
 
38
!
 
39
else                                    !AVERAGE/IMA + /WEIGHT
 
40
   define/par p3 ? c "Enter frame_list or catalog.cat: "
 
41
   define/par p4 N C "Enter merging option M(erge) or N(oMerge): "
 
42
   if p4(2:2) .ne. " " then
 
43
      write/out 4. parameter:
 
44
      goto errors
 
45
   endif
 
46
   define/par p5 {null(2)} c "Enter Null value for undefined pixels: "
 
47
   define/par p6 AV C "Enter option for averaging: "
 
48
   define/par p7 + n "Enter valid interval xlo,xhi: "
 
49
   define/maxpar 7
 
50
 
51
   write/key history "AVERAGE/{MID$CMND(11:14)}"
 
52
   write/key action/c/1/2 {p4(1:1)}{mid$cmnd(11:11)}
 
53
!   write/key out_a {p1}
 
54
   define/local out_a/c/1/60 "{p1}"
 
55
   run MID_EXE:AVERAG
 
56
!
 
57
endif
 
58
return
 
59
 
60
errors:
 
61
write/err 30