Exemple #1
0
	def __init__(self, NP, means, mins, maxs, sds, outfile, errlev=0.1, goodchi2=350.0):
		"""
		Instantiates the class by synthetically generating data.
		"""
		MCMC.__init__(self, TargetAcceptedPoints=1000, NumberOfParams=NP, Mins=mins, Maxs=maxs, SDs=sds, \
			write2file=True, outputfilename=outfile, alpha=0.1, debug=False,\
                                EstimateCovariance=True, CovNum=100, goodchi2=goodchi2)
		lcurv.readmap()
		lcurv.mockdata(means,errlev)
Exemple #2
0
def mockdata():
    global pars
    lcurv.readmap()
    Rp = 39.4
    Rn, a, b = 0.4, 0, 0.3
    pars = [51, 290, 1.0, Rp, Rn, a, b]
    pars = np.array(pars)
    print(pars)
    errlev = 0.04
    lcurv.mockdata(pars, errlev)
Exemple #3
0
def mockdata():
    global pars
    lcurv.readmap()
    Rp = 39.4              # scaled by 30
    Rn,a,b = 0.4, 0, 0.3
    print('r_half = ',Rhalf(1,Rn,a,b)*Rp/30)
    pars = [ 51, 290, 1.0, Rp,  Rn, a, b ]
    pars = np.array(pars)
    print(pars)
    errlev = 0.04
    lcurv.mockdata(pars,errlev)
Exemple #4
0
def mockdata():
    global pars
    lcurv.readmap()
    Rp = 39.4  # scaled by 30
    Rn, a, b = 0.4, 0, 0.3
    print('r_half = ', Rhalf(1, Rn, a, b) * Rp / 30)
    pars = [51, 290, 1.0, Rp, Rn, a, b]
    pars = np.array(pars)
    print(pars)
    errlev = 0.04
    lcurv.mockdata(pars, errlev)
Exemple #5
0
    def __init__(self,
                 NP,
                 means,
                 mins,
                 maxs,
                 sds,
                 outfile,
                 errlev=0.1,
                 goodchi2=350.0):
        """
		Instantiates the class by synthetically generating data.
		"""
        MCMC.__init__(self, TargetAcceptedPoints=1000, NumberOfParams=NP, Mins=mins, Maxs=maxs, SDs=sds, \
         write2file=True, outputfilename=outfile, alpha=0.1, debug=False,\
                                      EstimateCovariance=True, CovNum=100, goodchi2=goodchi2)
        lcurv.readmap()
        lcurv.mockdata(means, errlev)
Exemple #6
0
import numpy
import lcurv
import metrop
from scipy.optimize import leastsq

lcurv.readmap()

t1 = (1, 100, 200)
t2 = (300, 400, 500)
norm = (0.5, 1, 2.5)
rp = (10, 20, 30)
rn = (0, 0.7, 1)
a = (-1, .5, 1)
b = (-1, .5, 1)

p = []
lo = []
hi = []
for f in (t1, t2, norm, rp, rn, a, b):
    p.append(f[1])
    lo.append(f[0])
    hi.append(f[2])
p = numpy.array(p)
lo = numpy.array(lo)
hi = numpy.array(hi)

errlev = 0.05

print(lo)
print(p)
print(hi)
Exemple #7
0
import numpy
import lcurv
import metrop
from scipy.optimize import leastsq

lcurv.readmap()

t1 = (1,100,200)
t2 = (300,400,500)
norm = (0.5,1,2.5)
rp = (10,20,30)
rn = (0,0.7,1)
a = (-1,.5,1)
b = (-1,.5,1)

p = []
lo = []
hi = []
for f in (t1,t2,norm,rp,rn,a,b):
    p.append(f[1])
    lo.append(f[0])
    hi.append(f[2])
p = numpy.array(p)
lo = numpy.array(lo)
hi = numpy.array(hi)

errlev = 0.05

print(lo)
print(p)
print(hi)