Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-standard NXpositioner groups #195

Open
noemifrisina opened this issue Feb 21, 2024 · 4 comments
Open

Fix non-standard NXpositioner groups #195

noemifrisina opened this issue Feb 21, 2024 · 4 comments
Assignees
Labels
NXmx New NXmx issue

Comments

@noemifrisina
Copy link
Collaborator

The writer for NXsample is writing transformations groups as NXpositioner, eg.

h5ls -vd file.nxs/entry/sample/
sample_phi               Group
    Attribute: NX_class scalar
        Type:      12-byte null-padded ASCII string
        Data:
               "NXpositioner"
    Location:  1:39098
    Links:     1

which contains

h5ls -v file.nxs/entry/sample/sample_phi
phi                      Dataset {75}
phi_end                  Dataset {75}
phi_increment_set        Dataset {SCALAR}

While NXsample might accept an NXpositioner group, these do not follow the standard, see here, and are actually NXtransformations groups.

Options to fix:

  1. Make NXpositioner groups indicating axes into NXtransformations group.
  2. Keep the NXpositioner group but move the axis_name fields into a further NXtransformations, making the tree look like /entry/sample/sample_phi/transformations/phi
  3. Remove the NXpositioner groups altogether and have all the relevant information only in /entry/sample/transformations
@noemifrisina noemifrisina added the NXmx New NXmx issue label Feb 21, 2024
@noemifrisina noemifrisina self-assigned this Feb 21, 2024
@graeme-winter
Copy link
Contributor

I vote for option 3

@noemifrisina
Copy link
Collaborator Author

A quick additional note: will need to do the same for the axes in /entry/instrument/detector/transformations/

@noemifrisina
Copy link
Collaborator Author

Tested nexus file generated with the changes in #205 which remove the non standard fields. DIALS still seems okay with them. AutoPROC fails because unable to find oscillation/scan axis.

@noemifrisina
Copy link
Collaborator Author

autoPROC seems fine with the changes made in #205 ie. add increment_set and end to /entry/sample/transformations and change the NXclass of the additional groups to a slightly more correct NXtransformation instead of NXpositioner.
The PR also makes these groups optional so that we can choose when to write them (always for eg. UDC).
This first fix will be in the next release of nexgen, complete removal may have to wait a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NXmx New NXmx issue
Projects
None yet
Development

No branches or pull requests

2 participants