Creating new coefficient files

The SNAP SST Tool uses coefficient files during the SST processing to read its coefficient sets.
These files are located in:

<SNAP-USERHOME>/snap/s3tbx/s3tbx-aatsr-sst/src/main/resources/auxdata/sst/dual_view

or

<SNAP-USERHOME>/snap/s3tbx/s3tbx-aatsr-sst/src/main/resources/auxdata/sst/nadir_view

each for the specified view. <SNAP-USERHOME> is the .snap folder located in the in the user home directory.

A coefficient file is a standard java properties file consisting of key/value pairs and comments. When the SST processor starts up, it scans the SST auxiliary data directory for coefficient files and shows these in the GUI as entries in the coefficient file list for both nadir and dual views. It is possible to add any number of customized coefficient files to these folders when following the simple syntax:

A comment line begins with a "#" and is ignored during the parsing operation.

Each coefficient file should contain a short description, denoted as:

 description = my coefficient description

The description string is shown in the user interface coefficient selection box.

The coefficient file can contain any number of so called map keys. These keys define a pixel range across the scanline where a specific set of coefficients shall be used. Map keys contain successive numbers to allow the coefficient to be associated to a specific range. Each map value consists of two integer values defining the lower and higher bound of the range (borders are included).

Example:

    map.0=0,123
    map.1=124,325
    map.2=326,511

devides each scanline into three non-overlapping pixel ranges. The coefficient file parser checks the map ranges for overlaps or gaps and notifies the user on this.

For every map range there must be a corresponding set of coefficients. Coefficient keys follow the same rules as map keys, they contain consecutive numbers to be associated with map ranges. Valid coefficient names are – following the standard sst algorithm conventions – a.x through d.x. All coefficient files stored in the nadir view directory are expected to have just a and b coefficient sets and files in the dual view directory just c and d coefficients.

For each map range with index x there must be a set of coefficients (a.x and b.x or c.x and d.x) available. Coefficient values consist of a number of comma separated floating point values.

Example:

    a.1=1.0, 2.0, 3.0
    c.6=1.0, 2.0, 3.0, 4.0, 5.0

The number of coefficient values is defined by the sst algorithm as follows:

    a.x coefficients contain three values
    b.x coefficients contain four values
    c.x coefficients contain five values
    d.x coefficients contain seven values

The coefficient file parser checks the number of coefficients and the associations and notifies the user on such errors.

Here is a valid coefficent file as example:

    # Source file: ATS_SST_AXVIEC20051205_102103_20020101_000000_20200101_000000.htm
    # Coefficients taken from record #77 of dataset AVERAGE_LUT which corresponds to
    # - latitude zone POLAR_INDEX
    # - across track band index 0 (center pixel)
    # For more information see http://envisat.esa.int/dataproducts/aatsr/CNTR2-7-1.htm
    #
    # This file uses Java property file syntax. It is
    # composed of lines which are key-value pairs in the form
    # <key> = <value>
    # The supported keys are:
    # description - a short description of the coefficient set
    # map.<x> - definition of the coefficient map <x> as a
    # range of zero-based, scanline column indices
    # <set>.<x> - coefficient set corresponding to map.<x>
    # where <set> is one of c (day) or d (night).


    description = Average Polar Dual View

    # Map 0
    map.0 = 0, 511
    c.0 = 4.55397, 5.59769, -3.26962, -3.30387, 1.95733
    d.0 = 0.952765, 0.437266, -0.653424, 2.61203, -0.229391, 0.357714, -1.5279