DATAMANIP (kdatamanip) functions


LIBRARY ROUTINE

lknormal - normalize regions using minimum & maximum of each region

LIBRARY CALL

int lknormal(
   kobject src_obj,
   double  norm_lower,
   double  norm_upper,
   int	   apriori_flag,
   double  data_min,
   double  data_max,
   int     w_flag,
   int     h_flag,
   int     d_flag,
   int     t_flag,
   int     e_flag,
   int     whole_flag,
   char    *data_type_string,
   kobject dst_obj)

INPUT

OUTPUT

RETURN VALUE

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

DESCRIPTION

lknormal normalizes the data within regions to the lower_norm and upper_norm parameters. Regions are defined by TRUE settings of w_flag, h_flag, d_flag, t_flag, e_flag, and whole_flag. The minimum and maximum values in each region are used to define the normalization over that region. If whole_flag is TRUE, the normalization region will be the entire data set, and w_flag, h_flag, d_flag, t_flag, and e_flag settings are overridden. If none of the flags are true, the default is whole_flag.

If the apriori flag is TRUE, the data will not be searched for minimum and maximum values but instead, the data_min and data_max parameters provided will be used. This eliminates a required pass through the data before normalization is performed.

The data type of the output object is specified by the data_type_string parameter, and should be one of the following values:

.TS H
center tab(:) ;
lfB  lfB  lfB
l    l    lf(CW) .
Data Type:Abbreviation:Data Type
=
.TH
bit              :bi     : KBIT
byte             :by     : KBYTE
unsigned byte    :un by  : KUBYTE
ubyte            :uby    : KUBYTE
short            :sh     : KSHORT
unsigned short   :un sh  : KUSHORT
ushort           :ush    : KUSHORT
integer          :in     : KINT
unsigned integer :un in  : KUINT
uint             :ui     : KUINT
long             :lon    : KLONG
unsigned long    :un lon : KULONG
ulong            :ul     : KULONG
float            :fl     : KFLOAT
double           :do     : KDOUBLE
complex          :co     : KCOMPLEX
double complex   :do co  : KDCOMPLEX
dcomplex         :dc     : KDCOMPLEX
.T&
l s s.
Propagate Input Type - will not change the data type
.TE
If the source object (src_obj) contains value data and no map, normalization is performed on the value data. Likewise, if the source object contains map data and no value data, normalization is performed on the map.

If the source object has both map and value data, certain region conditions must be met for lknormal to succeed. 1. The first condition is that the normalization region must be defined by at least width and height. 2. If the map depth, time, and elements dimensions are all one, the normalization region must be the entire data set. 3. If the map depth, time, or elements dimensions are greater than 1, the corresponding dimension does not have to be part of the normalization region.

Masks: Currently, the validity mask is only transferred from the source to the destination. However, if there is a mask, the KPDS_MASKED_VALUE_PRESENTATION is used by kpds. As a future enhancement, invalid data will not be figured into the normalization calculations.

lknormal ignores location, and time data.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

The validity mask is simply transferred from the source to the destination. Invalid data will be included in the normalization calculations.

Does not support complex input types yet.

MODIFICATION

none

FILES

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

SEE ALSO

kdatamanip(3)

COPYRIGHT

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