FreqHist

Contents

Description of FreqHist

The unit called FreqHist computes the frequency histogram of the input data set. The input data may be either a SampleSet or a Spectrum. The output Histogram gives the number of input values that lie within certain intervals. The choice of intervals is described in the next section.

Using FreqHist

The user can set parameter values that determine how the Histogram is constructed. If default values are used, the output Histogram will have uniformly spaced intervals from either 0 to the maximum of the data set (if all the input data are non-negative) or from -m to +m, where m is the larger of the absolute values of the minimum (if this is negative) and maximum. Thus, if there are negative input values, the histogram intervals are symmetric about zero. The number of intervals depends on the number of input data values. The default values never include histogram intervals extending to infinity.

The user is recommended not to use the defaults if successive Histograms will be added or otherwise compared, since the defaults will produce Histograms with different numbers of intervals, depending on the details of the input data sets. To set parameters, use the parameter window. This allows the user to mix defaults (shown as "auto" in the parameter boxes) and user-defined values for the number, width, and beginning of the intervals. The range of values covered by the intervals extends from the beginning value to the end, which is end = beginning + number * width.

When the user sets the range of the intervals by inserting values into the parameter window for all the parameters, it will be possible for values in the input data set to fall outside this interval. Therefore, the unit always adds intervals extending to negative and positive infinity when the user defines all the parameters. (See the help for the Histogram data type for an explanation of what these extra intervals mean.) It does this even if the extra "overflow" intervals are empty for the particular input data set. This ensures that Histograms produced with a given set of user parameters are always compatible for the purposes of addition, multiplication, and so on: they always have exactly the same set of intervals. Use the units Adder, Multiplier, etc for Histogram arithmetic.