Closed akritiasto closed 1 month ago
Hi there,
If you're loading a previously fitted model from a save file you'd need to add the command sampler.posterior.get_advanced_quantities() after sampler.fit() in order to get the code to re-generate the quantities you're trying to plot.
Cheers, Adam
Thank you!
Hi Adam! I am a new user of BAGPIPES and I am exploring the various options of bagpipes. I have fitted a double-power law SFH to the SED of a quiescent galaxy and I am having some trouble in plotting my results. My code is:
The error I get is: Results loaded from pipes/posterior/n501_finalbreak/911001.h5
Fitting not performed as results have already been loaded from pipes/posterior/n501_finalbreak/911001.h5. To start over delete this file or change run.
Traceback (most recent call last):
File ~/anaconda3/lib/python3.10/site-packages/spyder_kernels/py3compat.py:356 in compat_exec exec(code, globals, locals)
File ~/allcodes_odin/bagpipes/plotb.py:135 a=load_saved(IDs)
File ~/allcodes_odin/bagpipes/plotb.py:103 in load_saved pipes.plotting.add_photometry_posterior(sampler, ax1)
File ~/anaconda3/lib/python3.10/site-packages/bagpipes/plotting/plot_spectrum_posterior.py:69 in add_photometry_posterior log_wavs = np.log10(fit.posterior.model_galaxy.wavelengths*(1.+redshift))
AttributeError: 'posterior' object has no attribute 'model_galaxy' I am not able to resolve this error.. Could you please help me with this. Thanks!