- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This
routine calculates certain statistical parameters for an histogram. The median is
derived by linear interpolation within an histogram bin. The mode is estimated from
3∗median -
2∗mean,
which is only valid for moderately skew distributions.
Invocation
CALL KPG1_HSSTP( NUMBIN,
HIST, VALMAX, VALMIN, SUM, MEAN, MEDIAN, MODE, STATUS )
Arguments
NUMBIN = INTEGER
(Given)
Number of bins in the histogram.
HIST( NUMBIN ) = INTEGER (Given)
The histogram
whose statistics are to be derived.
VALMAX = DOUBLE PRECISION (Given)
Maximum data value
included in the histogram.
VALMIN = DOUBLE PRECISION (Given)
Minimum data value
included in the histogram.
SUM = DOUBLE PRECISION (Returned)
Sum of all values in the
histogram.
MEAN = DOUBLE PRECISION (Returned)
Mean of the histogram.
MEDIAN =
DOUBLE PRECISION (Returned)
Median of the histogram.
MODE = DOUBLE PRECISION
(Returned)
Mode of the histogram. The bad value (VAL__BADD) is returned if the calculated
mode lies outside the data range of the histogram.
STATUS = INTEGER (Given)
Global
status value.
References
Moroney, M.J., 1957, "
Facts from Figures"
(Pelican) Goad,
L.E. 1980, in "
Applications of Digital Image Processing to Astronomy"
, SPIE 264, 139.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑