1
% @(#)replacimag.hlq 19.1 (ESO-IPG) 02/25/03 14:03:40
2
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
%.COPYRIGHT (c) 1990 European Southern Observatory
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
%----------------------------------------------------------------
13
REPLACE/IMAGE 06-JUN-2001 KB
15
REPLACE/IMAGE in out [test/]low,hi=express1[,express2]
16
replace pixels according to intensity
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.
24
REPLACE/IMAGE in out [test/]low,hi=express1[,express2]
26
in = primary input frame
28
out = output frame, if output frame equal to input frame or if
29
set to `+', the replacements are done in the input frame
31
test = optional different test frame, if omitted (also no '/'),
32
the primary input frame will be used as test frame
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
39
express1 = algebraic expression to calculate the replacement value
40
for all pixels in the interval [low,hi]
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.
49
express2 = optional algebraic expression (same syntax as express1)
50
to calculate the value for all pixels with intensities outside
54
FILTER/IMAGE, COMPUTE/IMAGE, REPLACE/POLYGON
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).
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").
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.
74
REPLACE/IMAGE a c 2.001,2.02=2.1
76
if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
82
REPLACE/IMAGE a c 2.001,2.02=b
84
if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
90
REPLACE/IMAGE a c 2.001,2.02=b,-9.9
92
if ((a(n).ge.2.001).and.(a(n).le.2.02)) then
98
REPLACE/IMAGE a c t/20.,22.=2.1
100
if ((t(n).ge.20.).and.(t(n).le.22.)) then
106
REPLACE/IMAGE a c t/2.001,2.02=b+4.4,d
108
if ((t(n).ge.2.001).and.(t(n).le.2.02)) then
114
REPLACE/IMAGE a c t/<,2.02=b+4.4
116
if (t(n).le.2.02) then
122
REPLACE/IMAGE a + t/<,2.02=b+4.4
123
As above, but image `a.bdf' is modified itself.
125
REPLACE/IMAGE a &a <,0.0=a*(-1)
126
Another way of getting the absolute value of `a.bdf'.