-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for choice element #23
Comments
I just tried it, it is actually already supported. You can write
which is translated through nyaml as <field name="choice">
<field name="pass_energy" type="NX_FLOAT" units="NX_ENERGY"/>
<field name="drift_energy" type="NX_FLOAT" units="NX_ENERGY"/>
</field> The backwards conversion does also work. So this is just a documentation issue. |
Yes, but it is picking up a different syntax. It should be a tag <choice ...>
...
</choie> |
Ah right. Anyway, according to the manual, |
Yes, I actually remembered this incorrectly. I updated my original comment on the drift_energy. However, I think it's also helpful to have the choice element for fields, so I opened an issue for it: nexusformat/definitions#1357 Anyways, I think we should still add the support in nyaml and pynxtools. |
In NXDL one can use a choice element to select out of two elements. We should also support this in this conversion tool.
Here is a link to the manual: https://manual.nexusformat.org/defs_intro.html#choice
The text was updated successfully, but these errors were encountered: