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.
1 parent 9cbe154 commit 759fdacCopy full SHA for 759fdac
src/ess/powder/masking.py
@@ -58,10 +58,15 @@ def apply_masks(
58
"two_theta": two_theta_mask_func,
59
}.items():
60
if mask is not None:
61
- if dim in out.bins.coords:
+ if (out.bins is not None) and (dim in out.bins.coords):
62
out.bins.masks[dim] = mask(out.bins.coords[dim])
63
else:
64
- out.masks[dim] = mask(out.coords[dim])
+ coord = (
65
+ sc.midpoints(out.coords[dim])
66
+ if out.coords.is_edges(dim)
67
+ else out.coords[dim]
68
+ )
69
+ out.masks[dim] = mask(coord)
70
71
return MaskedData[RunType](out)
72
0 commit comments