; $Id: clearjunk.pro,v 1.2 2006/09/20 20:25:05 kneller Exp $
;
;FILENAME:
;        clearjunk.pro
;
;PURPOSE:
;       Eliminate small values from numbers close to zero.
;       This is sometimes necessary for results of some calculations,
;       but should be applied carefully.
;CATEGORY:
;
;
;METHODS IN FILE:
;
;METHODS:
;    clearjunk
;
;
;####################################################################
function clearjunk,x


    for i=0,n_elements(x)-1 do begin
        if abs(x[i]) lt 5.0e-8 then x[i] = 0.0
    endfor;i

    return,x
end;clearjunk