DATAMANIP commands
PROGRAM NAME
knoise - Introduce Noise in Input Object
DESCRIPTION
knoise introduces noise of the specified type in the input data object
(-i). The noise can either replace the existing value data or it can be
added to the existing value data by specifying the appropriate flag (-replace
or -add). knoise can introduce the following kinds of noise to the
input data object: Gaussian, Rayleigh, Uniform, Poisson or Exponential. The
appropriate parameters must be specified for the kind of noise being
introduced in the system e.g. Mean & Variance for the Gaussian distribution
and just the Variance for the Exponential distribution.
Data Type
The data type of the output object is the same as the input object's data
type. Internally, the data is processed using one of the following: unsigned
byte, long, unsigned long, double, or double complex. Data will not be cast
to a lower type for processing.
Map Data
If the input object contains a map, then the operation is performed on
the map data. If the input object does not have a map but has value data,
then the operation is performed on the value data.
Validity Mask
If there is a validity mask associated with the input object, the mask is
transferred to the output object. To decrease processing time, the
operation will still be performed on those data that have corresponding mask
values equal to zero. If the data under the mask is genuinely fInotfP
processable, such as NaN or infinity, the user can specify that a value
be substituted in place of the original value when it is accessed. The masked
data substitution attributes for a data object can be explicitly set and
stored using the fISet AttributefP operator, DATAMANIP::ksetdattr.
Explicit Location and Time Data
If the input object has time data or location data, it is transferred
to the output object.
Failure Modes
This program fails if the input object lacks both map data and value data.
REQUIRED ARGUMENTS
- -i
-
type: infile
desc: input file
- -o
-
type: outfile
desc: output file
Mutually Exclusive Group; you must specify ONE of:
- -replace
-
type: flag
desc: Replace existing values with noise
OR
- -add
-
type: flag
desc: Add noise to the specified segment
Mutually Exclusive Group; you must specify ONE of:
ALL OF the Mutually Inclusive Group:
- -gauss
-
type: flag
desc: Generate Gaussian noise
AND
- -gmean
-
type: double
desc: Mean for Gaussian noise
default: 0
bounds: no range checking
AND
- -gvar
-
type: double
desc: Variance for Gaussian noise
default: 1
bounds: value > 0.0
ALL OF the Mutually Inclusive Group:
- -ray
-
type: flag
desc: Generate Rayleigh Noise
AND
- -rvar
-
type: double
desc: Variance for Rayleigh noise
default: 1
bounds: value > 0.0
ALL OF the Mutually Inclusive Group:
- -unif
-
type: flag
desc: Generate uniformly distributed noise
AND
- -umax
-
type: double
desc: Maximum value for uniform distribution
default: 1
bounds: no range checking
AND
- -umin
-
type: double
desc: Minimum value for uniform noise
default: 0
bounds: no range checking
ALL OF the Mutually Inclusive Group:
- -poiss
-
type: flag
desc: Generate Poisson Noise
AND
- -ptime
-
type: double
desc: Amount of time
default: 1
bounds: value > 0.0
AND
- -pvar
-
type: double
desc: Variance for Poisson distribution
default: 1
bounds: value > 0.0
ALL OF the Mutually Inclusive Group:
- -exp
-
type: flag
desc: Generate exponential noise
AND
- -evar
-
type: double
desc: Variance for exponential distribution
default: 1
bounds: value > 0.0
OPTIONAL ARGUMENTS
none
EXAMPLES
SEE ALSO
RESTRICTIONS
REFERENCES
The formula used to derive the gaussian random random numbers is the
Box-Mueller method and was taken from Numerical Recipes : The
Art of Scientific Computing (Press, Flannery, Teukolsky, and
Vetterling) 1986.
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.