check_meta_consistent¶
- marxs.base.check_meta_consistent(meta1, meta2, keywords=['ORIGIN', 'CREATOR', 'MARXSVER', 'MARXSGIT', 'MARXSTIM'], allow_missing=True)[source] [edit on github]¶
Check that the meta data between two simulations indicates consistency.
This check compares a number of keywords (e.g. the version of marxs) to indicate if the simulations where run with the same version of marxs. If a simulation records more information in the metadata, the check can be more complete. This function raises an
AssertionError
if the two sets of meta information are different.- Parameters:
- meta1dict
header from photon list 1
- meta2dict
header from photon list 2
- keywordslist
Keywords to be checked
- allow_missingbool
This flag allows a keyword to be missing from both dictionaries (e.g. MARXSGIT is not set if run with a released version); however, it is still an error if a key is present only in one, but not the dictionary.
- Raises:
- AssertionError, KeyError