- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine takes as input a number and returns a value that is the input number plus or minus a
random amount of normally distributed noise. It uses a Box-Mueller algorithm to generate a fairly
good normal distribution.
Invocation
CALL KPG_NORVx( BAD, EL, INARR, SIGMA, SEED, OUTARR,
STATUS )
Arguments
BAD = LOGICAL (Given)
Whether checks for bad pixels should be
performed.
EL = INTEGER (Given)
Number of pixels in the array.
INARR( EL ) = ? (Given)
Input array to which noise is to be added to each pixel.
SIGMA = ? (Given)
Standard
deviation of the normal distribution.
SEED = REAL (Given & Returned)
Seed for the
random-number generator SLA_RANDOM.
OUTARR( EL ) = ? (Returned)
Output array which
has random noise added.
STATUS = INTEGER (Given)
Global status value.
Notes:
-
There is a routine for each of the standard floating-point types. Replace "
x"
in the routine name by D
or R as appropriate. The data type of the INARR, SIGMA, and OUTARR arguments must match the
particular routine used.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑