FAIRmat-NFDI / nomad-measurements

A NOMAD plugin containing base sections for measurements.
https://FAIRmat-NFDI.github.io/nomad-measurements/
Apache License 2.0
14 stars 1 forks source link

Refactor XRD rasx reader #46

Closed ka-sarthak closed 11 months ago

ka-sarthak commented 11 months ago

Currently, if some data field (for instance, some position axis) is absent in the .rasx file, the reader throws a key error and processing is interrupted.

To avoid this, the reader should handle missing data, and also missing data units. I also believe that current way of accessing data and units separately is not ideal. Instead, we can implement get methods in RASXFile class within IKZ module. These will collect both values and units, handle if one or both of them are missing, bind them together, and return a dict.

This allows for a cleaner integration of data within read_rigaku_rasx function, where nomad.units can be used on top of them to make .