Skip to content

[Bug?]: Validation emits warning for specific unit even though NeXus Unit Category is NX_ANY #672

@mkuehbach

Description

@mkuehbach

Contact Details

No response

What happened?

The concept power_setting of NXelectromagnetic_lens has NeXus Unit Category NX_ANY
The concept docstring states

Descriptor for the lens excitation when the exact technical details are unknown
or not directly controllable as the control software of the microscope does not
enable or was not configured to display these values for users.

So the data entered can be of NX_UNITLESS, NX_DIMENSIONLESS, percent, or some specific engineering quantities.
The NeXus documentations states that NX_ANY is for case where one is not "picky about the unit"
Given that the concept is of NX_CHAR_OR_NX_NUMBER one could even state, "fully cranked up"

However, still though the validator emits a warning where it should not.

Relevant log output

WARNING: The unit '%' at /ENTRY[entry1]/measurement/eventID[event4]/instrument/ebeam_column/lensID[lens6]/power_setting/@units does not match with the unit category NX_ANY of 'power_setting'.

Suggestion
The validator should not throw in such as case when the unit is NX_ANY.
Does not cause harm for downstream processing but clutters the output unnecessarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions