I have some compiling issues with MontePython (+ hi_class) whenever I try to use either Planck or Supernova (both JLA or Pantheon) data. Both MontePython and hi_class have "successfully" installed on my macOS. I am saying successful because I have no problem with running and reproducing exercises provided on their respective webpage if I use BAO data or some given data (and likelihoods) that comes with MontePython installation.
The problem occurs only when using Planck or JLA (and Pantheon) data.
Without further due, let me quickly lead you to how I compile into something I could not figure the way out.
First, in the MontePython directory, my "default.conf" file looks like:
Code: Select all
root = '/Users/kosmos'
#path['cosmo'] = root+'/Documents/class_public/'
path['cosmo'] = root+'/hi_class_public/'
path['clik'] = root+'/montepython_public_3.2dev_Python3/planck/code/plc_3.0/plc-3.01/'
path['JLA'] = root+'/montepython_public_3.2dev_Python3/data/JLA/'
path['Pantheon'] = root+'/montepython_public_3.2dev_Python3/data/Pantheon/'
Code: Select all
montepython_public_3.2dev_Python3 kosmos$ ls data/JLA/
JLA.paramnames jla.dataset jla_mub.txt~ jla_simple.dataset~ jla_v0b_covmatrix.dat jla_vb_covmatrix.dat
LICENSE.txt jla_lcparams.txt jla_mub_covmatrix.dat jla_v0_covmatrix.dat jla_va_covmatrix.dat makefile
ReadMe.txt jla_mub.txt jla_simple.dataset jla_v0a_covmatrix.dat jla_vab_covmatrix.dat
montepython_public_3.2dev_Python3 kosmos$
Code: Select all
data.experiments=['JLA']
data.parameters['Omega_cdm'] = [0.2562, None, None, 0.008, 1, 'cosmo']
data.parameters['alpha'] = [0.15, None, None, 0.001, 1, 'nuisance']
data.parameters['beta'] = [3.559, None, None, 0.02, 1, 'nuisance']
data.parameters['M'] = [-19.02, None, None, 0.004, 1, 'nuisance']
data.parameters['Delta_M'] = [-0.10, None, None, 0.004, 1, 'nuisance']
data.parameters['Omega_m'] = [0, -1, -1, 0, 1, 'derived']
data.cosmo_arguments['Omega_b'] = 0.048
data.cosmo_arguments['h'] = 0.68
data.cosmo_arguments['T_cmb'] = 2.726
data.cosmo_arguments['N_eff'] = 3.046
data.cosmo_arguments['N_ncdm'] = 0
data.N=10
data.write_step=5
Code: Select all
$ mpirun -np 4 python montepython/MontePython.py run -p input/my_JLA.param -o my_JLA/ -N 1000
Code: Select all
Running Monte Python v3.2.0
with CLASS v2.7.2
/!\ Detecting empty folder, logging the parameter file
Testing likelihoods for:
->
JLA
Traceback (most recent call last):
File "montepython/MontePython.py", line 38, in <module>
sys.exit(mpi_run())
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/run.py", line 101, in mpi_run
custom_command, comm, nprocs)
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/run.py", line 191, in safe_initialisation
cosmo, data, command_line, success = initialise(custom_command)
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/initialise.py", line 66, in initialise
data = Data(command_line, path)
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/data.py", line 363, in __init__
self.initialise_likelihoods(self.experiments)
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/data.py", line 492, in initialise_likelihoods
elem, elem, folder, elem))
File "<string>", line 1, in <module>
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/likelihoods/JLA/__init__.py", line 64, in __init__
self.C00 = self.read_matrix(self.mag_covmat_file)
File "/Users/kosmos/montepython_public_3.2dev_Python3/montepython/likelihood_class.py", line 2472, in read_matrix
matrix = read_table(path).as_matrix().reshape((length, length))
File "/opt/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5274, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'as_matrix'
I somehow feel (deep down in my hearth) that this is not a serious issue. Therefore, a solution might be simple but I do not get it.
Can anyone help me with this? Thank you in advance.