snoplusuk / echidna

MIT License
4 stars 12 forks source link

Write configs to HDF5 #126

Closed ashleyrback closed 8 years ago

ashleyrback commented 8 years ago

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.