We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 55b858d + ee7ec6d commit 6b4d262Copy full SHA for 6b4d262
src/ess/powder/conversion.py
@@ -4,7 +4,6 @@
4
Coordinate transformations for powder diffraction.
5
"""
6
7
-import numpy as np
8
import sciline as sl
9
import scipp as sc
10
import scippneutron as scn
@@ -317,8 +316,7 @@ def compute_monitor_time_of_flight(
317
316
wf[time_of_flight.PulseStride] = pulse_stride
318
wf[time_of_flight.PulseStrideOffset] = pulse_stride_offset
319
out = wf.compute(time_of_flight.ResampledTofData)
320
- inds = out.values == 0.0
321
- out.values[inds] = np.nan
+ out.masks["zero_counts"] = out.data == sc.scalar(0.0, unit=out.data.unit)
322
return TofMonitorData[RunType, MonitorType](out)
323
324
0 commit comments