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

Allow NXdata dimension variables to contain a list of strings #945

Closed
benajamin opened this issue Nov 15, 2021 · 2 comments · Fixed by #1246
Closed

Allow NXdata dimension variables to contain a list of strings #945

benajamin opened this issue Nov 15, 2021 · 2 comments · Fixed by #1246

Comments

@benajamin
Copy link
Contributor

benajamin commented Nov 15, 2021

NXdata groups contain a multidimensional data array with the @axes attribute pointing to fields within the group that hold lists of values to be used as labels for the corresponding dimensions of the dataset. Currently, the values of these "variable" datasets are restricted to NX_NUMBER. I propose that this be relaxed to allow a list of strings, with the number of list items being equal to the size of the corresponding dimension of the main data array (the one that @signal points to).
This proposal is motivated by Dectris, who would like to present data recorded by some of their detectors in terms of "channels". They would like one axis of the dataset to be labelled as "channel" and to label slices of the data array with strings like "low threshold", "high threshold" and "difference".
partly fixes #940

@benajamin benajamin added telco NIAC should review The NIAC should review/discuss and removed telco labels Nov 15, 2021
@prjemian prjemian added this to the NXDL 2021.10 milestone Dec 15, 2021
@prjemian prjemian modified the milestones: NXDL 2022.06, NXDL 2023.06 Jun 24, 2022
@sanbrock sanbrock self-assigned this Sep 14, 2022
@sanbrock sanbrock moved this to Todo in NIAC2022 project Sep 14, 2022
@sanbrock sanbrock moved this from Todo to In Progress in NIAC2022 project Sep 14, 2022
@prjemian
Copy link
Contributor

This needs a branch and pull request since the NIAC has already approved.

@benajamin benajamin removed the NIAC should review The NIAC should review/discuss label Sep 14, 2022
@prjemian prjemian moved this from In Progress to Done in NIAC2022 project Sep 14, 2022
@prjemian
Copy link
Contributor

prjemian commented Sep 15, 2022

The NX_NUMBER data type defines a list of the possible data types that could be considered as a number.

definitions/nxdlTypes.xsd

Lines 515 to 525 in 01093ec

<xs:simpleType name="NX_NUMBER">
<xs:annotation>
<xs:documentation>any valid NeXus number representation</xs:documentation>
</xs:annotation>
<xs:union memberTypes="
nxdl:NX_INT
nxdl:NX_UINT
nxdl:NX_POSINT
nxdl:NX_FLOAT
" />
</xs:simpleType>

We could define a new data type that is a union of data types NX_NUMBER and NX_CHAR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants