Download   Help   Documents   Contact   Links   OceanColor   News   FAQ   Forum 

Seadisp Band Summation Command (band_sum)

Description:  General display program command mode procedure for performing a general summation an any number of loaded bands and creating a new data array as a result. The general summation function is very flexible:

Apply the following summation function to a set of n input grids where I=each input grid, C=a constant, W=an array of weights, E=an array of exponents:

The general summation function can also be used as a more robust average function than the simple average function by multiplying the desired weights by 1/n. This function can also be used on a single grid to: multiply a grid by a constant, add or subtract a constant from a grid, and/or apply an exponent to a grid.

Navigation information for the resultant output array will be copied from the first input band. Warnings are issued if the units are not the same for all inputs. In the case of the /raw option, warnings will also be issued if the raw data types are not the same for input grids as well as the slope, intercept and scale type conversion values used to convert from raw to geophysical values.

Note:  The command mode procedure load must be run before band_sum.

Usage: band_sum, band_no=band_no, /raw, /geo, min=min, max=max, constant=constant, wgts=wgts, exps=exps, ignore=ignore, tol=tol, replace=replace, /exclusive, /inclusive, err=err

Examples:

  1. Sum loaded bands 1 and 2 in terms of geophysical data values (the default).
  2. band_sum, band_no=[1,2]

  3. Sum loaded bands 1 and 3. Only compute a sum at grid locations where the two input values are not equal to 66.834 (+-.001).
  4. band_sum, band_no=[1,3], ignore=66.834, ignore_tol=0.001

Arguments/Keywords:
band_no An array containing the number(s) of the input loaded band(s) for summation. Relative to 1. (required)
geo Convert the input bands to geophysical values before computing the summation. The resultant output array will be stored in floating point values in terms of geophysical data values. Thus, the raw to geophysical scaling conversion variables: slope, intercept and scaling type will be set to 1.0, 0.0 and 'linear' respectively. (Default)
raw It will most likely not make sense to use this option unless you are computing an average. If raw is specified, then floating-point operations will be performed on the raw data. The resultant grid will then be stored in the raw data type and the raw to geophysical scaling conversion variables: slope, intercept and scaling type will be copied from the first input array. If values in the resultant grid fall outside the possible range for the raw data type, then they will be assigned to the min or max possible values respectively.
constant An optional constant to be applied to the final summation. (Default 0.0)
wgts An optional scalar or array of size n, containing any weights to apply to each input grid while summing. (Default 1.0)
exps An optional scalar or array of size n, containing any exponents to apply to each input grid while summing. (Default 1.0)
min Only values greater than or equal to this value will be used when computing the summation. These values should be specified in terms of either raw or geophysical data values, depending on whether the user has specified the /raw or /geo keywords.
max Only values less than or equal to this value will be used when computing the summation. These values should be specified in terms of either raw or geophysical data values, depending on whether the user has specified the /raw or /geo keywords.
ignore Data values to ignore when computing the summation. These values should be specified in terms of either raw or geophysical data values, depending on whether the user has specified the /raw or /geo keywords.
tol A tolerance value to use in applying the ignore value. (Default 0.0)
replace The replace keyword is only applicable when either min/max or ignore exclusion criteria are set. This is the value which will be used in the resultant output array wherever valid calculations have not taken place. (Default for min/max exclusion is min-1 if min is set or max+1 if only max is set; Default for Ignore/Tolerance exclusion is the ignore value)
inclusive This keyword is only applicable when either min/max or ignore exclusion criteria are set. Inclusive means that all input values must be valid in order to perform the average function.
exclusive This keyword is only applicable when either min/max or ignore exclusion criteria are set. Exclusive means that only one valid (i.e. non-excluded) value is required in order to perform the general summation function. (Default)
err Pass back an error status. 0 = no error. Non-zero = an error occurred.


Curator: OceanColor Webmaster

Authorized by: gene carl feldman
Privacy Policy and Important Notices

Updated: Thursday, 20-Mar-2008 16:33:11 EDT
NASA logo