BandMaths Operator

BandMaths Operator Description


Full name:org.esa.beam.gpf.operators.standard.BandMathsOp
Purpose:Create a product with one or more bands using mathematical expressions.


This band maths operator can be used to create a product with multiple bands based on mathematical expression.
All products specified as source must have the same width and height, otherwise the operator will fail. The geo-coding information and metadata for the target product is taken from the first source product.

To reference a band of one of the source products within an expression use the following syntax:


Where # means the index of the source product. The index is zero based.
The bands of the first source product ($sourceProducts0) can be referenced without this product identifier. The band name is sufficient.

When using this operator from the command-line Graph XML file must be provided in order to specify all parameters. Here is some sample XML of how to use a BandMaths node within a graph:

      <node id="bandMathsNode">
                    <expression>radiance_13 / (PI * SOLAR_FLUX_13)</expression>
                    <description>TOA reflectance in channel 13</description>
                    <validExpression>reflec_13 >= 0</validExpression>
                    <expression>radiance_14 / (PI * SOLAR_FLUX_14)</expression>
                    <description>TOA reflectance in channel 14</description>
                    <validExpression>reflec_14 >= 0</validExpression>

Changes from version 1.0 to 1.1:

  1. Added setter and getter methods for parameters
  2. Changed type of BandDescriptor.noDataValue from String to Double
  3. Deprecated API method 'createBooleanExpressionBand'


Name Description
sourceProducts Any number of source products.


Name Data Type Default Description Constraints
targetBands BandDescriptor[] List of descriptors defining the target bands.
variables Variable[] List of variables which can be used within the expressions.