chain not found

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
Gansukh Tumurtushaa
Posts: 34
Joined: October 05 2013
Affiliation: Sogang univ.

chain not found

Post by Gansukh Tumurtushaa » June 05 2015

Dear members,

I am bit confused with the roots directory of the following python script.

Code: Select all

import planckStyle as s
from pylab import *

g=s.getSinglePlotter()

#g.settings.param_names_for_labels = 'clik_units_for_w_wa.paramnames'
roots = ['base_w_wa_planck_lowl_lowLike_BAO']

params = g.get_param_array(roots[0], ['w','wa'])


g.plot_2d(roots, param_pair=params, filled=True,lims=[-2, -0.3 , -1.6, 2])


#g.add_2d_contours(roots[0], params[0], params[1], filled=False, color='#ff0000')
#g.add_2d_contours(roots[2], params[0], params[1], plotno=1,filled=True,color='#00ff00' )
#g.add_2d_contours(roots[1], params[0], params[1], plotno=2,filled=True,color='#0000ff' )

g.add_x_marker(-1)
g.add_y_marker(0)

text(-1.9, -.7, s.WP+'+BAO', color='#606060',fontsize=8)
text(-1.9, -1.0, s.WP+'+Union2.1', color='#dd0000',fontsize=8)
text(-1.9, -1.3, s.WP+'+SNLS', color='#0000dd',fontsize=8)


g.export('plots/w_wa.pdf')
because when I compile it, it ends up with

Code: Select all

Traceback (most recent call last):
  File "batch1/outputs/w_wa.py", line 10, in <module>
    params = g.get_param_array&#40;roots&#91;0&#93;, &#91;'w','wa'&#93;&#41;
  File "/home/gansuh/cosmomc_Feb15/python/GetDistPlots.py", line 769, in get_param_array
    return self.paramNamesForRoot&#40;root&#41;.parsWithNames&#40;in_params, error=True, renames=renames&#41;
  File "/home/gansuh/cosmomc_Feb15/python/GetDistPlots.py", line 479, in paramNamesForRoot
    if not root in self.param_name_sets&#58; self.param_name_sets&#91;root&#93; = self.sampleAnalyser.paramsForRoot&#40;root, labelParams=self.settings.param_names_for_labels&#41;
  File "/home/gansuh/cosmomc_Feb15/python/GetDistPlots.py", line 381, in paramsForRoot
    samples = self.samplesForRoot&#40;root&#41;
  File "/home/gansuh/cosmomc_Feb15/python/GetDistPlots.py", line 285, in samplesForRoot
    if not jobItem&#58; raise Exception&#40;'chain not found&#58; ' + root&#41;
Exception&#58; chain not found&#58; base_w_wa_planck_lowl_lowLike_BAO
I think the exception above is quite trivial because I use PLA2015 chain and there was no such "base_w_wa_planck_lowl_lowLike_BAO" chain in it.
So I copied whole "planck_lowl_lowLike_BAO" folder from PLA2013 chain into PLA2015 base directory and compiled again but I still end up with same result as above. What should I do in this case, any suggestions?

Thing is that my PLA2013 chain is not linked to my cosmomc directory yet that is why I copied whole folder. Also I do not know how to use PLA2013 chain with PLA2015 chain.

Is it possible to link both 2013 and 2015 PLA chain to cosmomc directory at the same time? if yes, how? so that I do not need to copy files any more... or how do you use both 2013 and 2013 Planck data in your research?

Thank you.

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

Re: chain not found

Post by Antony Lewis » June 05 2015

You can't just copy files between different grids, as they won't show up if they are not part of the grid specification.

You can however access files in any number of directories, so instead of the default you can do e.g.

Code: Select all

g=s.getSinglePlotter&#40;chain_dir=&#91;'PLA13/base_w_wa/planck_lowl_lowLike_BAO/', 'PLA15/base_w_wa/plikHM_TT_lowTEB_BAO/'&#93;&#41;
There's also a script python/addGridBatch.py, which can be used to link two grids together (so then if you added 2013 to 2015, the defaults should then also find 2013 chains). You may need to manually run makeGrid.py on the 2013 directory first.

Post Reply