DiamondLightSource / hdfmap

Map objects within an HDF file and create a dataset namespace
Apache License 2.0
2 stars 0 forks source link

Add dataset summaries + handle multi-dimensional scans #6

Closed DanPorter closed 2 months ago

DanPorter commented 2 months ago

A number of improvements to HdfMap I've found while updating nexus2srs.

Dataset summaries - function to extract summary information from dataset data - takes either the array shape or value and returns a string. Particularly useful for generating metadata and file summaries.

Multi-dimensional scans - on testing against a 3D scan I found the scannables table was not generating properly. I have correct this and also added functionality to return multiple axes, either using NexusMap.nexus_defaults or using names 'axes0', 'axes1'... etc.

Metadata names were too long, due to 'local_name' attributes containing the group name. This is taking only the final part of the 'local_name' attribute using the new function generate_alt_name.

A bug was spotted in dataset2data where datasets containing string integers would be parsed as datetime years. An extra catch was added for this.

DanPorter commented 2 months ago

All tests passed. Tests added to github work flows, these passed too