Bugfixs *IMPORTANT* in lasp_measurement.
This commit is contained in:
parent
c152bf65f3
commit
43e11b53ba
@ -107,11 +107,11 @@ def scaleBlockSens(block, sens):
|
|||||||
"""
|
"""
|
||||||
assert sens.ndim == 1
|
assert sens.ndim == 1
|
||||||
assert sens.size == block.shape[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)
|
sw = getSampWidth(block.dtype)
|
||||||
fac = 2**(8*sw - 1) - 1
|
fac = 2**(8*sw - 1) - 1
|
||||||
else:
|
else:
|
||||||
fac = 1,
|
fac = 1.
|
||||||
return block.astype(LASP_NUMPY_FLOAT_TYPE)/fac/sens[np.newaxis, :]
|
return block.astype(LASP_NUMPY_FLOAT_TYPE)/fac/sens[np.newaxis, :]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user