-
Notifications
You must be signed in to change notification settings - Fork 6
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
Errors with NX_BOOLEAN for h5py #34
Comments
NeXus interprets NX_BOOLEAN differently than h5py. NeXus uses an integer of 1 byte for NX_BOOLEAN. This is an int8 or uint8. The reason for this is historically: this has been defined before h5py existed and before the HDF group defined a H5T_ENUM for booleans. |
I think it would be appropriate for cnxvalidate to allow uint8s when a NX_BOOLEAN is required, since many NeXus files are written by h5py. |
Note that <xs:simpleType name="NX_BOOLEAN">
<xs:annotation>
<xs:documentation>true/false value ( true | 1 | false | 0 )</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:boolean" />
</xs:simpleType> |
I'm using h5py for storing a file in NeXus format and I'm having problems with values stored in NX_BOOLEAN type.
h5py stores boolean values as a H5T_ENUM according to their FAQ, which creates an error for me when validating a file:
It would be really nice if nxvalidate would also accept this exact enum as a form of NX_BOOLEAN.
The text was updated successfully, but these errors were encountered: