neutronpy.instrument.chop

neutronpy.instrument.chop(matrix, tol=1e-12)[source]

Rounds values within tol of zero down(up) to zero

Parameters:
matrix : array, number

The object to be chopped.

tol : float, optional

The tolerance under which values will be rounded. Default: 1e-12.

Returns:
out : same as input

Object with values chopped.