binavg - Determines average relationships between variables

SYNOPSIS

binavg  [ parameter=value ... ]  [ inputfile outputfile ]
binavg  [ parameter=value ... ]  [ inputfile ... directory ]

Parameters are: include_varsaxis_variablesuse_minmax,   minmax_pairsbin_sizes,   keep_stddevkeep_Ns, lognsmin_num.

DESCRIPTION

binavg determines the average relationship between variables in a dataset. The input variables (i.e. include_vars) are bin-averaged according to their corresponding values of the axis_variables. Variables can be binned against multiple axis variables.

There is one output dataset for each input dataset, and one output variable for each input variable. The output variables are named the same as the input variables but the number of dimensions (i.e. axes) is equal to the number of axis variables. The names of the dimensions in the output dataset are set to the names of the axis_variables and the length of the dimensions depend on the parameters use_minmax, minmax_pairs and bin_sizes. For each dimension (i.e. axis variable), a variable is written to the output dataset containing the axis values. If the name of the input axis variable is "X", then the name of the one-dimensional output axis variable is "X_axis". All input variables and input axis_variables must have the same dimensionality.

The parameter keep_std determines whether the standard deviations of the bin averages are to be computed and also written to the output data set. For an output variable named "X", the variable storing the standard deviations is named "SD_X" and has the same dimensionality as "X".

The parameter keep_Ns determines whether the number of "good" values in each bin average is also written to the output data set. For an output variable named "X", the variable storing the number of good values is named "N_X" and has the same dimensionality as "X".

PARAMETERS

include_vars

Specifies which variables in the input dataset(s) are to be bin averaged with respect to the axis_variables. These can be thought of as the dependent variables.

The default is all variables in the input dataset(s).

axis_variables

Specifies the list of variables to be to be used as the binning dimensions or "axes". These can be thought of as the independent variables.

There is no default.

use_minmax

If use_minmax=yes, binavg uses the minimum and maximum values of the axes_variables to determine the length of the output dimensions, and thus the parameter space of the variables being processed.

Valid responses are [yes or no]. The default is yes.

minmax_pairs

If use_minmax=no, binavg requires user specified range pairs to be entered to determine the length of the output dimensions, and thus the parameter space of the variables being processed. One min/max pair must be entered for each axis variable.

Valid responses consist of one min/max pair of numbers per axis variable.

bin_sizes

These are the increments to divide the axes dimensions into. For example, if the axis variable has maximum and minimum values of 54 and 98, a bin size of 5 cause this dimension to be 10 in length, spanning values from 55 to 100 by 5. Variables with values between 52.5 and 57.5 are binned in the bin designated by 55. One bin size is to be specified for each of the axis_variables.

Valid responses are [> 0 ]. There is no default.

keep_std

If keep_std=yes, binavg stores the standard deviations of bin averages. For each output variable named "x", a parallel variable named "SD_x" is written to the output containing the standard deviation of the bin-average stored in "x".

The default is yes.

keep_Ns

If keep_Ns=yes, binavg stores the number of good data values that went into the calculation of each bin average. For each output variable named "x", a parallel variable named "N_x" is written to the output containing the number of values used in the compuation of the bin-averages in "x".

The default is yes.

logns

If keep_Ns=yes, logns specifies that the base ten logarithm of the number of values used is stored.

The default is yes.

min_num

min_num specifies the minimum number of values to use for a bin average. If the number of observations in a given bin is less than this number, the mean and standard deviations for that bin are set to the bad value.

Valid values are integers greater or equal 1. The default is 1.

EXAMPLES

The following is an example of how to determine the average values of AVHRR channel 3 versus channels 4 and 5. This will produce an output dataset with one variable, avhrr_ch3. It will have two dimensions named avhrr_ch4 and avhrr_ch5. The size of these dimensions will be determined by their maximum and minimum values and the value of bin_sizes, which in this case is 5. This example essentially produces three 2-dimensional images. In each case, the "x" and "y" dimensions would be avhrr_ch4 and avhrr_ch5. In one case, the image values will be the average value of avhrr_ch3, in the second, they will be the standard deviation of these averages, and the third they will be the number of values used in the computation of these averages. These three image "plots" can be displayed using xvu.

% binavg
in/out files   : char(255) ? avhrrimg a1vsa3a4
include_vars   : char(255) ? [] a*1
axis_variables : char(255) ? [] a*3 a*4
use_minmax     : char(  3) ? [yes]
bin_sizes      : real(  2) ? 5 5
keep_stddev    : char(  3) ? [yes]
keep_Ns        : char(  3) ? [yes]
logns          : char(  3) ? [yes]
min_num        : int       ? [1]

The following is an example of how to look at the relationship between SSM/I 37 Ghz vertical and horizontal channels. In this case the x-axis, i.e. horizontal 37 GHz channel, is limited to only the values between 197.5 and 282.5 (given that the min/max is set to 200 and 280, and the bin size is set to 5). The results can be plotted on a x-y plot using xvu.

% binavg
in/out files   : char(255) ? ssmiimg vertvshoriz
include_vars   : char(255) ? [] mi_37v
axis_variables : char(255) ? [] mi_37h
use_minmax     : char(  3) ? [yes] n
minmax_pairs   : real(  2) ? 200 280
bin_sizes      : real(256) ? 5
keep_stddev    : char(  3) ? [yes]
keep_Ns        : char(  3) ? [yes]
logns          : char(  3) ? [yes]
min_num        : int       ? [1]

SEE ALSO

datasets, anomaly, sample, composite, emath, nhood, dimavg, xvu, samplam, stats, linfit, polyfit.


Last Update: $Date: 1998/05/28 19:45:39 $