示例#1
0
def plotchi():
    xlabel = r"$-\log P(x|\theta)$"
    d = numpy.array(pickle.load(open(("o/ampbiasdata.p"))))
    d2 = numpy.array(pickle.load(open(("o/ampbiasdata-npos.p"))))
    pyxplot.histogram(
        [[d[0, :, 2] * 4, ""], [d2[0, :, 2] * 4, ""]], "o/chisqhist.eps", width=10, xlabel=xlabel, nbins=50
    )

    obsdst.cuml([[d[0, :, 2] * 4, ""], [d2[0, :, 2] * 4, ""]], "o/chisqcuml.eps", xlabel=xlabel, fmin=0.48, fmax=0.52)
示例#2
0
def PlotAmpBias(fin="o/ampbiasdata.p", fout="o/amp"):
    r, r2 = pickle.load(open(fin))
    noise = 0.5
    print "%shist-%i.eps" % (fout, noise * 10)
    print "o/%scuml-%i.eps" % (fout, noise * 10)
    pyxplot.histogram([[r, ""], [r2, ""]], "%shist-%i.eps" % (fout, noise * 10), width=10, xlabel="Amplitude", nbins=50)

    obsdst.cuml([[r, ""], [r2, ""]], "%scuml-%i.eps" % (fout, noise * 10), xlabel="Amplitude", fmin=0.4, fmax=0.6)

    obsdst.cuml([[r, ""], [r2, ""]], "%suml-%i-whole.eps" % (fout, noise * 10), xlabel="Amplitude")