Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1488
News FAQ
Search Home


next up previous contents index
Next: image.calcmask - Function Up: image - Tool Previous: image.brightnessunit - Function


image.calc - Function



Package general
Module images
Tool image


Image calculator


Synopsis
calc(pixels)


Arguments

pixels in LEL expression
    Allowed: String


Returns
T or fail



Description

This function is used to evaluate a mathematical expression involving AIPS++ images, assigning the result to the current (already existing) image. It complements the imagecalc constructor. See note 223 which describes the the syntax and functionality in detail.

If the expression, supplied via the pixels argument, is not a scalar, the shapes and coordinates of the image and expression must conform.

If the image (that associated with the tool) has a pixel mask, then only pixels for which that mask is good will be changed. See the function maskhandler for managing image pixel masks.

See the related functions set and putregion.



Example
- im.calc('min(aF, (min(aF)+max(aF))/2)')
- im.calc('1.0')

The first example shows that there are 2 min functions. One with a single argument returning the minimum value of that image. The other with 2 arguments returning an image containing ``aF'' data clipped at the value of the 2nd argument. The second example sets all good pixels to unity.



Example
- im.calc('sin(aD)+(aF*2)+min(bF)+real(aC)')
This shows a mixed type expression. The real part of the complex image ``aC'' is used in an expression that otherwise uses Float type.





next up previous contents index
Next: image.calcmask - Function Up: image - Tool Previous: image.brightnessunit - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-08-01