HISTPEAK

Establish the mean, mode, median and other statistics for NDF image files

Description:

Allows the user to input the name of an NDF image file and then constructs an image count value versus occurence histogram. This is used to allow count median, mode, kurtosis, standard deviation, background count standard deviation and skewness values to be estimated.

The user may also select which parts of the image are to be used. The options implemented are:

Both options exclude bad valued points from the calculations.

Four estimates of the modal value are generated:

An estimate of the standard deviation of pixel count values and the background count standard deviation are generated.

Usage:

HISTPEAK IN USE SFACT DEVICE [ARDFIL]

Parameters:

ARDFIL = _CHAR (Read)
The name of the ARD file containing a description of the parts of the image to be ignored.
DEVICE = _DEVICE (Read)
The name or number of the graphics display type to be used when displaying the histogram. ! may be used if graphics are not required.
IN = _NDF (Read)
The name of the NDF data structure/file that is to be examined.
LOW = _REAL (Write)
The lowest pixel count value found in the parts of the image that were used. Units counts.
HIGH = _REAL (Write)
The highest pixel count value found in the parts of the image that were used. Units counts.
KURT = _DOUBLE (Write)
The value of pixel count kurtosis calculated for the good pixels found in the parts of the image used.
MEAN = _DOUBLE (Write)
The mean pixel count value calculated using the pixels found in the parts of the image used. Units counts.
MEDIAN = _DOUBLE (Write)
The median pixel count value calculated using the pixels found in the parts of the image used. Units counts.
MODE = DOUBLE (Write)
The modal value of the unsmoothed histogram generated when using only pixels from the parts of the image requested.
MODEI = _DOUBLE (Write)
The modal value of the histogram calculated by assuming that near the histogram peak a Normal distribution is present and then ’fitting’ it. The ’fit’ obtained supplies the value for the histogram peak and also an accurate estimate of the background count standard deviation.
MODEP = _DOUBLE (Write)
The modal value of the smoothed histogram calculated by taking a number of chords through the histogram and by examining the length of chord versus height relationship extrapolates to a zero chord length. Assumes that the histogram peak is probably a skewed distribution (SIGMA).
MODES = _DOUBLE (Write)
The modal value of the smoothed histogram calculated when using only pixels from the parts of the image requested.
PEAKV = _DOUBLE (Write)
The peak number of pixels found with a given count value in the unsmoothed count versus occurence histogram.
PEAKVS = _DOUBLE (Write)
The peak number of pixels found with a given count value in the smoothed count versus occurence histogram.
PEAKVI = _DOUBLE (Write)
The peak number of pixels found with a given count value as estimated by fitting a Normal distribution to the peak of the count versus occurence histogram.
SDEV = _DOUBLE (Write)
The standard deviation of the pixel count value calculated using only the good pixels from the image areas requested.
SIGMA = _DOUBLE (Write)
Estimates for the background count standard deviation. Units counts.
SFACT = _INTEGER (Read)
The Gaussian smoothing filter radius requested. This may be:
  • -1 to indicate that the application should automatically assign a filter radius to apply to the histogram.

  • 0 to indicate that the histogram should not be smoothed.

  • >0 to indicate the radius of the Gaussian filter. Values greater than HIS__SFLIM (see include file) are not allowed. Units counts.

SFACTA = _INTEGER (Write)
The Gaussian filter radius actually employed by the application. See SFACT. Units counts.
SKEW = _DOUBLE (Write)
The value of pixel count skewness calculated for the pixels found in the parts of the image used.
UNUPIX = _INTEGER (Write)
The number of unused pixels in the final image.
USE = _CHAR (Read)
Defines the method by which the areas of the image to be used in building up the pixel count histogram are to be selected. USE=’W’ All the image pixels are used. USE=’A’ The image pixels are defined using an ARD file

Examples:

histpeak in=galaxy sfact=3 use=w device=ikon1
The statistics are calculated for the image GALAXY, using the all the non-bad pixels on the image and the results displayed on the default device as text and graphically on device IKON1. The histogram used to calculate the interpolated mode and background standard deviation is smoothed using a Gaussian filter of radius 3 counts.
histpeak in=galaxy2 sfact=-1 use=a device=xwindows ardfil=^okay.dat
The statistics are calculated for the image GALAXY2, using the image pixels defined by ARD file OKAY.DAT and the results displayed on the default device as text and graphically on device XWINDOWS. A smoothed histogram is used to calculate the interpolated mode and background standard deviation. The width of the smoothing filter is chosen by the application.

Implementation Status:

The current version will not accept a pixel value range greater than the largest integer value possible.