fakedata - Creates a dataset variable with artificial data

SYNOPSIS

fakedata  [ parameter=value ... ]  [ outputfile ]

Parameters are: master_file, dim_sizes, dim_names, expression, use_degrees, var_name, var_units, var_type, offset, scale_factor.

DESCRIPTION

The function fakedata allows you to create a dataset variable that varies as a function of its position indices. fakedata takes a mathematical expression in C Language format (same as used by emath). The expression is a function of dimension indices i1, i2, i3 and sizes n1, n2, n3. A 1-D variable would be a function of i1 and n1 only, etc.

PARAMETERS

master_file

This is the name of the master dataset used to specify the region for which fakedata will simulate data. See master for information on generating master datasets.

Valid responses are any TeraScan dataset that contains an earth transform. The default is blank; i.e., no master dataset.

If the name of a master dataset is supplied, the master dataset's line and sample dimensions are used as the dimensions of the output variable.

dim_sizes

List of dimensions for the output variable. Needed only if master_file not supplied.

Valid responses are any set of one to three positive integers. There is no default.

dim_names

The names of the dimensions of the output variable. Needed only if master_file not supplied.

Valid responses are any valid string(s). The default for 1-D data is points; for 2-D data the default is line sample; for 3-D data is no names.

expression

The mathematical expression to be calculated. Primitives can include dimension indices i1, i2, i3, dimensions sizes n1, n2, n3 and real constants. See emath.

There is no default.

use_degrees

If yes, output from trig functions is in degrees, and input to inverse trig functions is assumed to be in degrees. If no, output from trig functions is in radians, and input to inverse trig functions is assumed to be in radians. The default is yes.

var_name

The name of the output variable. Any valid variable name may be used. There is no default.

var_units

The units of the output variable. The default is blank, indicating no units.

var_type

The datatype of the output variable. Valid responses are [byte, short, long, float, and double]. The default is float.

offset
scale_factor

If the var_type is byte or short the output data are scaled using the following linear transform:

stored output value = nearest int[(original value - offset)*scale_factor]

offset can be any number. scale_factor can be any non-zero number. The default values are 0 and 1 respectively.

EXAMPLES

Define a variable to use as a Hamming window for data registered to a given masterfile Master. Note that dimension indices are 1-relative.

[10] % fakedata hamming
master_file    : char(255) ? [] Master
expression     : char(255) ? 1./(i1 + i2 -1)
var_name       : char( 31) ? hamming
var_units      : char( 31) ? []
var_type       : char( 15) ? [float]

SEE ALSO

emath, emath2


Last Update: $Date: 1998/05/28 18:02:52 $