MCMC-posterior visualization¶
[1]:
from EmuPBk import visualize
import numpy as np
This function uses chianconsumer, for more details about chainconsume go to :https://samreay.github.io/ChainConsumer/chain_api.html
[2]:
#making random parameter data for corner plot
params = np.random.normal(0,1.0,(10000,4))
params.shape # 10000 samples with 4 parameters
[2]:
(10000, 4)
Corner-Plot¶
[3]:
# for general use
plot = visualize.Get_Posterior(params=params)
plot.corner()
name of param_1: One
name of param_2: Two
name of param_3: Three
name of param_4: Four
corner plot successfully saved at your current directory

[4]:
#EoR parameter constrains
#params = np.loadtxt('path/to/file')
params = np.loadtxt('/home/ht/Desktop/data/Bk_results/K0.2/11/Bk.out')
plot = visualize.Get_Posterior(params=params)
plot.corner()
name of param_1: $\zeta$
name of param_2: $R_{mfp}$
name of param_3: $Mhalo_{min}\times 10^8 M_\odot$
corner plot successfully saved at your current directory
