Patent ID: 7269523

Claim:
A method for generating average channel address and spectrum-memory increment value from electrical pulses received from a radiation detector, said electrical pulses having already been resolved by a pulse-height analyzer into channel addresses indicative of their respective heights, said method comprising the steps of: (a) receiving a first channel address from said pulse-height analyzer; (b) using said first channel address to determine an averaging window; (c) positioning said averaging window around said first channel address; (d) if there is no average sum in the averaging memory within said averaging window, then seeding a new average sum in the averaging-memory channel pointed by said first channel address; (e) if there is at least one average sum in the averaging memory within said averaging window, then: (1) calculating a new average sum using said first channel address and the existing average sum or sums within said averaging window; and (2) calculating a new average number using existing average numbers within said averaging window; (f) calculating a new address of said averaging-memory channel to store said new average sum and said new average number as the integer part of the quotient obtained by dividing said new average sum by said new average number; (g) writing zero to the average sum and average number of all averaging-memory channels that have contributed to the calculation of said new average sum; (h) if said new average number is equal to or greater than a predetermined maximum average number, then: (1) dividing said new average sum by said new average number to obtain a quotient; (2) generating and outputting the average channel address as being equal to the integer part of said quotient; (3) generating and outputting the spectrum-memory increment value as being equal to quotient obtained by dividing said new average number by said predetermined maximum average number; (4) subtracting from said new average sum the product of said average channel address, said predetermined maximum average number, and said spectrum-memory increment value; (5) subtracting from said new average number the product of said predetermined maximum average number and said spectrum-memory increment value; and (i) repeating steps (a) through (h) until a first channel address is no longer received from said pulse-height analyzer.