with np.load('valores_medios_LCDM_AGN_5params_nuisance_less_z.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_LCDM_AGN_5params_nuisance_less_z.h5"

reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['omega_m','beta','gamma','delta'])
 #%%
#burnin=1500
#thin=50
graficar_contornos(reader,params_truths=sol,discard=burnin,thin=thin,
                    labels = ['omega_m','beta','gamma','delta'])
#%%
#Ojo, siempre muestra que convergio, aun cuando no
#plt.figure()
#graficar_taus_vs_n(reader,num_param=0,threshold=1000)
#graficar_taus_vs_n(reader,num_param=1,threshold=1000)
#%% Printeo los valores!
#thin=1
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['omega_m','beta','gamma','delta']
示例#2
0
os.chdir(path_git+'/Software/Estadística/Resultados_simulaciones/')
with np.load('valores_medios_HS_CC+SN_3params_M_fijo.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_HS_CC+SN_3params_M_fijo.h5"
reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['$\Omega_{m}$','b',"H0"],title='SN+CC+H0 HS (Taylor)')
#%%
burnin=300
#burnin = int(2 * np.max(tau))
#thin = int(0.5 * np.min(tau))
graficar_contornos(reader,params_truths=sol,discard=burnin,#thin=thin,
                    labels= ['$\Omega_{m}$','b',"H0"],
                    #title='SN+CC+H0',
                    #title='SN+CC',
                    #poster=True,color='r',
                    )
#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True,thin=thin)
labels = ['\Omega_{m}','b', 'H_{0}']
len_chain,nwalkers,ndim=reader.get_chain().shape
示例#3
0
with np.load('valores_medios_HS_BAO_3params_taylor.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas/LDCM')
filename = "sample_HS_BAO_3params_taylor.h5"

reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['omega_m','b','H0'])
#%%
burnin=50
graficar_contornos(reader,params_truths=sol,discard=burnin,#thin=thin,
                    labels = ['omega_m','b','H0'])
#%%
#Ojo, siempre muestra que convergio, aun cuando no
plt.figure()
graficar_taus_vs_n(reader,num_param=0,threshold=1000)
graficar_taus_vs_n(reader,num_param=1,threshold=1000)
#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['omega_m','b','H0']
len_chain,nwalkers,ndim=reader.get_chain().shape
print(len_chain)
示例#4
0
from funciones_analisis_cadenas import graficar_cadenas,graficar_contornos,graficar_taus_vs_n
#%%
os.chdir(path_git+'/Software/Estadística/Resultados_simulaciones/')
with np.load('valores_medios_supernovas_3params_taylor.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_HS_supernovas_3params_taylor.h5"
reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['M_abs','omega_m','b'])
#%%
burnin=300
#burnin = int(2 * np.max(tau))
#thin = int(0.5 * np.min(tau))
graficar_contornos(reader,params_truths=sol,discard=burnin,#thin=thin
                    labels= ['M_abs','omega_m','b'])
#%%
plt.figure()
graficar_taus_vs_n(reader,num_param=0)
graficar_taus_vs_n(reader,num_param=1)
graficar_taus_vs_n(reader,num_param=2)
示例#5
0
os.chdir(path_git+'/Software/Estadística/Resultados_simulaciones/')
with np.load('valores_medios_HS_SN_4params.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_HS_SN_4params.h5"
reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['$M_{abs}$','$alpha$','$beta$','$\gamma$'],title='SN HS')
#%%
burnin=100
#burnin = int(2 * np.max(tau))
#thin = int(0.5 * np.min(tau))
graficar_contornos(reader,params_truths=sol,discard=burnin,
                    #thin=thin,
                    labels = ['$M_{abs}$','$alpha$','$beta$','$\gamma$'],
                    #title='SN+CC HS',
                    poster=False)


#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['M_{abs}','$alpha$','$beta$','$\gamma$']
os.chdir(path_git+'/Software/Estadística/Resultados_simulaciones/')
with np.load('valores_medios_HS_CC+SN_3params_taylor.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_HS_CC+SN_3params_taylor.h5"
reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['$M_{abs}$','$\Omega_{m}$','b'],title='SN+CC HS (Taylor)')
#%%
#burnin=300
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
graficar_contornos(reader,params_truths=sol,discard=burnin,
                    #,thin=thin
                    labels= ['$M_{abs}$','$\Omega_{m}$','b']
                    #,title='SN+CC HS (Taylor)'
                    ,poster=True)


#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['M_{abs}','\Omega_{m}','b']
示例#7
0
os.chdir(path_git+'/Software/Estadística/Resultados_simulaciones/')
with np.load('valores_medios_HS_CC+SN_4params.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas')
filename = "sample_HS_CC+SN_4params.h5"
reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['$M_{abs}$','$\Omega_{m}$','b','\H_{0}'],title='SN+CC HS')
#%%
#burnin=300
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
graficar_contornos(reader,params_truths=sol,discard=burnin,
                    #,thin=thin
                    labels= ['$M_{abs}$','$\Omega_{m}$','b','\H_{0}']
                    #,title='SN+CC HS'
                    ,poster=True)


#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['M_{abs}','\Omega_{m}','b','\H_{0}']
with np.load('valores_medios_HS_BAO_2params_taylor.npz') as data:
    sol = data['sol']
#%%
os.chdir(path_datos_global+'/Resultados_cadenas/LDCM')
filename = "sample_HS_BAO_2params_taylor.h5"

reader = emcee.backends.HDFBackend(filename)
# Algunos valores
tau = reader.get_autocorr_time()
burnin = int(2 * np.max(tau))
thin = int(0.5 * np.min(tau))
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
print(tau)
#%%
%matplotlib qt5
graficar_cadenas(reader,
                labels = ['$\Omega_{m}$','b'],title='BAO HS (Taylor)')
#%%
burnin=100
graficar_contornos(reader,params_truths=sol,discard=burnin,#thin=thin,
                    labels = ['$\Omega_{m}$','b'],title='BAO HS (Taylor)')
#%%
#Ojo, siempre muestra que convergio, aun cuando no
plt.figure()
graficar_taus_vs_n(reader,num_param=0,threshold=1000)
graficar_taus_vs_n(reader,num_param=1,threshold=1000)
#%% Printeo los valores!
from IPython.display import display, Math
samples = reader.get_chain(discard=burnin, flat=True, thin=thin)
labels = ['omega_m','b']
len_chain,nwalkers,ndim=reader.get_chain().shape
print(len_chain)