Skip to content

Fix types and units for inherited fields in MPES#373

Merged
lukaspie merged 2 commits into
fairmatfrom
mpes-type-fixes
Apr 10, 2025
Merged

Fix types and units for inherited fields in MPES#373
lukaspie merged 2 commits into
fairmatfrom
mpes-type-fixes

Conversation

@lukaspie

@lukaspie lukaspie commented Apr 9, 2025

Copy link
Copy Markdown
Collaborator

When starting to build sibling inheritance in the NexusTree of pynxtools, I found these small inconsistencies where fields in MPES-related appdefs had mismatches to the same fields defined in base classes or in the MPES application definition.

Summary by Sourcery

Fix field type and unit inconsistencies in MPES and XPS NeXus definitions

Bug Fixes:

  • Correct field types from NX_NUMBER to NX_FLOAT for distance fields
  • Add missing type specifications for numeric fields in XPS fit parameters

Enhancements:

  • Standardize field types for various measurements in MPES and XPS definitions
  • Add missing units to setpoint and other fields in MPES and XPS definitions

@lukaspie lukaspie requested a review from rettigl April 9, 2025 15:57
@sourcery-ai

This comment was marked as resolved.

@lukaspie lukaspie changed the title Fix field types and inherited in MPES Fix field types and inherited units in MPES Apr 9, 2025
@lukaspie lukaspie changed the title Fix field types and inherited units in MPES Fix field types and units for inherited fields in MPES Apr 9, 2025
@lukaspie lukaspie changed the title Fix field types and units for inherited fields in MPES Fix types and units for inherited fields in MPES Apr 9, 2025
sourcery-ai[bot]

This comment was marked as resolved.

@lukaspie

lukaspie commented Apr 9, 2025

Copy link
Copy Markdown
Collaborator Author

Here's the draft for inheritance of fields and attributes that led to these inconsistencies being detected: FAIRmat-NFDI/pynxtools#621

@rettigl rettigl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes make sense to me.
Generally, with our current implementation I see restriction to NX_FLOAT at various places a bit problematic, if one does not have influence on the data type of some fields, i.e. would have to change the reader for that. So I am wondering if it would not make sense to introduce silten int to float conversion for NX_FLOAT.

@lukaspie lukaspie merged commit 297e81c into fairmat Apr 10, 2025
@lukaspie lukaspie deleted the mpes-type-fixes branch April 10, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants