Bugs when loading hdf5 files
There are at least two bugs when loading hdf5 files depending on how the traces were saved.
First, if a budget was created from the command line as
python -m gwinc -s ce1.h5 CE1
and loaded later as
traces = gwinc.io.load_hdf5('ce1.h5')
the main budget can be plotted with
gwinc.plot_budget(traces)
but trying to plot a sub-budget with
gwinc.plot_budget(traces.Newtonian)
results in the error
ValueError: x, y, and format string must not be None
Both of these plots work when generating the traces directly with budget.run()
.
Second, if a budget was saved as
budget = gwinc.load_budget('CE1', ff)
traces = budget.run()
gwinc.io.save_hdf5('ce1.h5', traces)
trying to load it back later with
traces = gwinc.load_hdf5('ce1.h5')
results in the error
KeyError: 'plot_style'
Two other related minor things: I don't think plot_style
does anything anywhere anymore and the save_hdf5
docstring is a little out of date.