Closed SimonHeybrock closed 9 months ago
I've started looking at this and I have some questions:
scippnexus
documentation but did not find the field:
from scippnexus import data
filename = data.get_path('PG3_4844_event.nxs')
import scippnexus as snx
f = snx.File(filename)
detector = f['entry/instrument/bank102']
list(detector.keys())
['azimuthal_angle',
'data_x_y',
'distance',
'event_id',
'event_index',
'event_time_offset',
'event_time_zero',
'local_name',
'origin',
'pixel_id',
'polar_angle',
'total_counts',
'x_pixel_offset',
'y_pixel_offset']
0
in the entire array?
See https://manual.nexusformat.org/classes/base_classes/NXdetector.html#nxdetector-pixel-mask-field. We should turn this into masks of a
scipp.DataArray
(the the detector is loaded as a DataArray).Scipp only really works with boolean masks. Therefore, we should inspect the bitmask, and split it into individual masks. Only bits that are actually in use should result in creation of a corresponding mask.