Consider to use 'mvsa'.
Proposal by JK: the NeXus recorder uses the MacroServer environment variable MetadataScript to locate the script generating metadata.
So far it is foreseen to collect the metadata into a dictionary.
The feature is currently being tested. The next phase will be to roll it out and ask for user response. Once this feature is establised, the FIO recorder will also use it.
Here is an example:
#!/usr/bin/env python3 # # executed before the scan # def main(): dct = { "hutch_temperature": 293.1, "hutch_temperature@units": "K", } return dct if __name__ == "__main": main()