def plotParamMargs(x, nbins=50): r = bnmin1utils.ChainToArray(x) pyxplot.histogram( [[r[:, 0] * 0.5, ""]], "o/mcmc_amp.eps", width=10, xlabel="Amplitude", nbins=nbins, relative=True, key=None ) pyxplot.histogram( [[r[:, 3], ""]], "o/mcmc_sigma.eps", width=10, xlabel="Width", nbins=nbins, relative=True, key=None ) pyxplot.histogram( [[r[:, 1], ""]], "o/mcmc_pos.eps", width=10, xlabel="Position", nbins=nbins, relative=True, key=None ) pyxplot.histogram( [[r[:, 4], ""]], "o/mcmc_rot.eps", width=10, xlabel="Rotation", nbins=nbins, relative=True, key=None ) pl = ["Amplitude", "x-position", "y-position", "width", "squint", "rotation"] for i in range(len(pl)): pyxplot.histogram( [[r[:, i], ""]], "o/mcmc-%i.eps" % (i,), width=10, xlabel="Rotation", nbins=nbins, relative=True, key=None ) for j in range(i + 1, len(pl)): twod.hist2d(r[:, i], r[:, j], "o/mcmc-%i-%i.eps" % (i, j), xlabel=pl[i], ylabel=pl[j])
def scatterPlot(x, n=-1): r = bnmin1utils.ChainToArray(x) twod.pos(r[:n], "o/statter-%i.eps" % n, xlabel="Amplitude", ylabel="x-position", xrange=(1, 3), yrange=(22, 42)) twod.hist2d( r[:n, 0], r[:n, 1], "o/mcmc2h-%i.eps" % n, xlabel="Amplitude", ylabel="x-position", range=((1, 3), (22, 42)) )
def plotTwoPar(din, p1, p2, fnameout, burn=0): d1,d2=[din.data.field(x) for x in [p1,p2]] x1=d1[burn*len(d1):] x2=d2[burn*len(d2):] twod.hist2d(x1,x2, fnameout, xlabel=escapeAxisName(p1), ylabel=escapeAxisName(p2), bins=20)
def plotCorr(): d = numpy.array(pickle.load(open(("o/corrdata.p")))) twod.hist2d(d[:, 0], d[:, 1], "o/ampwidthcorr.eps", xlabel="Amplitude", ylabel="Width")