scippneutron.tof.to_events.to_events#
- scippneutron.tof.to_events.to_events(da, event_dim, events_per_bin=500)[source]#
Convert a histogrammed data array to an event list. Each dimension with a bin-edge coordinate is converted to an event coordinate. The contract is that if we re-histogram the event list with the same bin edges, we should get the original counts back. Masks on non-bin-edge dimensions are preserved. If there are masks on bin-edge dimensions, the masked values are zeroed out in the original data before the conversion to events.