ISIS Documentation

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) + C
    
The 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 Mathews1994-02-09 Original version
Tracie Sucharski2002-08-20 Ported to Isis 3.0, combining add,mad,b16mad and mult.
Tracie Sucharski2002-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 Sucharski2002-11-12 Changed parameters MULT1,MULT2 and ADD to A,B and C respectively.
Tracie Sucharski2003-01-28 Removed from Utility category.
Stuart Sides2003-05-16 Modified schema location from astogeology... to isis.astrogeology..."
Stuart Sides2003-07-29 Modified filename parameters to be cube parameters where necessary
Stuart Sides2003-10-23 Fixed typo in algebra.xml which caused IsisGui to display names and input fields incorrectly.
Jeff Anderson2004-02-17 Fixed division by zero problem with DIV operator and bug with single files by adding UNARY operator.
Jeff Anderson2004-02-17 Fixed division by zero problem with DIV operator and bug with single files by adding UNARY operator.
Drew Davidson2005-07-27 Added the D and E coefficients
Kris Becker2006-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 Alley2007-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 Boyd2011-04-11 Changed parameter FROM1 to be FROM
Steven Lambright2012-02-23 Updated to use the new ProcessByLine API. This program now takes advantage of multiple global processing threads.
Ken Edmundson2024-08-22 Converted to callable app and converted Makefile tests to gtests.