As part of the Summary and FitResults and even Spectra instances saved to hdf5, we want to be able to be able to ave configs (SpectraConfig, SpectraFitConfig and GlobalFitConfig) in the hdf5 files as well.
At the moment we are saving each element in the config as a separate attribute. However this involves all elements in the config being converted to the correct string format (all hard-coded).
I think this could be done more easily by converting the config back to a dictionary and then converting the dictionary to a string using json. Then when loading from hdf5 just do the reverse.
As part of the
Summary
andFitResults
and evenSpectra
instances saved to hdf5, we want to be able to be able to ave configs (SpectraConfig
,SpectraFitConfig
andGlobalFitConfig
) in the hdf5 files as well.At the moment we are saving each element in the config as a separate attribute. However this involves all elements in the config being converted to the correct string format (all hard-coded).
I think this could be done more easily by converting the config back to a dictionary and then converting the dictionary to a string using json. Then when loading from hdf5 just do the reverse.