Bugfixs *IMPORTANT* in lasp_measurement.

This commit is contained in:
Anne de Jong 2018-10-01 15:12:45 +02:00 committed by J.A. de Jong - ASCEE
parent c152bf65f3
commit 43e11b53ba

View File

@ -107,11 +107,11 @@ def scaleBlockSens(block, sens):
"""
assert sens.ndim == 1
assert sens.size == block.shape[1]
if isinstance(block.dtype, numbers.Integral):
if np.issubdtype(block.dtype.type, np.integer):
sw = getSampWidth(block.dtype)
fac = 2**(8*sw - 1) - 1
else:
fac = 1,
fac = 1.
return block.astype(LASP_NUMPY_FLOAT_TYPE)/fac/sens[np.newaxis, :]