def evolvePDF(bestfitloc='posteriorpdf.fits', stepsize=50000): """ Plot the evolution of the PDF of each parameter of the model. """ import setuputil # Get upper and lower limits on the parameters to set the plot limits paramData = setuputil.loadParams(config) p_u = paramData['p_u'] p_l = paramData['p_l'] limits = [p_l, p_u] # read posterior PDF fitresults = fits.getdata(bestfitloc) nresults = len(fitresults) print("Output from emcee has = " + str(nresults) + " iterations.") start = 0 for iresult in range(0, nresults, stepsize): strstep = str(stepsize) nchar = len(str(nresults)) striresult = str(iresult).zfill(nchar) tag = 'evolution' + strstep + '.' + striresult + '.' trimresults = fitresults[start:start + stepsize] start += stepsize visualutil.plotPDF(trimresults, tag, limits=limits, Ngood=1000, axes='initial')
def posteriorPDF(bestfitloc='posteriorpdf.fits'): """ Plot the posterior PDF of each parameter of the model. """ # read posterior PDF print("Reading output from emcee") fitresults = fits.getdata(bestfitloc) tag = 'posterior' visualutil.plotPDF(fitresults, tag, Ngood=5000, axes='auto')