scipp / scippnexus

h5py-like utility for NeXus files with seamless scipp integration
https://scipp.github.io/scippnexus/
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Improve shape loading #109

Closed SimonHeybrock closed 1 year ago

SimonHeybrock commented 1 year ago

Improves loading of NXoff_geometry and NXcylindrical_geometry.

When such a group is loaded directly, the fields are loaded as-is. When embedded in, e.g., an NXdetector, its detector_numbers may be used to derive a shape for each detector pixel. This ensuresthat this can be tracked and broadcasted (e.g., against pixel offsets) properly, avoiding need to wrap in a scalar variable, which would prevent this.

This work has highlighted the need for butter support for "structured" dtypes in Scipp, see scipp/scipp#3046. For now, this is using binned data for a similar (if slightly more restricted) approach.

SimonHeybrock commented 1 year ago

I think I addressed all of your comments, please have another look.