HOME GUIDE OPERATIONS DOCS ERRORS FORMATS INSTALL NEW TIPS WEB SITES

AR - ARithmetic operation

(04/04/96)

PURPOSE

Performs arithmetic operations point for point on the input picture to create an output picture.

USAGE

.OPERATION: AR

.INPUT FILE: PIC001
[Enter the name of the input picture.]

.OUTPUT FILE: PIC002
[Enter the name of the output picture.]

.FORMULA: P2=:((P1+0.5)*2.)
[Enter formula to be used to compute the output picture (referred to by P2) from the input picture (P1). Note that the operations can be + - * / . If the first operation is + or -, the second one can only be * or / . If the first operation is * or /, the second one can only be + or - . The formula entered by the user starts with the two left parentheses.

Examples of accepted formulae:
((P1-2.)/2.)
((P1/512.)+0.)

Examples of unacceptable formulae:
((P1+3.)+50.)
((P1*4.)/10.)

...because in both cases the arithmetic
operations are not mixed.

The constants used must be floating point, i.e., the decimal point must be specified.]

NOTES

  1. It is also possible to obtain the logarithm (base 10) of the resulting picture by simply putting LOG in front of the expression, e.g.
    LOG((P1-2.)/2.)
    LOG((P1/512.)+0.)
    It is the user's responsibility to make sure that the argument of the logarithm function is positive everywhere. The main application of the LOG function is the display of the power spectrum. Additional functions possible are:
    ABS((P1-2.)/2.)
    EXP((P1-2.)/2.)

  2. In order to normalize a picture between 0. and 2., one can make use of the automatic register updating; X3 and X4 always contain the maximum and minimum of the last picture accessed by SPIDER:
     
                  FI 
                  PIC001 
                  X10=2./(X3-X4) 
                  AR 
                  PIC001 
                  PIC002 
                  ((P1-X4)*X10) 
    

SUBROUTINES

ARITH

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org