name='dark'
collist=sns.color_palette(name, 25)
collist
someguy_normal12 = [(235, 172, 35), (184, 0, 88), (0, 140, 249), (0, 110, 0), (0, 187, 173), (209, 99, 230), (178, 69, 2), (255, 146, 135), (89, 84, 214), (0, 198, 248), (135, 133, 0), (0, 167, 108), (189, 189, 189)]*3
someguy_normal12 = np.array(someguy_normal12)
someguy_normal12 = someguy_normal12/256
#someguy_normal12
someguypalette = sns.color_palette(palette=someguy_normal12)
someguypalette
import webcolors
def closest_color(requested_color):
min_colors = {}
for key, name in webcolors.CSS3_HEX_TO_NAMES.items():
r_c, g_c, b_c = webcolors.hex_to_rgb(key)
rd = (r_c - requested_color[0]) ** 2
gd = (g_c - requested_color[1]) ** 2
bd = (b_c - requested_color[2]) ** 2
min_colors[(rd + gd + bd)] = name
return min_colors[min(min_colors.keys())]
def get_color_name(rgb_tuple):
try:
# Convert RGB to hex
hex_value = webcolors.rgb_to_hex(rgb_tuple)
# Get the color name directly
return webcolors.hex_to_name(hex_value)
except ValueError:
# If exact match not found, find the closest color
return closest_color(rgb_tuple)
# Unique example RGB value
unique_rgb = (123, 104, 238) # An RGB value not directly named in CSS3 color names
color_name = get_color_name(unique_rgb)
print(f"The color name for RGB {unique_rgb} is {color_name}.")
The color name for RGB (123, 104, 238) is mediumslateblue.
for colo in someguy_normal12:
coloname = get_color_name(colo)
print(f"The color name for RGB {colo} is {coloname}.")
The color name for RGB [0.91796875 0.671875 0.13671875] is black. The color name for RGB [0.71875 0. 0.34375] is black. The color name for RGB [0. 0.546875 0.97265625] is black. The color name for RGB [0. 0.4296875 0. ] is black. The color name for RGB [0. 0.73046875 0.67578125] is black. The color name for RGB [0.81640625 0.38671875 0.8984375 ] is black. The color name for RGB [0.6953125 0.26953125 0.0078125 ] is black. The color name for RGB [0.99609375 0.5703125 0.52734375] is black. The color name for RGB [0.34765625 0.328125 0.8359375 ] is black. The color name for RGB [0. 0.7734375 0.96875 ] is black. The color name for RGB [0.52734375 0.51953125 0. ] is black. The color name for RGB [0. 0.65234375 0.421875 ] is black. The color name for RGB [0.73828125 0.73828125 0.73828125] is black. The color name for RGB [0.91796875 0.671875 0.13671875] is black. The color name for RGB [0.71875 0. 0.34375] is black. The color name for RGB [0. 0.546875 0.97265625] is black. The color name for RGB [0. 0.4296875 0. ] is black. The color name for RGB [0. 0.73046875 0.67578125] is black. The color name for RGB [0.81640625 0.38671875 0.8984375 ] is black. The color name for RGB [0.6953125 0.26953125 0.0078125 ] is black. The color name for RGB [0.99609375 0.5703125 0.52734375] is black. The color name for RGB [0.34765625 0.328125 0.8359375 ] is black. The color name for RGB [0. 0.7734375 0.96875 ] is black. The color name for RGB [0.52734375 0.51953125 0. ] is black. The color name for RGB [0. 0.65234375 0.421875 ] is black. The color name for RGB [0.73828125 0.73828125 0.73828125] is black. The color name for RGB [0.91796875 0.671875 0.13671875] is black. The color name for RGB [0.71875 0. 0.34375] is black. The color name for RGB [0. 0.546875 0.97265625] is black. The color name for RGB [0. 0.4296875 0. ] is black. The color name for RGB [0. 0.73046875 0.67578125] is black. The color name for RGB [0.81640625 0.38671875 0.8984375 ] is black. The color name for RGB [0.6953125 0.26953125 0.0078125 ] is black. The color name for RGB [0.99609375 0.5703125 0.52734375] is black. The color name for RGB [0.34765625 0.328125 0.8359375 ] is black. The color name for RGB [0. 0.7734375 0.96875 ] is black. The color name for RGB [0.52734375 0.51953125 0. ] is black. The color name for RGB [0. 0.65234375 0.421875 ] is black. The color name for RGB [0.73828125 0.73828125 0.73828125] is black.
name='Paired'
collist2=sns.color_palette(name, 18)
collist2
want_table = True
def strleg(stri):
newstri = stri.split('/')[-1]
newstri = newstri.replace('.progress', '')
newstri = newstri.replace('cosmo','c').replace('nuis','n').replace('flag','').replace('model','m').replace('data','d').replace('__','_').replace('GaussSSC',"ssc").replace("Cstyle-","")
return newstri
def repstr(str):
stt = str.replace('.progress','')
return stt
def setup_chains_fiducials(chain_idx=None, chaindir=None, chainfiles=list(), colorlist=collist, fiducial=dict(),
derived_fiducial=dict(), paramlims=dict(), labels_dict=None, match_idx_colors=True,
):
if chaindir is None:
chaindir=''
if chain_idx is None:
chain_idx = list(range(len(chainfiles)))
chains = [repstr(chaindir+chainfiles[ii]) for ii in chain_idx]
if labels_dict is not None:
labels=[labels_dict[strleg(cc)] for cc in chains]
else:
labels=[strleg(cc) for cc in chains]
if match_idx_colors:
colors = [colorlist[ii] for ii in chain_idx]
else:
colors = colorlist
full_fiducial = {**fiducial, **derived_fiducial}
return full_fiducial, chains, labels, colors, paramlims
def contour_FoM_calculator(sample, param1, param2, sigma_level=1):
from shapely.geometry import Polygon
contour_coords = {}
density = sample.get2DDensityGridData(j=param1, j2=param2, num_plot_contours=3)
contour_levels = density.contours
contours = plt.contour(density.x, density.y, density.P, sorted(contour_levels));
for ii, contour in enumerate(contours.collections):
paths = contour.get_paths()
for path in paths:
xy = path.vertices
x = xy[:,0]
y = xy[:,1]
contour_coords[ii] = list(zip(x, y))
sigma_lvls = {3:0, 2:1, 1:2}
poly = Polygon(contour_coords[sigma_lvls[sigma_level]]) # 0:3sigma, 1:2sigma, 2:1sigma
area = poly.area
FoM_area = (2.3*np.pi)/area
return FoM_area, density
def process_samples(chains, labels, print_all=False, burn_in_fraction=0.3, colors=None):
samples = []
chains_analysis = dict()
if colors is None:
name='bright'
collist=sns.color_palette(name, 20)
itercol = iter(collist)
for ind, chain in enumerate(chains):
name = labels[ind]
sample = loadMCSamples(chain, settings={'ignore_rows': burn_in_fraction})
print('------------------------WORKING ON '+labels[ind]+'--------------------')
print('R-1({}) with {:.0f}% of points ignored = {:.3f}'.format(name,100*burn_in_fraction,
sample.getGelmanRubin()))
print('-----------------------------------------------------------------------')
p = sample.getParams()
chaindic = {}
chaindic['path'] = chain
chaindic['get_covmat'] = True
chaindic['color'] = next(itercol)
paramobs = sample.getParamNames()
pc = paramobs.parsWithNames(['M_c_1'])[0]
if pc is not None:
pc.renames = ['log10Mc_1']
#pc.renames=['M_c_1']
paramnames = [prr.name for prr in paramobs.names]
print(paramnames)
mstat=sample.getMargeStats()
if print_all:
for parr in paramnames:
print(str(parr), " Mean : ", mstat.parWithName(parr).mean)
print(str(parr), " 1sigma-Err : ", mstat.parWithName(parr).err)
print(str(parr), " Lower : ", mstat.parWithName(parr).limits[0].lower)
print(str(parr), " Upper: ", mstat.parWithName(parr).limits[0].upper)
print(sample.getInlineLatex(parr))
if 'w' in paramnames and 'wa' in paramnames:
FoM = np.sqrt(np.linalg.det(np.linalg.inv(sample.cov(pars=['w','wa']))))
print("Reported w0-wa FoM from covmat: {:.3f}".format(FoM))
FoM_A, density = contour_FoM_calculator(sample=sample, param1='w', param2='wa')
print('--'*10)
chaindic['density'] = density
print("Reported w0-wa FoM from contour area: {:.3f}".format(FoM_A))
try:
p.S8 = p.sigma8*np.sqrt(p.omegam/0.3)
sample.addDerived(p.S8, name='S8', label='S_8')
except:
print("S8 parameter could not be obtained")
pass
chaindic['sample'] = sample
chaindic['paramnames'] = paramnames
chaindic['bounds'] = sample.getTable(paramList=paramnames, limit=1).tableTex()
#chaindic['table_params_bounds'] = sample.getTable().tableParamNames
columns = open(chaindic['path']+'.1.txt').readline().rstrip().split()
columns.pop(0)
Nchains = len(glob(chaindic['path']+'.'+"*"+'.txt'))
print("Number of chains: ", Nchains)
points = [pd.read_csv(chaindic['path']+'.'+str(i+1)+'.txt', sep='\s+', skiprows=1, header=None, names=columns)
for i in range(Nchains)]
for pt in points:
pt.drop(pt.index[:int(len(pt.index)*burn_in_fraction)], inplace=True)
chaindic['trends'] = points
chaindic['points'] = points
try:
columns = open(chaindic['path']+'.progress').readline().rstrip().split()
columns.pop(0)
chaindic['progress'] = pd.read_csv(chaindic['path']+'.progress',sep='\s+',skiprows=1,header=None,names=columns)
except:
print('No progress file for '+chain)
if chaindic['get_covmat']:
try:
mat = sample.getCovMat().matrix
covmat = pd.DataFrame(data=mat.astype(float))
covmat.to_csv(chaindic['path']+'_covmat.txt', sep=' ', header=False, index=False)
chaindic['covmat'] = mat
except:
print("Cov mat not obtained")
chaindic['columns'] = chaindic['trends'][0].columns
chains_analysis[name] = chaindic
samples.append(sample)
return samples, chains_analysis
def justprocess_samples(samples, labels, stats_params="all", fom_params="default", colors=None):
chains_analysis = dict()
if colors is None:
name='bright'
collist=sns.color_palette(name, 20)
else:
collist=colors
itercol = iter(collist)
for ind, sample in enumerate(samples):
name = labels[ind]
#sample = loadMCSamples(chain, settings={'ignore_rows': burn_in_fraction})
print('------------------------WORKING ON '+labels[ind]+'--------------------')
#print('R-1({}) with {:.0f}% of points ignored = {:.3f}'.format(name,100*burn_in_fraction,
# sample.getGelmanRubin()))
#print('-----------------------------------------------------------------------')
p = sample.getParams()
chaindic = {}
#chaindic['path'] = chain
chaindic['get_covmat'] = False
chaindic['color'] = next(itercol)
paramobs = sample.getParamNames()
pc = paramobs.parsWithNames(['M_c_1'])[0]
if pc is not None:
pc.renames = ['log10Mc_1']
#pc.renames=['M_c_1']
paramnames = [prr.name for prr in paramobs.names]
print(paramnames)
mstat=sample.getMargeStats()
if stats_params=='all':
stats_params = paramnames
if fom_params=='default':
fom_params=paramnames[:2]
elif len(stats_params) == 2:
if fom_params=='default':
fom_params = stats_params
for parr in paramnames:
if parr in stats_params:
#print(str(parr), " Mean : ", mstat.parWithName(parr).mean)
#print(str(parr), " 1sigma-Err : ", mstat.parWithName(parr).err)
#print(str(parr), " Lower : ", mstat.parWithName(parr).limits[0].lower)
#print(str(parr), " Upper: ", mstat.parWithName(parr).limits[0].upper)
print(sample.getInlineLatex(parr))
if fom_params != "default":
if len(fom_params)==2:
p1 = fom_params[0]
p2 = fom_params[1]
if p1 in paramnames and p2 in paramnames:
FoM = np.sqrt(np.linalg.det(np.linalg.inv(sample.cov(pars=[p1, p2]))))
print("Reported {:s}-{:s} FoM from covmat: {:.3f}".format(p1, p2, FoM))
chaindic['FoM_cov'] = FoM
FoM_A, density = contour_FoM_calculator(sample=sample, param1=p1, param2=p2)
#print('--'*10)
chaindic['density'] = density
print("Reported {:s}-{:s} FoM from contour area: {:.3f}".format(p1, p2, FoM_A))
chaindic['FoM_Area'] = FoM_A
try:
p.S8 = p.sigma8*np.sqrt(p.omegam/0.3)
sample.addDerived(p.S8, name='S8', label='S_8')
except:
print("S8 parameter could not be obtained")
pass
chaindic['sample'] = sample
chaindic['paramnames'] = paramnames
chaindic['bounds'] = sample.getTable(paramList=paramnames, limit=1).tableTex()
#chaindic['table_params_bounds'] = sample.getTable().tableParamNames
#columns = open(chaindic['path']+'.1.txt').readline().rstrip().split()
#columns.pop(0)
#Nchains = len(glob(chaindic['path']+'.'+"*"+'.txt'))
#print("Number of chains: ", Nchains)
#points = [pd.read_csv(chaindic['path']+'.'+str(i+1)+'.txt', sep='\s+', skiprows=1, header=None, names=columns)
# for i in range(Nchains)]
#for pt in points:
# pt.drop(pt.index[:int(len(pt.index)*burn_in_fraction)], inplace=True)
#chaindic['trends'] = points
#chaindic['points'] = points
#try:
# columns = open(chaindic['path']+'.progress').readline().rstrip().split()
# columns.pop(0)
# chaindic['progress'] = pd.read_csv(chaindic['path']+'.progress',sep='\s+',skiprows=1,header=None,names=columns)
#except:
# print('No progress file for '+chain)
if chaindic['get_covmat']:
try:
mat = sample.getCovMat().matrix
covmat = pd.DataFrame(data=mat.astype(float))
covmat.to_csv(chaindic['path']+'_covmat.txt', sep=' ', header=False, index=False)
chaindic['covmat'] = mat
except:
print("Cov mat not obtained")
#chaindic['columns'] = chaindic['trends'][0].columns
chains_analysis[name] = chaindic
return chains_analysis
def plot_chain_trends(chainsdict, labels, full_fiducial, parstoplot=None):
lab0 = labels[0]
if parstoplot is None:
parstoplot = chainsdict[lab0]['paramnames']
for par in parstoplot:
fig, axes = plt.subplots(ncols=len(labels), sharey=True, subplot_kw=dict(frameon=True), figsize=(15,5))
for i,name in enumerate(labels):
axes[i].set_title(name)
if par in chainsdict[name]['columns']:
for ch in chainsdict[name]['trends']:
axes[i].plot(ch.index, ch[par].values)
axes[i].axhline(y=full_fiducial[par],ls='-',color='black',zorder=95,lw=3)
axes[i].set_xscale("log")
axes[i].set_xlabel('index')
axes[i].set_ylabel(r'{:s}'.format(par))
plt.subplots_adjust(hspace=.5)
def plot_contours(samples, parstoplot, labels, colors=collist, param_limits=dict(), markers_dict=dict(), options_dict=dict()):
fontsize = options_dict.get('axes_fontsize', 20)
Ncont = len(labels)
g = plots.get_subplot_plotter(subplot_size=1, width_inch=12, scaling=False)
g.settings.figure_legend_frame = False
g.settings.axes_fontsize=fontsize
g.settings.axes_labelsize=20
g.settings.legend_fontsize=18
g.settings.axis_marker_color = 'black'
g.settings.axis_marker_ls = '--'
g.settings.axis_marker_lw = 2
filled = options_dict.get('filled', [True]*Ncont)
contour_args_def = [{'alpha':0.9},{'alpha':0.7},{'alpha':0.6}]
contour_args = options_dict.get('contour_args', contour_args_def)
contour_ls = options_dict.get('contour_ls', ['-']*Ncont)
contour_lws = options_dict.get('contour_lws', [2.0]*Ncont)
title_limit = options_dict.get('title_limit', 1)
g.triangle_plot(samples, parstoplot,
filled=filled,
#upper_roots = samples[2:],
#upper_kwargs =
#{'contour_colors':['green', 'magenta'] },#, 'param_limits':paramlims},
#upper_label_right=True,
legend_labels=labels,
legend_loc='upper right',
legend_ncol=1,
contour_colors=colors,
contour_ls=contour_ls,
contour_lws=contour_lws,
#diag1d_kwargs={'line_args':{'lw':2}},
contour_args=contour_args,
markers=markers_dict
,
title_limit=title_limit
,
param_limits=param_limits
)
g.fig.align_ylabels()
#g.text('Hola')
#g.add_text(extra_text, x=0.95, y=0.75, fontsize=16, ax=None)
return g
#outpath = '/media/sf_ubuntushare/SCG/paper/'
chaindir1 = '../../likelihood-implementation/chains/2022/'
chaindir2 = '../../likelihood-implementation/chains/nlchains2old/'
chaindirNaut = '../../likelihood-implementation/output_mcmc/Naut/'
chaindirNautismall = '../../likelihood-implementation/output_mcmc/Nauti/'
chaindirRW = '../../rwthclust-chains/chains/'
chaindirExtra = './Matteo-CLOE/WLO_fixed/'
all_chains_list = glob(chaindir1+"*.progress")
for ii, cc in enumerate(all_chains_list):
print(ii, " : ", cc)
0 : ../../likelihood-implementation/chains/2022/WL_3cosmo_2nuis-modelflag_3-dataflag_2-cov_Gauss_flag_2.progress 1 : ../../likelihood-implementation/chains/2022/WL_ellmax_1500_3cosmo_2nuis-modelflag_1-dataflag_1-cov_Gauss_flag_1.progress
#choosechains = [6, 9, 8, 10]
choosechains = [0, 1]
chains_list = [all_chains_list[ii] for ii in choosechains]
chains_list.sort()
chains_list
['../../likelihood-implementation/chains/2022/WL_3cosmo_2nuis-modelflag_3-dataflag_2-cov_Gauss_flag_2.progress', '../../likelihood-implementation/chains/2022/WL_ellmax_1500_3cosmo_2nuis-modelflag_1-dataflag_1-cov_Gauss_flag_1.progress']
extraChains = glob(chaindirNaut+"/*.txt")+glob(chaindirNautismall+"/*.txt")
extraChains.sort()
extraChains
['../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_5_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_no_prior_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_no_prior_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax750_nlive1000_BBN_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax750_nlive1000_no_prior_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax0.250000_nlive1000_BBN_pool_general_chain.txt', '../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool_general_chain.txt']
chains_list = chains_list
chains_list
['../../likelihood-implementation/chains/2022/WL_3cosmo_2nuis-modelflag_3-dataflag_2-cov_Gauss_flag_2.progress', '../../likelihood-implementation/chains/2022/WL_ellmax_1500_3cosmo_2nuis-modelflag_1-dataflag_1-cov_Gauss_flag_1.progress']
sample = loadMCSamples(chains_list[0].replace('.progress', ''))
pars = sample.getParams()
#print(pars)
parsnames = sample.getParamNames()
paramnames = [prr.name for prr in parsnames.names]
print(len(paramnames))
print(paramnames)
13 ['omch2', 'logA', 'H0', 'aia', 'nia', 'As', 'omegam', 'omegab', 'sigma8', 'omeganu', 'omegac', 'chi2', 'chi2__Euclid']
def simpleChainloader(filenames):
sampleList = []
chainlabels=[]
for filenam in filenames:
print(f"->File name: {filenam}")
chainlab = filenam.replace(chaindirNaut, '').replace(chaindirNautismall, '')\
.replace('_LCDM_emu',' LCDM').replace('_w0waCDM_emu', ' w0waCDM')\
.replace('lin_emudat','').replace('_cov13245_','').replace('ellmax','elmx=')\
.replace('_nlive1000','').replace('general_chain','').replace('.txt', '')\
.replace('kmax1.000000', 'kmx=1.0').replace('kmax0.250000','kmx=0.25')\
.replace('_BBN',' BBNpri').replace('_no_prior', ' NOpri')\
.replace('small-', 'sm-').replace('_pool1_', '').replace('_pool_', '')
print(f"--Chain label: {chainlab}")
with open(filenam, 'r') as file:
header_line = file.readline().strip()
if header_line.startswith('#'):
header_line = header_line[1:].strip()
params = header_line.split()
print(f"Sampled params: {params}")
Npars = len(params)
print(f"Length of params: {Npars}")
datatab = np.loadtxt(filenam)
column_names = params+['weights', 'loglkl']
samp = MCSamples(samples=datatab, names=column_names, weights=np.exp(datatab[:, Npars]), loglikes=datatab[:, Npars+1])
sampleList.append(samp)
chainlabels.append(chainlab)
return sampleList, chainlabels
nautChains, nautLabels = simpleChainloader(extraChains)
->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_3_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_3_2_elmx=3000 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_3_2_kmx=1.0 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7
WARNING:root:outlier fraction 6.28693574751666e-05
->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_5_2_elmx=3000 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_3_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_3_2mod_5_2_kmx=1.0 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_4_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_4_2mod_5_2_elmx=3000 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_4_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_4_2mod_5_2_kmx=1.0 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_5_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_5_2mod_5_2_elmx=3000 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7
WARNING:root:outlier fraction 6.04266118798719e-05
->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_LCDM_emu_5_2mod_5_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL LCDM_5_2mod_5_2_kmx=1.0 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] Length of params: 7 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL w0waCDM_3_2mod_3_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia'] Length of params: 9
WARNING:root:outlier fraction 4.2446022807662924e-05 WARNING:root:outlier fraction 4.402668016818192e-05
->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_3_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL w0waCDM_3_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia'] Length of params: 9 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_4_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL w0waCDM_4_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia'] Length of params: 9
WARNING:root:outlier fraction 4.217451815613006e-05 WARNING:root:outlier fraction 5.1287311519130165e-05
->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_5_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL w0waCDM_5_2mod_3_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia'] Length of params: 9 ->File name: ../../likelihood-implementation/output_mcmc/Naut/WL_w0waCDM_emu_5_2mod_5_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool1_general_chain.txt --Chain label: WL w0waCDM_5_2mod_5_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia'] Length of params: 9
WARNING:root:outlier fraction 2.588125679382991e-05 WARNING:root:outlier fraction 5.900401227283455e-05
->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_BBN_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=1500 BBNpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax1500_nlive1000_no_prior_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=1500 NOpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_BBN_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=3000 BBNpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax3000_nlive1000_no_prior_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=3000 NOpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax750_nlive1000_BBN_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=750 BBNpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_ellmax750_nlive1000_no_prior_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_elmx=750 NOpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax0.250000_nlive1000_BBN_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_kmx=0.25 BBNpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4 ->File name: ../../likelihood-implementation/output_mcmc/Nauti/small-WL_LCDM_emu_3_2mod_3_2_lin_emudat_cov13245_kmax1.000000_nlive1000_BBN_pool_general_chain.txt --Chain label: sm-WL LCDM_3_2mod_3_2_kmx=1.0 BBNpri Sampled params: ['ombh2', 'logA', 'aia', 'nia'] Length of params: 4
nautChains
[<getdist.mcsamples.MCSamples at 0x7f03e0724d60>, <getdist.mcsamples.MCSamples at 0x7f0358ed7d00>, <getdist.mcsamples.MCSamples at 0x7f0358ed78b0>, <getdist.mcsamples.MCSamples at 0x7f0358ed73a0>, <getdist.mcsamples.MCSamples at 0x7f0358ed7370>, <getdist.mcsamples.MCSamples at 0x7f0358ed7100>, <getdist.mcsamples.MCSamples at 0x7f0358deecd0>, <getdist.mcsamples.MCSamples at 0x7f0358dee190>, <getdist.mcsamples.MCSamples at 0x7f0358dee7f0>, <getdist.mcsamples.MCSamples at 0x7f0358deefa0>, <getdist.mcsamples.MCSamples at 0x7f0358dee6a0>, <getdist.mcsamples.MCSamples at 0x7f0358f326d0>, <getdist.mcsamples.MCSamples at 0x7f0358f326a0>, <getdist.mcsamples.MCSamples at 0x7f0358f321c0>, <getdist.mcsamples.MCSamples at 0x7f0358f3a490>, <getdist.mcsamples.MCSamples at 0x7f0358f3a310>, <getdist.mcsamples.MCSamples at 0x7f0358ef1730>, <getdist.mcsamples.MCSamples at 0x7f0358ef1970>, <getdist.mcsamples.MCSamples at 0x7f0358f3ae80>, <getdist.mcsamples.MCSamples at 0x7f0358ef1670>, <getdist.mcsamples.MCSamples at 0x7f0358ef17c0>, <getdist.mcsamples.MCSamples at 0x7f0358ef1910>, <getdist.mcsamples.MCSamples at 0x7f0358ef1cd0>, <getdist.mcsamples.MCSamples at 0x7f0358ef1ca0>, <getdist.mcsamples.MCSamples at 0x7f0358ef57f0>]
nautChains[0].getNumSampleSummaryText()
'using 14204 rows, 9 parameters; mean weight 7.040270346381298e-05, tot weight 0.9999999999999996\nEquiv number of single samples (sum w)/max(w): 1128\nEffective number of weighted samples (sum w)^2/sum(w^2): 10104\n'
#getdist.chains.loadNumpyTxt(all_chains_list[1].replace('.progress', '.1.txt'), skiprows=None)
nautLabels
['WL LCDM_3_2mod_3_2_elmx=1500 BBNpri', 'WL LCDM_3_2mod_3_2_elmx=3000 BBNpri', 'WL LCDM_3_2mod_3_2_kmx=1.0 BBNpri', 'WL LCDM_3_2mod_5_2_elmx=1500 BBNpri', 'WL LCDM_3_2mod_5_2_elmx=3000 BBNpri', 'WL LCDM_3_2mod_5_2_kmx=1.0 BBNpri', 'WL LCDM_4_2mod_5_2_elmx=1500 BBNpri', 'WL LCDM_4_2mod_5_2_elmx=3000 BBNpri', 'WL LCDM_4_2mod_5_2_kmx=1.0 BBNpri', 'WL LCDM_5_2mod_5_2_elmx=1500 BBNpri', 'WL LCDM_5_2mod_5_2_elmx=3000 BBNpri', 'WL LCDM_5_2mod_5_2_kmx=1.0 BBNpri', 'WL w0waCDM_3_2mod_3_2_elmx=1500 BBNpri', 'WL w0waCDM_3_2mod_5_2_elmx=1500 BBNpri', 'WL w0waCDM_4_2mod_5_2_elmx=1500 BBNpri', 'WL w0waCDM_5_2mod_3_2_elmx=1500 BBNpri', 'WL w0waCDM_5_2mod_5_2_elmx=1500 BBNpri', 'sm-WL LCDM_3_2mod_3_2_elmx=1500 BBNpri', 'sm-WL LCDM_3_2mod_3_2_elmx=1500 NOpri', 'sm-WL LCDM_3_2mod_3_2_elmx=3000 BBNpri', 'sm-WL LCDM_3_2mod_3_2_elmx=3000 NOpri', 'sm-WL LCDM_3_2mod_3_2_elmx=750 BBNpri', 'sm-WL LCDM_3_2mod_3_2_elmx=750 NOpri', 'sm-WL LCDM_3_2mod_3_2_kmx=0.25 BBNpri', 'sm-WL LCDM_3_2mod_3_2_kmx=1.0 BBNpri']
As_value = 2.090524323509276e-09
logAnum = np.log(1e10 * As_value )
fiducial = {'ombh2': 0.0227,
'omch2': 0.1219,
'H0': 67.37,
'ns': 0.966,
'logA': 3.04,
'HMCode_logT_AGN': 7.8,
'aia': 0.16,
'bia': 0.0,
'nia': 1.66,
'w' : -1.0,
'wa' : 0.,
'multiplicative_bias_1': 0.0,
'multiplicative_bias_2': 0.0,
'multiplicative_bias_3': 0.0,
'multiplicative_bias_4': 0.0,
'multiplicative_bias_5': 0.0,
'multiplicative_bias_6': 0.0,
'multiplicative_bias_7': 0.0,
'multiplicative_bias_8': 0.0,
'multiplicative_bias_9': 0.0,
'multiplicative_bias_10': 0.0,
'multiplicative_bias_11': 0.0,
'multiplicative_bias_12': 0.0,
'multiplicative_bias_13': 0.0,
'dz_1_WL': -0.025749,
'dz_2_WL': 0.022716,
'dz_3_WL': -0.026032,
'dz_4_WL': 0.012594,
'dz_5_WL': 0.019285,
'dz_6_WL': 0.008326,
'dz_7_WL': 0.038207,
'dz_8_WL': 0.002732,
'dz_9_WL': 0.034066,
'dz_10_WL': 0.049479,
'dz_11_WL': 0.06649,
'dz_12_WL': 0.000815,
'dz_13_WL': 0.04907}
derived_fiducial = {'sigma8': 0.815, 'omegam':0.32}
derived_fiducial['S8'] = derived_fiducial['sigma8']*np.sqrt(derived_fiducial['omegam']/0.3)
paramlims = {
# 'ombh2': 0.022445,
# 'omch2': [fiducial['omch2']-0.0035, fiducial['omch2']+0.0035],
# 'H0': 67.0,
# 'tau': 0.0925,
# 'mnu': 0.06,
# 'nnu': 3.046,
#'logA': [logAnum-1, logAnum+1.0], #,
#'log10Mc_1' : [13., 14.7],
#'M_c_1' : [13., 14.7],
#'ns': 0.96,
}
derived_fiducial['h'] = fiducial['H0']/100
derived_fiducial['Omegab'] = fiducial['ombh2']/derived_fiducial['h']**2
derived_fiducial['Omegac'] = fiducial['omch2']/derived_fiducial['h']**2
derived_fiducial['Omegam'] = derived_fiducial['Omegab']+derived_fiducial['Omegac']
derived_fiducial
{'sigma8': 0.815, 'omegam': 0.32, 'S8': 0.8417283805757452, 'h': 0.6737000000000001, 'Omegab': 0.05001413505213334, 'Omegac': 0.2685781084958173, 'Omegam': 0.3185922435479507}
#parstoplot = ['H0','omegam', 'ombh2', 'ns', 'S8', 'w', 'wa', 'aia', 'nia', 'b5_photo']
#parstoplot = ['H0','omegam', 'S8', 'aia', 'nia']
#parstoplot = ['omegam', 'S8']
parstoplot = ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia'] #'HMCode_logT_AGN', 'omegam', 'S8']
#parstoplot2 = ['S8', 'w', 'wa']
paramlims = {
'ombh2': [0.01, 0.03],
'omch2': [0.09, 0.15],
'H0' : [59, 74],
'ns' : [0.9, 1.1],
'logA': [2.6, 3.6]}
paramlims={}
#full_fiducial, chains, labels_all, colors, paramlims = setup_chains_fiducials(chainfiles=chains_list, colorlist=collist, fiducial=fiducial,
# derived_fiducial=derived_fiducial, paramlims=paramlims, labels_dict=None
# )
#labels_trans = [
# 'WL_3_2mod_5_2 ell=3000_BBN,
# 'WL-1500-3c2n-m1d1-cG1',
# 'WL-3000-3c2n-m3d2-cGSSC',
# ]
#labels_dict = dict(zip(labels_all,labels_trans))
chainsLabels = nautLabels
for iii, kk in enumerate(nautLabels):
kk = kk.replace('_3_2mod', ' model=HMc, ')
kk = kk.replace('_4_2mod', ' model=EE2, ')
kk = kk.replace('_5_2mod', ' model=Bacco, ')
kk = kk.replace('_5_2_', ' data=Bacco, ')
kk = kk.replace('_3_2_', ' data=HMc, ')
print("Chain index : {:d} : legend-label: {:s}".format(iii, kk))
chainsLabels[iii] = kk
Chain index : 0 : legend-label: WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri Chain index : 1 : legend-label: WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri Chain index : 2 : legend-label: WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri Chain index : 3 : legend-label: WL LCDM model=HMc, data=Bacco, elmx=1500 BBNpri Chain index : 4 : legend-label: WL LCDM model=HMc, data=Bacco, elmx=3000 BBNpri Chain index : 5 : legend-label: WL LCDM model=HMc, data=Bacco, kmx=1.0 BBNpri Chain index : 6 : legend-label: WL LCDM model=EE2, data=Bacco, elmx=1500 BBNpri Chain index : 7 : legend-label: WL LCDM model=EE2, data=Bacco, elmx=3000 BBNpri Chain index : 8 : legend-label: WL LCDM model=EE2, data=Bacco, kmx=1.0 BBNpri Chain index : 9 : legend-label: WL LCDM model=Bacco, data=Bacco, elmx=1500 BBNpri Chain index : 10 : legend-label: WL LCDM model=Bacco, data=Bacco, elmx=3000 BBNpri Chain index : 11 : legend-label: WL LCDM model=Bacco, data=Bacco, kmx=1.0 BBNpri Chain index : 12 : legend-label: WL w0waCDM model=HMc, data=HMc, elmx=1500 BBNpri Chain index : 13 : legend-label: WL w0waCDM model=HMc, data=Bacco, elmx=1500 BBNpri Chain index : 14 : legend-label: WL w0waCDM model=EE2, data=Bacco, elmx=1500 BBNpri Chain index : 15 : legend-label: WL w0waCDM model=Bacco, data=HMc, elmx=1500 BBNpri Chain index : 16 : legend-label: WL w0waCDM model=Bacco, data=Bacco, elmx=1500 BBNpri Chain index : 17 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri Chain index : 18 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=1500 NOpri Chain index : 19 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri Chain index : 20 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=3000 NOpri Chain index : 21 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=750 BBNpri Chain index : 22 : legend-label: sm-WL LCDM model=HMc, data=HMc, elmx=750 NOpri Chain index : 23 : legend-label: sm-WL LCDM model=HMc, data=HMc, kmx=0.25 BBNpri Chain index : 24 : legend-label: sm-WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri
def printchainslabs():
for ii, cc in enumerate(chainsLabels):
print("Chain index : {:d} ;; legend-label: '{:s}'".format(ii, cc))
printchainslabs()
Chain index : 0 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 1 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri' Chain index : 2 ;; legend-label: 'WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri' Chain index : 3 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=1500 BBNpri' Chain index : 4 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=3000 BBNpri' Chain index : 5 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, kmx=1.0 BBNpri' Chain index : 6 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=1500 BBNpri' Chain index : 7 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=3000 BBNpri' Chain index : 8 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, kmx=1.0 BBNpri' Chain index : 9 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=1500 BBNpri' Chain index : 10 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=3000 BBNpri' Chain index : 11 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, kmx=1.0 BBNpri' Chain index : 12 ;; legend-label: 'WL w0waCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 13 ;; legend-label: 'WL w0waCDM model=HMc, data=Bacco, elmx=1500 BBNpri' Chain index : 14 ;; legend-label: 'WL w0waCDM model=EE2, data=Bacco, elmx=1500 BBNpri' Chain index : 15 ;; legend-label: 'WL w0waCDM model=Bacco, data=HMc, elmx=1500 BBNpri' Chain index : 16 ;; legend-label: 'WL w0waCDM model=Bacco, data=Bacco, elmx=1500 BBNpri' Chain index : 17 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 18 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=1500 NOpri' Chain index : 19 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri' Chain index : 20 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=3000 NOpri' Chain index : 21 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=750 BBNpri' Chain index : 22 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=750 NOpri' Chain index : 23 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, kmx=0.25 BBNpri' Chain index : 24 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri'
#paramlims = {'w': [-1.12, -0.87]}
#parstoplot = ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia','omegam', 'S8']
#full_fiducial, chains, labels, colors, paramlims = setup_chains_fiducials(chainfiles=chains_list, chain_idx=[1], colorlist=collist[::-1], fiducial=fiducial,
# derived_fiducial=derived_fiducial, paramlims=paramlims, labels_dict=labels_dict
#)
#samples, chainsdict = process_samples(chains, labels)
parstoplot = ['ombh2', 'logA', 'aia', 'nia']
chooseind = [21, 17, 19]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, True, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist,
stats_params=['logA', 'ombh2', 'aia', 'nia'],
fom_params=['logA', 'ombh2'])
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=750 BBNpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00037 logA = 3.0398\pm 0.0056 aia = 0.166^{+0.024}_{-0.030} nia = 1.60\pm 0.29 Reported logA-ombh2 FoM from covmat: 654361.003 Reported logA-ombh2 FoM from contour area: 656451.958 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00037 logA = 3.0399\pm 0.0052 aia = 0.164^{+0.020}_{-0.024} nia = 1.61\pm 0.25 Reported logA-ombh2 FoM from covmat: 993463.389 Reported logA-ombh2 FoM from contour area: 1005281.993 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl']
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
ombh2 = 0.02270\pm 0.00036 logA = 3.0400\pm 0.0051 aia = 0.164^{+0.019}_{-0.022} nia = 1.61\pm 0.24 Reported logA-ombh2 FoM from covmat: 1267697.202 Reported logA-ombh2 FoM from contour area: 1270342.581 S8 parameter could not be obtained
chooseind = [22, 18, 20]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, True, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist,
stats_params=['logA', 'ombh2', 'aia', 'nia'],
fom_params=['logA', 'ombh2'])
------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=750 NOpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.0226\pm 0.0019 logA = 3.039\pm 0.020 aia = 0.166^{+0.024}_{-0.030} nia = 1.60\pm 0.28 Reported logA-ombh2 FoM from covmat: 125858.515
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
Reported logA-ombh2 FoM from contour area: 126064.663 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500 NOpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.0227\pm 0.0013 logA = 3.039\pm 0.016 aia = 0.164^{+0.021}_{-0.025} nia = 1.61\pm 0.25 Reported logA-ombh2 FoM from covmat: 277018.905
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
Reported logA-ombh2 FoM from contour area: 275990.678 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=3000 NOpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02264\pm 0.00097 logA = 3.039\pm 0.013 aia = 0.164^{+0.019}_{-0.022} nia = 1.62\pm 0.23 Reported logA-ombh2 FoM from covmat: 459908.839 Reported logA-ombh2 FoM from contour area: 458545.839 S8 parameter could not be obtained
printchainslabs()
Chain index : 0 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 1 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri' Chain index : 2 ;; legend-label: 'WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri' Chain index : 3 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=1500 BBNpri' Chain index : 4 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=3000 BBNpri' Chain index : 5 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, kmx=1.0 BBNpri' Chain index : 6 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=1500 BBNpri' Chain index : 7 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=3000 BBNpri' Chain index : 8 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, kmx=1.0 BBNpri' Chain index : 9 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=1500 BBNpri' Chain index : 10 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=3000 BBNpri' Chain index : 11 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, kmx=1.0 BBNpri' Chain index : 12 ;; legend-label: 'WL w0waCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 13 ;; legend-label: 'WL w0waCDM model=HMc, data=Bacco, elmx=1500 BBNpri' Chain index : 14 ;; legend-label: 'WL w0waCDM model=EE2, data=Bacco, elmx=1500 BBNpri' Chain index : 15 ;; legend-label: 'WL w0waCDM model=Bacco, data=HMc, elmx=1500 BBNpri' Chain index : 16 ;; legend-label: 'WL w0waCDM model=Bacco, data=Bacco, elmx=1500 BBNpri' Chain index : 17 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri' Chain index : 18 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=1500 NOpri' Chain index : 19 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=3000 BBNpri' Chain index : 20 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=3000 NOpri' Chain index : 21 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=750 BBNpri' Chain index : 22 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, elmx=750 NOpri' Chain index : 23 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, kmx=0.25 BBNpri' Chain index : 24 ;; legend-label: 'sm-WL LCDM model=HMc, data=HMc, kmx=1.0 BBNpri'
chooseind = [17, 18]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, True, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist,
stats_params=['logA', 'ombh2', 'aia', 'nia'],
fom_params=['logA', 'ombh2'])
------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00037 logA = 3.0399\pm 0.0052 aia = 0.164^{+0.020}_{-0.024} nia = 1.61\pm 0.25 Reported logA-ombh2 FoM from covmat: 993463.389 Reported logA-ombh2 FoM from contour area: 1005281.993 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500 NOpri-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.0227\pm 0.0013 logA = 3.039\pm 0.016 aia = 0.164^{+0.021}_{-0.025} nia = 1.61\pm 0.25 Reported logA-ombh2 FoM from covmat: 277018.905 Reported logA-ombh2 FoM from contour area: 275990.678 S8 parameter could not be obtained
np.log10(chainsdict['sm-WL LCDM model=HMc, data=HMc, elmx=1500 BBNpri']['FoM_cov'])
2.6666398848246655
chooseind = [20, 21]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
#toplot_collist = [collist[ii] for ii in chooseind]
toplot_collist = [someguypalette[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, True, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
#chooseind = [17,18, 19, 20, 21]
chooseind = [19, 20]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
#toplot_collist = [collist[ii] for ii in chooseind]
toplot_collist = [someguypalette[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, False, False],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
#chooseind = [17,18, 19, 20, 21]
chooseind = [17, 21, 18]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
#toplot_collist = [collist[ii] for ii in chooseind]
toplot_collist = [someguypalette[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, False, False],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist, stats_params=['logA', 'ombh2'])
------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00037 logA = 3.0399\pm 0.0052 Reported logA-ombh2 FoM from covmat: 993463.389 Reported logA-ombh2 FoM from contour area: 1005281.993 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, kmx=1.0-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00036 logA = 3.0399\pm 0.0051 Reported logA-ombh2 FoM from covmat: 1217471.037 Reported logA-ombh2 FoM from contour area: 1217258.527 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=3000-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02270\pm 0.00036 logA = 3.0400\pm 0.0051 Reported logA-ombh2 FoM from covmat: 1267697.202 Reported logA-ombh2 FoM from contour area: 1270342.581 S8 parameter could not be obtained
#chooseind = [17,18, 19, 20, 21]
chooseind = [12, 0, 17]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
#toplot_collist = [collist[ii] for ii in chooseind]
toplot_collist = [someguypalette[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, False, False],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist, stats_params=['logA', 'ombh2'])
------------------------WORKING ON WL LCDM model=HMc, data=HMc, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02270\pm 0.00038 logA = 3.02\pm 0.12 Reported logA-ombh2 FoM from covmat: 22640.687 Reported logA-ombh2 FoM from contour area: 22493.842 S8 parameter could not be obtained ------------------------WORKING ON WL w0waCDM model=HMc, data=HMc, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00038 logA = 2.98^{+0.17}_{-0.15} Reported logA-ombh2 FoM from covmat: 16632.411 Reported logA-ombh2 FoM from contour area: 16532.265 S8 parameter could not be obtained ------------------------WORKING ON sm-WL LCDM model=HMc, data=HMc, elmx=1500-------------------- ['ombh2', 'logA', 'aia', 'nia', 'weights', 'loglkl'] ombh2 = 0.02269\pm 0.00037 logA = 3.0399\pm 0.0052 Reported logA-ombh2 FoM from covmat: 993463.389 Reported logA-ombh2 FoM from contour area: 1005281.993 S8 parameter could not be obtained
chooseind = [6, 7, 8]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, True, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
chooseind = [0, 3, 6, 9]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, False, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
chooseind = [1, 4, 7, 10]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, False, False, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
WARNING:root:fine_bins not large enough to well sample smoothing scale - weights
parstoplot = ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia']
chooseind = [12, 0]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
paramlims
paramlims = {'w': [-1.5, -0.5],
'wa' : [-1, 2]}
parstoplot = ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia']
chooseind = [16, 13, 14]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, True],
'contour_args' : [{'lw':4, 'ls':'--'}, {'lw':3, 'ls':'-'}],
'contour_ls' : ['-', '-', '-', '-']
}
)
printchainslabs()
Chain index : 0 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=1500' Chain index : 1 ;; legend-label: 'WL LCDM model=HMc, data=HMc, elmx=3000' Chain index : 2 ;; legend-label: 'WL LCDM model=HMc, data=HMc, kmx=1' Chain index : 3 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=1500' Chain index : 4 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, elmx=3000' Chain index : 5 ;; legend-label: 'WL LCDM model=HMc, data=Bacco, kmx=1' Chain index : 6 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=1500' Chain index : 7 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, elmx=3000' Chain index : 8 ;; legend-label: 'WL LCDM model=EE2, data=Bacco, kmx=1' Chain index : 9 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=1500' Chain index : 10 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, elmx=3000' Chain index : 11 ;; legend-label: 'WL LCDM model=Bacco, data=Bacco, kmx=1' Chain index : 12 ;; legend-label: 'WL w0waCDM model=HMc, data=HMc, elmx=1500' Chain index : 13 ;; legend-label: 'WL w0waCDM model=HMc, data=Bacco, elmx=1500' Chain index : 14 ;; legend-label: 'WL w0waCDM model=EE2, data=Bacco, elmx=1500' Chain index : 15 ;; legend-label: 'WL w0waCDM model=Bacco, data=HMc, elmx=1500' Chain index : 16 ;; legend-label: 'WL w0waCDM model=Bacco, data=Bacco, elmx=1500'
paramlims
paramlims = {'w': [-1.5, -0.5],
'wa' : [-2, 2]}
collist
parstoplot = ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia']
chooseind = [12, 13, 15, 16]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, True],
'contour_args' : [{'lw':4, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'--', 'alpha':0.6}
],
'contour_ls' : ['-', '-', '-', '--']
}
)
parstoplot = ['w', 'wa', 'logA', 'aia']
chooseind = [12, 13, 15, 16]
toplot_nautChains = [nautChains[ii] for ii in chooseind]
toplot_chainsLabels = [chainsLabels[ii] for ii in chooseind]
toplot_collist = [collist[ii] for ii in chooseind]
toplot_chainsLabels
gplot = plot_contours(toplot_nautChains, parstoplot, toplot_chainsLabels,
colors=toplot_collist,
param_limits=paramlims, markers_dict=fiducial,
options_dict={
'filled': [False, True, False, True],
'contour_args' : [{'lw':4, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'-', 'alpha':0.9},
{'lw':3, 'ls':'--', 'alpha':0.6}
],
'contour_ls' : ['-', '-', '-', '--']
}
)
toplot_nautChains
[<getdist.mcsamples.MCSamples at 0x7f23bfed0e20>, <getdist.mcsamples.MCSamples at 0x7f23bfed0f40>, <getdist.mcsamples.MCSamples at 0x7f23bfed0400>, <getdist.mcsamples.MCSamples at 0x7f23bffd39d0>]
toplot_chainsLabels
['WL w0waCDM model=HMc, data=HMc, elmx=1500', 'WL w0waCDM model=HMc, data=Bacco, elmx=1500', 'WL w0waCDM model=Bacco, data=HMc, elmx=1500', 'WL w0waCDM model=Bacco, data=Bacco, elmx=1500']
chainsdict = justprocess_samples(toplot_nautChains, toplot_chainsLabels, colors=collist, stats_params=['w', 'wa'])
------------------------WORKING ON WL w0waCDM model=HMc, data=HMc, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia', 'weights', 'loglkl'] w = -1.01^{+0.18}_{-0.21} wa = 0.096^{+0.73}_{-0.49} Reported w0-wa FoM from covmat: 19.219 Reported w0-wa FoM from contour area: 19.530 S8 parameter could not be obtained ------------------------WORKING ON WL w0waCDM model=HMc, data=Bacco, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia', 'weights', 'loglkl'] w = -1.10^{+0.14}_{-0.16} wa = 0.65^{+0.47}_{-0.26} Reported w0-wa FoM from covmat: 35.124 Reported w0-wa FoM from contour area: 39.197 S8 parameter could not be obtained ------------------------WORKING ON WL w0waCDM model=Bacco, data=HMc, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia', 'weights', 'loglkl'] w = -1.01^{+0.18}_{-0.26} wa = 0.06^{+0.92}_{-0.73} Reported w0-wa FoM from covmat: 15.087 Reported w0-wa FoM from contour area: 26.614 S8 parameter could not be obtained ------------------------WORKING ON WL w0waCDM model=Bacco, data=Bacco, elmx=1500-------------------- ['ombh2', 'omch2', 'H0', 'ns', 'logA', 'w', 'wa', 'aia', 'nia', 'weights', 'loglkl'] w = -1.06\pm 0.14 wa = 0.40\pm 0.45 Reported w0-wa FoM from covmat: 28.096 Reported w0-wa FoM from contour area: 31.734 S8 parameter could not be obtained