Extracting combined data using PLANCK chain in cosmic
Extracting combined data using PLANCK chain in cosmic
I'm trying to extract the equation of state parameter (w , wa) distribution with 95 % limit from PLANCK chain.
I succeed to plot the distribution using a python code, /batch1/output/w_wa.py in cosmoMC.
I want to combine the plot with my calculation. Thus I need the distribution data.
I followed the page ,http://cosmologist.info/cosmomc/readme_ ... html#stats , but I can't figure out that.
I succeed to plot the distribution using a python code, /batch1/output/w_wa.py in cosmoMC.
I want to combine the plot with my calculation. Thus I need the distribution data.
I followed the page ,http://cosmologist.info/cosmomc/readme_ ... html#stats , but I can't figure out that.

 Posts: 1543
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: Extracting combined data using PLANCK chain in cosmic
Usually you can just edit the plot script to add any additional lines/contours as needed (using standard matplotlib).
Re: Extracting combined data using PLANCK chain in cosmic
In fact, I need to plot a mapping of some parameters in my model to (w0,wa) with its likelihood and draw contours of 95% and 68% on the parameter space. So I need to (w0,wa) likelihood data.
Antony Lewis wrote:Usually you can just edit the plot script to add any additional lines/contours as needed (using standard matplotlib).

 Posts: 1543
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: Extracting combined data using PLANCK chain in cosmic
From a plot script (with g being the plotter instance), you can get densities using e.g.
This is assuming the asyettobereleased May 2015 version, or the standalone GetDist (https://pypi.python.org/pypi/GetDist/)
Code: Select all
samples = g.sampleAnalyser,samplesForRoot('chain_name')
density=samples.get2DDensity('x1','x2')
density.normalize()
#you can then access density.P (array of density values),
#with ranges defining points: density.x and density.y (arrays)
#or interpolate to a value using density.Prob(x,y)
print('Density type:', type(density))
print('Test values:', density.x[0], density.y[0], density.P[0,0], density.Prob(0.2,0.5))
Re: Extracting combined data using PLANCK chain in cosmic
Recenly, I can get density using 'sampleAnalyser.get_density_grid' command.
Thanks to your help.
Thanks to your help.
Antony Lewis wrote:From a plot script (with g being the plotter instance), you can get densities using e.g.This is assuming the asyettobereleased May 2015 version, or the standalone GetDist (https://pypi.python.org/pypi/GetDist/)Code: Select all
samples = g.sampleAnalyser,samplesForRoot('chain_name') density=samples.get2DDensity('x1','x2') density.normalize() #you can then access density.P (array of density values), #with ranges defining points: density.x and density.y (arrays) #or interpolate to a value using density.Prob(x,y) print('Density type:', type(density)) print('Test values:', density.x[0], density.y[0], density.P[0,0], density.Prob(0.2,0.5))