next up previous contents index
Next: Integrated contents Up: Accessing Information Previous: Maximum and Minimum

Rebinning

    

CALL HREBIN (ID,X*,Y*,EX*,EY*,N,IFIRST,ILAST)

Action: The specified channels of a 1-dimensional histogram are cumulated (rebinned) into new bins. The final contents of the new bin is the average of the original bins.

Input parameters:
ID
Histogram identifier
N
Number of elements in the output arrays X,Y,EX,EY.
IFIRST
First histogram channel on which the rebinning has to be performed.
ILAST
Last histogram channel on which the rebinning has to be performed.
Output Parameters:
X
Array containing the new abscissa values.
Y
Array containing the cumulated contents.
X
Array containing the X errors.
Y
Array containing the Y errors.

Example:

CALL HREBIN (ID,X,Y,EX,EY,25,11,85)
This call will regroup channels 11 to 85 three by three (25 bins) and return new abscissa, contents and error values in the output arrays. In this case the errors in X will be equal to 1.5*BINWIDTH.

CALL HREBIN (ID,X,Y,EX,EY,NCHAN,1,NCHAN)
This example shows a convenient way to return using one subroutine call the abscissa, contents and errors for a 1-dimensional histogram. Note that in this case the errors in X are equal to 0.5*BINWIDTH.


Last update: Tue May 16 09:09:27 METDST 1995