~ubuntu-branches/ubuntu/wily/eso-midas/wily-proposed

« back to all changes in this revision

Viewing changes to prim/help/replacimag.hlq

  • 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
% @(#)replacimag.hlq    19.1 (ESO-IPG) 02/25/03 14:03:40 
 
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
3
%.COPYRIGHT  (c)  1990 European Southern Observatory
 
4
%.IDENT      replacimag.hlq
 
5
%.AUTHOR     KB, IPG/ESO
 
6
%.KEYWORDS   MIDAS, help files, REPLACE/IMAGE
 
7
%.PURPOSE    On-line help file for the command: REPLACE/IMAGE
 
8
%.VERSION    1.0  30-JAN-1990 : Creation, KB
 
9
%----------------------------------------------------------------
 
10
\se
 
11
SECTION./IMAG
 
12
\es\co
 
13
REPLACE/IMAGE                                           06-JUN-2001  KB
 
14
\oc\su
 
15
REPLACE/IMAGE in out [test/]low,hi=express1[,express2]
 
16
        replace pixels according to intensity
 
17
\us\pu
 
18
Purpose:      
 
19
           For all pixels in a test frame with intensities in a given interval
 
20
           the values of the corresponding pixels of the input frame are
 
21
           replaced with the result of an algebraic expression.
 
22
\up\sy
 
23
Syntax:       
 
24
           REPLACE/IMAGE in out [test/]low,hi=express1[,express2]
 
25
\ys\pa
 
26
           in = primary input frame
 
27
\ap\pa
 
28
           out = output frame, if output frame equal to input frame or if
 
29
               set to `+', the replacements are done in the input frame
 
30
\ap\pa
 
31
           test = optional different test frame, if omitted (also no '/'),
 
32
               the primary input frame will be used as test frame
 
33
\ap\pa
 
34
           low,hi = lower + upper limit (as real numbers) of intensity interval
 
35
               in the test frame for replacements;
 
36
               low may be set to "<" to indicate neg. infinity
 
37
               hi may be set to ">" to indicate pos. infinity
 
38
\ap\pa
 
39
           express1 = algebraic expression to calculate the replacement value
 
40
               for all pixels in the interval [low,hi]
 
41
               a) real constant
 
42
               b) auxiliary input frame
 
43
               c) aux op constant, op = basic operation (+, -, * or /)
 
44
                  The blanks above are just for better readability, NO blanks
 
45
                  are possible in the actual expression (e.g. ima/12.3);
 
46
                  Negative constants have to be enclosed in parentheses.
 
47
                  Auxiliary frame must come first, constant last.
 
48
\ap\pa
 
49
           express2 = optional algebraic expression (same syntax as express1)
 
50
               to calculate the value for all pixels with intensities outside
 
51
               the interval [low,hi]
 
52
\ap\sa
 
53
See also:
 
54
           FILTER/IMAGE, COMPUTE/IMAGE, REPLACE/POLYGON
 
55
           @a replace.prg 
 
56
\as\no
 
57
Note:         
 
58
           All images involved must have same dimensions!
 
59
           Outside the interval [low,hi] the output frame will be equal
 
60
           to the input frame. unless a second expression is given.
 
61
           The total no. of pixels which have been replaced, i.e. found inside
 
62
           the interval [lo,hi], is also stored into keyword OUTPUTI(15).
 
63
 
 
64
           For more complicated expressions than the ones indicated above
 
65
           for the parameter `express1' or `express2', use the Midas command
 
66
           "@a replace" (Help for that is obtained via "HELP/APPLIC replace").
 
67
 
 
68
           OJO: This command does NOT update the min, max value of the result
 
69
                frame stored in descr. LHCUTS(3,4), instead the values from 
 
70
                the input frame are copied over.
 
71
\on\exs
 
72
Examples:
 
73
\ex
 
74
           REPLACE/IMAGE a c 2.001,2.02=2.1
 
75
             is equivalent to:
 
76
             if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
 
77
                c(n) = 2.1
 
78
             else
 
79
                c(n) = a(n)
 
80
             endif
 
81
\xe\ex
 
82
           REPLACE/IMAGE a c 2.001,2.02=b   
 
83
             is equivalent to:
 
84
             if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
 
85
                c(n) = b(n)
 
86
             else
 
87
                c(n) = a(n)
 
88
             endif
 
89
\xe\ex
 
90
           REPLACE/IMAGE a c 2.001,2.02=b,-9.9  
 
91
             is equivalent to:
 
92
             if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
 
93
                c(n) = b(n)
 
94
             else
 
95
                c(n) = -9.9
 
96
             endif
 
97
\xe\ex
 
98
           REPLACE/IMAGE a c t/20.,22.=2.1     
 
99
             is equivalent to:
 
100
             if ((t(n).ge.20.).and.(t(n).le.22.)) then
 
101
                c(n) = 2.1
 
102
             else
 
103
                c(n) = a(n)
 
104
             endif
 
105
\xe\ex
 
106
           REPLACE/IMAGE a c t/2.001,2.02=b+4.4,d
 
107
             is equivalent to:
 
108
             if ((t(n).ge.2.001).and.(t(n).le.2.02)) then
 
109
                c(n) = b(n) + 4.4
 
110
             else
 
111
                c(n) = d(n)
 
112
             endif
 
113
\xe\ex
 
114
           REPLACE/IMAGE a c t/<,2.02=b+4.4 
 
115
             is equivalent to:
 
116
             if (t(n).le.2.02) then
 
117
                c(n) = b(n) + 4.4
 
118
             else
 
119
                c(n) = a(n)
 
120
             endif
 
121
\xe\ex
 
122
           REPLACE/IMAGE a + t/<,2.02=b+4.4 
 
123
             As above, but image `a.bdf' is modified itself.
 
124
\xe\ex
 
125
           REPLACE/IMAGE a &a <,0.0=a*(-1)
 
126
             Another way of getting the absolute value of `a.bdf'. 
 
127
\xe \sxe