#!/usr/bin/env python
import cosmich
import sys
ch = cosmich.cosmochain(sys.argv[1])
for nm in ch.paramnames:
    res = ch.GetLimits(nm,
                       limlist=[0, 0, 0, 0.95, 0.997, 0.999],
                       returnlims=True)
    print(nm, res)

ch['Ol'] = 1 - ch['Ok'] - ch['Om']
print("Ol", ch.GetLimits("Ol", lims=[0, 0, 0, 0.95, 0.997, 1.0]))
#!/usr/bin/env python

#
# This little plots
# results of TestAndVSEH.py
#

import pylab, cosmich

C1 = cosmich.cosmochain('chains/test_EH.txt', [''])
C2 = cosmich.cosmochain('chains/test_Anderson.txt', [''])
nams = [x[:-1] for x in open('chains/test_EH.params').readlines()]
N = len(nams)
cc = 0
pylab.figure(figsize=(4 * N, 4 * N))
for i in range(N):
    for j in range(N):
        cc += 1
        if (i < j):
            continue
        pylab.subplot(N, N, cc)
        if (i == j):
            xv, yv = C1.GetHisto(i + 2)
            xv2, yv2 = C2.GetHisto(i + 2)
            pylab.plot(xv, yv, 'r-')
            pylab.plot(xv2, yv2, 'b-')
        elif (i > j):
            C1.Plot2D(j + 2, i + 2, filled=2)
            C2.Plot2D(j + 2, i + 2, filled=0)
            if (j == 0):
                pylab.ylabel(nams[i])
Exemple #3
0
#!/usr/bin/env python
import cosmich, sys
ch=cosmich.cosmochain(sys.argv[1])
for nm in ch.paramnames:
    res=ch.GetLimits(nm)
    print nm,res

ch['Ol']=1-ch['Ok']-ch['Om'] 
print "Ol", ch.GetLimits("Ol")
Exemple #4
0
#!/usr/bin/env python

#
# This little plots 
# results of TestAndVSEH.py
#

import pylab, cosmich



C1=cosmich.cosmochain('chains/test_EH.txt',[''])
C2=cosmich.cosmochain('chains/test_Anderson.txt',[''])
nams=[x[:-1] for x in open('chains/test_EH.params').readlines()]
N=len(nams)
cc=0
pylab.figure(figsize=(4*N,4*N))
for i in range(N):
    for j in range(N):
        cc+=1
        if (i<j):
            continue
        pylab.subplot(N,N,cc)
        if (i==j):
            xv,yv=C1.GetHisto(i+2)
            xv2,yv2=C2.GetHisto(i+2)
            pylab.plot(xv,yv,'r-')
            pylab.plot(xv2,yv2,'b-')
        elif (i>j):
            C1.Plot2D(j+2,i+2,filled=2)
            C2.Plot2D(j+2,i+2,filled=0)