A method for detecting an element is disclosed and which includes the
steps of providing a gamma-ray spectrum which depicts, at least in part,
a test region having boundaries, and which has a small amount of the
element to be detected; providing a calculation which detects the small
amount of the element to be detected; and providing a moving window and
performing the calculation within the moving window, and over a range of
possible window boundaries within the test region to determine the
location of the optimal test region within the gamma-ray spectrum.