algebra
Performs algebra on either one or two cubes
This program will perform simple algebra on either one or two cubes.
The two cubes may be added, subtracted, multiplied or divided. The
following equations are used:
UNARY: out = (A * from1) + C ADD: out = ((from1 - D) * A) + ((from2 - E) * B) + C SUBTRACT: out = ((from1 - D) * A) - ((from2 - E) * B) + C MULTIPLY: out = ((from1 - D) * A) * ((from2 - E) * B) + C DIVIDE: out = ((from1 - D) * A) / ((from2 - E) * B) + CThe FROM2 cube must have either one band or the same number of bands as the FROM cube. If the FROM2 cube has one band, then the algebraic formula will be applied to all bands in FROM using that single band in FROM2. If FROM2 is a multi-band cube, the algebra will be performed between corresponding bands from FROM and FROM2.
Categories
Related Applications to Previous Versions of ISIS
This program replaces the following applications existing in previous versions of ISIS:- add
- mad
- b16mad
- mult
Related Objects and Documents
Applications
History
Jim Mathews | 1994-02-09 | Original version |
Tracie Sucharski | 2002-08-20 | Ported to Isis 3.0, combining add,mad,b16mad and mult. |
Tracie Sucharski | 2002-10-29 | Was not handling special pixel values correctly. If only one input file, output the input special pixel value. If two input files and one of the input values is a special pixel value, output a NULL. |
Tracie Sucharski | 2002-11-12 | Changed parameters MULT1,MULT2 and ADD to A,B and C respectively. |
Tracie Sucharski | 2003-01-28 | Removed from Utility category. |
Stuart Sides | 2003-05-16 | Modified schema location from astogeology... to isis.astrogeology..." |
Stuart Sides | 2003-07-29 | Modified filename parameters to be cube parameters where necessary |
Stuart Sides | 2003-10-23 | Fixed typo in algebra.xml which caused IsisGui to display names and input fields incorrectly. |
Jeff Anderson | 2004-02-17 | Fixed division by zero problem with DIV operator and bug with single files by adding UNARY operator. |
Jeff Anderson | 2004-02-17 | Fixed division by zero problem with DIV operator and bug with single files by adding UNARY operator. |
Drew Davidson | 2005-07-27 | Added the D and E coefficients |
Kris Becker | 2006-12-14 | Modifed how special pixels are propagated to the output file. Originally, all special pixel values and operations resulted in Null being set to the output pixel. Now if the FROM pixel is a special pixel, it is always propagated to the output file unchanged without regard of the FROM2 pixel. If FROM is not a special pixel and FROM2 is, the output pixel is set to Null. |
Stacy Alley | 2007-08-20 | Fixed segmenation fault error. If the user did not enter a FROM2 value then tried to perform a non-unary operation the program would crash. FIX:The program will inform the user of the error without crashing so they can make the proper correction. |
Mackenzie Boyd | 2011-04-11 | Changed parameter FROM1 to be FROM |
Steven Lambright | 2012-02-23 | Updated to use the new ProcessByLine API. This program now takes advantage of multiple global processing threads. |
Ken Edmundson | 2024-08-22 | Converted to callable app and converted Makefile tests to gtests. |
Parameters
Files
Use this parameter to select the cube which is the first term in
the equation.
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
This image will be used as the second term in the equation. This
cube must have either one band or the same number of bands as the
cube in FROM. If this cube has one band, then the single band will
be applied to each band in FROM using the equation. If this cube
has multi-bands then each corresponding band in FROM2 is applied to
FROM using the equation.
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
This file will contain the results of the algebraically manipulated
cubes.
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
Operators and Coefficients
Mathematical operation performed on the two input cubes
Type | string | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default | SUBTRACT | ||||||||||||||||||
Option List: |
|
This defines the multiplicative constant for the first input
cube.
Type | double |
---|---|
Default | 1.0 |
This defines the multiplicative constant for the second input
cube.
Type | double |
---|---|
Default | 1.0 |
This defines the additive constant for entire equation.
Type | double |
---|---|
Default | 0.0 |
This defines the additive constant for the first input cube.
Type | double |
---|---|
Default | 0.0 |
This defines the additive constant for second input cube.
Type | double |
---|---|
Default | 0.0 |