vasole / pymca

PyMca Toolkit git repository
Other
58 stars 54 forks source link

Add motor info to QNexuswidget #1088

Open mspito opened 1 month ago

mspito commented 1 month ago

Needs https://github.com/vasole/pymca/pull/1087 first

Screenshot from 2024-08-14 16-15-52

vasole commented 1 month ago

Please rebase your work on current master that includes #1087

vasole commented 1 month ago

Some comments:

PyMca is used at other facilities than the ESRF and former ESRF files did not look like current ones. I find nxpositioners = nxentry.get("instrument/positioners_start", None) very ESRF-centric and restrictive.

I would aim at using something similar to the function getPositionersGroup(h5file, path) in PyMca5.PyMcaCore.NexusTools.py That would make the use of the new feature not restricted to ESRF. For instance, A getStartingPositionersGroup in PyMca5.PyMcaCore.NexusTools.py seems to me more appropriate. It could use your hard-coded specific call and default to getPositionersGroup if nothing found. That would imply that if one positioner is an array of positions, the first position is used as starting point to allow the use of get_motor_positions.