Overwrite some metadata from config file
About
This MR adds the option to overwrite some datasets attributes.
Sometimes (frequently?), the metadata contained in HDF5/NX files has issues (user inputs the wrong energy, a negative distance ; or there was an issue with the motors encoding).
Close #338 (closed)
To do
-
Remove --energy
argument innabu
CLI (was deprecated for 1.5 year) -
Implement units/quantities extractor from string -
Unit test -
Add a parameter in nabu_config
-
Integrate in dataset parsing/validator -
End-to-end reconstruction test -
Bonus: fix HA end_xy when using binning
Notes
There are at least two ways of doing this:
- Within the CLI:
nabu nabu.conf --energy X --pixel_size Y
- In the configuration file:
overwrite_metadata = energy=19kev; pixel_size = 1.6 micron
or even an[overwrite]
section.
The second option was chosen.
Edited by Pierre Paleo