I need to convert a simple text file where each row corresponds to an accepted proposal of 9 parameters values.
I have 3703 rows of each one consisted of 9 values (I put this file in attachment) and I would like to convert it in order to
be able to plot with g.triangle_plot function.
I tried with a simple example where I have the chain file " final_array.txt ".
At the simple execution of this small script " plot_chains.py " :
Code: Select all
#!/opt/intel/oneapi/intelpython/latest/bin/python
import matplotlib as plt
from getdist import plots, loadMCSamples
BD_samples = loadMCSamples("/Users/fab/final_array.txt")
g = plots.get_subplot_plotter(width_inch=8)
g.triangle_plot(BD_samples)
g.export("./chains_final.pdf")
I get the following error :
Code: Select all
Traceback (most recent call last):
File "/Users/fab/plot_chains.py", line 24, in <module>
BD_samples = loadMCSamples("/Users/fab/final_array.txt")
File "/opt/intel/oneapi/intelpython/latest/lib/python3.9/site-packages/getdist/mcsamples.py", line 100, in loadMCSamples
raise IOError('No chains found: ' + file_root)
OSError: No chains found: /Users/fab/final_array.txt
I think that must add more informations on this chains file but don't know for the moment.
Any help is welcome, I remind this chains file " final_array.txt " is attached (just under .gz format, so you can do a :
Code: Select all
$ gunzip final_array.txt.gz