1
! @(#)average.prg 3.1 (ESO-IPG) 3/23/92 11:10:29
2
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
! MIDAS procedure average.prg for AVERAGE/IMAGE, /WEIGHTS, /WINDOW
5
! K. Banse 880919, 910318, 920326, 930123, 931103
8
! AVER/IMA out = inframes [mergeflg] [null] [option] [valid_interval]
9
! with inframes: frame1,frame2,...,framen or catalog.cat
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]
15
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17
define/par p1 ? ima "Enter result frame: "
18
if p2(1:2) .ne. "= " then
19
write/out 2. parameter:
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: "
28
write/key history "AVERAGE/ROW"
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: "
36
write/key history "AVERAGE/COLUMN"
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:
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: "
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}"