cosmoMC : prefix of file root for loadMCSamples

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Dournac Fabien
Posts: 72
Joined: May 18 2019
Affiliation: IRAP
Contact:

cosmoMC : prefix of file root for loadMCSamples

Post by Dournac Fabien » February 19 2022

Hello,

I try to load a sample (actually using MPI) with the following output :
chains_des_curvature/des_omegak_28.txt chains_des_curvature/des_omegak_22.txt
chains_des_curvature/des_omegak_14.txt chains_des_curvature/des_omegak_17.txt
chains_des_curvature/des_omegak_19.txt chains_des_curvature/des_omegak_16.txt
chains_des_curvature/des_omegak_25.txt chains_des_curvature/des_omegak_7.txt
chains_des_curvature/des_omegak_9.txt chains_des_curvature/des_omegak_2.txt
chains_des_curvature/des_omegak_1.txt chains_des_curvature/des_omegak_10.txt
chains_des_curvature/des_omegak_4.txt chains_des_curvature/des_omegak_15.txt
chains_des_curvature/des_omegak_31.txt chains_des_curvature/des_omegak_30.txt
chains_des_curvature/des_omegak_21.txt chains_des_curvature/des_omegak_23.txt
chains_des_curvature/des_omegak_6.txt chains_des_curvature/des_omegak_11.txt
chains_des_curvature/des_omegak_3.txt chains_des_curvature/des_omegak_13.txt
chains_des_curvature/des_omegak_8.txt chains_des_curvature/des_omegak_29.txt
chains_des_curvature/des_omegak_12.txt chains_des_curvature/des_omegak_32.txt
chains_des_curvature/des_omegak_5.txt chains_des_curvature/des_omegak_27.txt
chains_des_curvature/des_omegak_26.txt chains_des_curvature/des_omegak_18.txt
chains_des_curvature/des_omegak_24.txt chains_des_curvature/des_omegak_20.txt
For this, I scripted :

Code: Select all


# Imports
from getdist import plots, loadMCSamples

# Load the chains
PATH = './chains_des_curvature'
samples = loadMCSamples(PATH)

# Generate a triangle plot
g = plots.get_subplot_plotter()
g.triangle_plot(samples, ['omegam', 'omegak'], filled=True)
g.export("./plot_des_curvature.pdf")
and I get the following error :
Traceback (most recent call last):
File "getdist_des_curvature.py", line 8, in <module>
samples = loadMCSamples(PATH)
File "/opt/intel/oneapi/intelpython/python3.7/lib/python3.7/site-packages/GetDist-1.3.3-py3.7.egg/getdist/mcsamples.py", line 100, in loadMCSamples
raise IOError('No chains found: ' + file_root)
OSError: No chains found: ./chains_des_curvature

I can't manage to specify the prefix of output files under the form "des_omegak_*.txt".

How could I fix this ?

Best regards

Antony Lewis
Posts: 1842
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: cosmoMC : prefix of file root for loadMCSamples

Post by Antony Lewis » February 20 2022

loadMCSamples loads one set of chain files, not an entire folder. The root name for your chain is

Code: Select all

chains_des_curvature/des_omegak

Post Reply