silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
165 stars 17 forks source link

Show NXentry title in tree #1622

Open woutdenolf opened 2 months ago

woutdenolf commented 2 months ago

NXentry names are often adapted for machine consumption while the title is meant for human consumption.

Silx view shows both

image

H5web does not

image

It does mean you would need to fetch the "title" dataset if any which you might not want to do? Or perhaps make it optional?

loichuder commented 2 months ago

Hm. How far would you like to go with this ?

Because if I look at our beloved water_224.h5 file in silx view, the description column can be filled in many ways: image

axelboc commented 2 months ago

It does mean you would need to fetch the "title" dataset if any which you might not want to do? Or perhaps make it optional?

Indeed, for each "NX" badge, we have access only to the metadata of the group itself (i.e. dataset01, dataset02, etc.), including attributes, but not the metadata of its children. We could fetch the metadata of the children as well, but this may lead to requests pile-ups in files/groups with lots of NX sub-groups, thus slowing down fetching actual data. It gets worse when considering nested NX entities, as Loïc mentioned.

I could also imagine cases where the groups would be named meaningfuly and the titles would be generic...

Maybe there's a compromise to be found in naming the datasets, like 01_APS-13-ID-C_Co_K? In a way, it's not really helping machines either (including H5Web) if, to get to a meaningful name, they have to know about NeXus and dig through the tree to find a distinctive piece of information. :stuck_out_tongue_closed_eyes:

woutdenolf commented 2 months ago

How far would you like to go with this ?

Just the NXentry title.