-
Notifications
You must be signed in to change notification settings - Fork 8
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
Datatype checking for array dtype #555
Comments
This was referenced Feb 18, 2025
@rettigl I tried the *_specsscan_conversion_to_NeXus.ipynb with the current modification available here https://github.com/FAIRmat-NFDI/pynxtools/pull/554/files. With that modification I see the warning message from the mentioned notebook as follows:
Here I see that warning massage from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the data type of numpy arrays is not being checked against the NX datatype, i.e. e.g. numeric arrays are treated as valid entries for NX_CHAR fields, or string arrays as valid entries for NX_NUMBER. Instead, the dtype of an array should be checked against the possible primitive datatypes.
Relevant code:
pynxtools/src/pynxtools/dataconverter/helpers.py
Line 611 in d3b15e2
Steps to reproduce:
Follow the conversion Notebook here: https://nomad-lab.eu/prod/v1/gui/user/uploads/upload/id/iM3-bEttS060E2-GIqaSBA
The @vector attributes of the transformation classes are defined as NX_CHAR in NXmpes_arpes (which itself is a mistake, to be fixed), yet are passed as numeric arrays to the converter, which accepts them without complaint, and writes numeric arrays to the attribute.
The text was updated successfully, but these errors were encountered: