Closed t20100 closed 3 years ago
numpy.logical_not
is their friend then. We can need multiple||overlapping masks
That's about GUI and file. In fact people dont know anything about the way it is stored, nor read.
And Lima uses the reverse of silx.
Is that normalized in Nexus?
BTW, thinking out loud, as it's about EDF mask, we could write the way the mask have to be read in the header.
So what Lima could read silx files properly. I can take care of it.
What do you think?
If an array denotes a mask, typically 0 is not masked and any other value allows to specify different levels of masks.
If 0 is masked, then you are not in a good situation.
Are you confusing mask with pixel_mask_applied?
https://manual.nexusformat.org/classes/base_classes/NXdetector.html#nxdetector
To me is crystal clear that 0 is a non-masked value. Dectris is following NeXus too. That should settle the question.
You remember me this pixel_mask
specification.
My proposal when we save mask as EDF is only to write something like source=silx
or source=silx-mask
in the header (or application=
whatever). To me it is enough to know how to deal with the file data when it have to be read again. We don't have to change our workflow.
I let you close it if you think #3310 is enough.
Here is a MR on Lima to be able to properly read silx 0.14 masks without doing anything more: https://gitlab.esrf.fr/limagroup/Lima-tango-python/-/merge_requests/58
closed by PR #3310 on branch 0.14
Not sure we can do anything in silx, but I still open it for discussion. Apparently bliss is using the opposite convention that is used in silx regarding masks. This forces users to invert the silx mask to be used.