magnify [ parameter=value ... ] [ inputfile outputfile ] magnify [ parameter=value ... ] [ inputfile ... directory ]
Parameters are: include_vars, use_scale, y_scale, x_scale, use_sizes, lines, samples, model_var, method, frac_good, extrap_edges.
magnify enlarges or reduces the dimensions of two-dimensional variables. The magnification can be applied to more than one variable in a dataset, and each of the magnified variables is written to the output dataset.
Several options for specifying the magnification are available:
Each variable's dimensions are magnified by the same x-scale and y-scale magnifications.
Each variable's dimensions are enlarged (or reduced) to a specified pair of line and sample dimensions.
Each variable's dimensions are enlarged (or reduced) to the line and sample dimensions of a given input dataset variable.
Several options of for "interpolating" output values are available:
nearest neighbor - simply takes the closest point (good or bad). Applicable to reducing or enlarging.
nearest good neighbor - for each output point, the four nearest input neighbors are determined; the nearest one that is good is taken. Applicable to enlarging only.
bilinear-interpolation - two-dimensional linear interpolation is used in cases where there are three or four good nearest neigbors. Applicable to enlarging only.
average - an average of the good points falling into the rectangle being reduced, i.e. a boxcar average. Applicable to reducing only.
All attributes in the input datasets are carried over to the output datasets.
List of variables to magnify and write to the output datasets. If the list is prefixed with a minus sign, the listed variables are excluded from the output datasets. Wildcards * and ? are allowed. The default is to include all variables.
If use_scale=yes, the magnification for each variable is to be determined by x_scale and y_scale.
Valid responses are [yes, no]. The default is yes.
If use_scale=yes, this specifies the magnification to use in the "y" (or line) direction.
Valid values are greater or equal 0.01. There is no default.
If use_scale=yes, this specifies the magnification to use in the "x" (or sample) direction.
Valid values are greater or equal 0.01. There is no default.
If use_scale=no and use_sizes=yes, each variable is enlarged or reduced to the values of lines and samples. Thus, this may lead to a reduction or an enlargement, depending on the input dimensions of the variable(s).
Valid responses are [yes or no]. The default is no.
If use_sizes=yes, this specifies the number of output lines for the variable(s) being magnified.
Valid responses are [>0]. There is no default.
If use_sizes=yes, this specifies the number of output samples for the variable(s) being magnified.
Valid responses are [>0]. There is no default.
If use_scale=no and use_sizes=no, each variable is enlarged or reduced to the line and sample dimensions of the variable specified by model_var. Thus, this may lead to a reduction or a enlargement depending on the dimensions of model_var and the dimensions of the variable(s) being magnified. This variable is copied (unaltered) into the output dataset.
Valid response is the name of any two-dimensional variable in the input dataset.
Determines the method of "interpolation" to use for the magnification. See description above (nn = nearest neighbor; ngn = nearest good neighbor; bl = bi-linear interpolation; av = average of neighbors). Note, some options should only be applied to enlargements and some only to reductions. If the x-magnification ends up being larger than one and the y-magnification smaller than one, and if nn is not used, it is recommended to use magnify twice on the variable, once for each dimension separately.
Valid responses are [nn, ngn, bl, av]. The default is nn.
If method=av, frac_good specifies the fraction of "good" pixels required to compute an average value. If the number of of good pixels in the box average divided by the total number of pixels in the box average is less than frac_good, then the interpolated value is assigned the bad value.
Valid responses are in the range [0.0, 1.0]. The default is 1.0.
If method=bl, extrap_edges specifies if the values for the edge points can be extrapolated from their two (only) neighbors. In this case, both neighbors must be good, and only a linear interplation is used between these two points. If extrap_edges=no, then the edge points are set to bad value.
Valid responses are [yes, no]. The default is yes.
The following examples show the three different ways that magnify can be invoked to perform magnification (see DESCRIPTION above). Each example uses bi-linear interpolation on a dataset called test. In the first case, each variable in test is magnified in size by two. In the second case, each variable in test is magnified to have dimensions 300 lines by 400 samples. In the third case, each variable in test is magnified to have the same dimensions as the variable named x.
% magnify in/out files : char(255) ? test testbig1 include_vars : char(255) ? [] use_scale : char( 3) ? [yes] y_scale : real ? 2 x_scale : real ? 2 method : char( 3) ? [nn] bl extrap_edges : char( 3) ? [yes] % magnify in/out files : char(255) ? test testbig2 include_vars : char(255) ? [] use_scale : char( 3) ? [yes] n use_sizes : char( 3) ? [yes] lines : int ? 300 samples : int ? 400 method : char( 3) ? [nn] bl extrap_edges : char( 3) ? [yes] % magnify in/out files : char(255) ? test testbig3 include_vars : char(255) ? [] use_scale : char( 3) ? [yes] n use_sizes : char( 3) ? [yes] n model_var : char( 31) ? x method : char( 3) ? [nn] bl extrap_edges : char( 3) ? [yes]
subset, fastreg, emath, composite, convolve, smear, nhood, datasets
Last Update: $Date: 1998/05/29 18:41:02 $