% @(#)computdpla.hlq	19.1 (ESO-IPG) 02/25/03 14:03:02 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      computdplan.hlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, COMPUTE/DPLANE
%.PURPOSE    On-line help file for the command: COMPUTE/DPLANE
%.VERSION    1.0  980319: Creation, KB
%----------------------------------------------------------------
\se
SECTION./DPLA
\es\co
COMPUTE/DPLANE						19-MAR-1998  KB
\oc\su
COMPUTE/DPLANE res_frame.plane = arithmetic_expression
	do arithmetics on planes of images
\us\pu
Purpose:
          Perform arithmetic operations in double precision on planes of 
          3-dim images and store result in a plane of the result image.
\up\sy
Syntax:  
          COMPUTE/DPLANE res_frame.plane = expression
\ys\pa
          res_frame.plane = image and plane to get result of expression,
              the plane is specified by Pi (or pi), with i in [1,NPIX(3)];
\ap\pa
          expression = expression with up to 10 operands, which may be
              functions and planes or/and constants in the usual algebraic
              notation, planes of the res_frame are indicated by "Pi" (or "pi")
              with i = plane_no. (beginning at 1);
\\
              planes of other frames are indicated via `frame.Pi'
\ap\no
Note: 
          Inside the expression may be spaces or not. However, if your
          expression is longer than 100 chars. (the current max. token length)  
          without spaces, you should include spaces between some operands,      
          then the limit is 256 chars. for the complete command line.
\\
          The operations +, -, *, / and ** are supported with the same
          precedence as in FORTRAN. Parentheses may be used to change that
          order as well as to nest operations.
\\
          The functions SQRT(a), EXP(a), EXP10(a), LN(a), LOG10(a), SIN(a)
          ASIN(a), COS(a), ACOS(a), TAN(a), ATAN(a), INT(a), ATAN2(a1,a2),
          MAX(a1,a2), MIN(a1,a2), MOD(a1,a2) and ABS(a), are implemented as in
          FORTRAN. Except that INT(a) will return the nearest integer of "a"
          converted to double precision.
\\
          The trigonometric functions expect arguments in degrees!
\\
          Results of illegal operations (e.g. division by zero) are set to
          the "null value" defined by the keyword NULL.
\\
          If planes from other frames are involved in the expression, they
          must have the same no. of pixels per plane, i.e. NPIX(1),NPIX(2).
          You can mix planes of 3-dim frames and 2-dim frames.
\on\see
See also:
          COMPUTE/PLANE, COMPUTE/DIMAGE
\ees\exs
Examples:
\ex
          COMPUTE/DPLANE tiburon.p2 = P1+P4
            Use image frame `tiburon.bdf' and add the 1st plane and 4th plane,
            store the result into the 2nd plane of frame `tiburon.bdf'.
\xe\ex
          COMPUTE/DPLANE ballena.P7 = 99.000009 * sin(delfin.p5)
            Set the 7th plane of frame `ballena.bdf' to the product of 
            99.000009 and the sine of the contents of plane no. 5 of frame 
            `delfin.bdf'. The no. of pixels per plane of `ballena.bdf' and 
            `delfin.bdf' must be equal.
\xe\ex
          COMPUTE/DPLANE ballena.p2 = (1002.170865+ima2) / p7
            Compute 1002.170865+ima2, with 2-dim image `ima2.bdf', and divide
            the result by the 7th plane of `ballena.bdf' and store that into 
            2nd plane of frame `ballena.bdf'.
\xe \sxe
