DATAMANIP (kdatamanip) functions


LIBRARY ROUTINE

lkshot - corrupt data uniformly with spikes

LIBRARY CALL

int lkshot(
   kobject src_obj,
   double  ratio,
   double  real_val,
   double  imag_val,
   kobject dst_obj)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

Library routine for kshot. lkshot corrupts the input data object uniformly with spikes. The value of the spike is specified by real_val and imag_val, which represent the real and imaginary component of the spike. Imaginary value is used only if spikes are to be inserted in a complex object. Ratio specifies the percentage of points in the input objects to be corrupted with shot noise. The location of points to be corrupted by spikes is generated by a uniform random number generator. If the mask value at a point to be corrupted by a spike is 0, the spike is not inserted at that point but it is counted in the number of points corrupted.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

Destroys the map segment on the destination object if the source object contains both map and value data. Also the size and datatype of the value segment is set to the size and datatype of the the mapped source object.

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATAMANIP/objects/library/kdatamanip/src/lkshot.c

SEE ALSO

kdatamanip(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.