Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example sampler #29

Open
humnaawan opened this issue Sep 23, 2019 · 0 comments
Open

Example sampler #29

humnaawan opened this issue Sep 23, 2019 · 0 comments

Comments

@humnaawan
Copy link
Contributor

Hi, so in my effort to get LSSLike to work, I am trying to get the example emcee sampler code to work. When I just try to read in the sim_sample/sims/sim_mean.sacc file, I get an error saying KeyError: "Unable to open object (object 'meta' doesn't exist)", which I assume is arising from a SACC incompatibility.

I then attempted to recreate the sims files using mk_sims.py. After a bit of work, I got it to create a sim_mean.sacc file (though not the rest of them .. yet). While I am able to read the new file, CCL throws an error saying

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-54-7e2c81c37fa2> in <module>
      6 p0[i_b2] = 1.0
      7 p0[i_b3] = 1.0
----> 8 print("This should be a small number: %lE"%(logprob(p0,lk)))

<ipython-input-51-740aec220aed> in logprob(p, lk)
     12                             p[i_b0],p[i_b1],p[i_b2],p[i_b3],
     13                             1.0]})
---> 14     cls=lt.get_prediction(dic)
     15     return lk(cls)

~/LSST/lsstRepos/LSSLike/desclss/lss_theory.py in get_prediction(self, dic_par)
     74         theory_out=np.zeros((self.s.size(),))
     75         cosmo=self.get_cosmo(dic_par)
---> 76         tr=self.get_tracers(cosmo,dic_par)
     77         for i1,i2,_,ells,ndx in self.s.sortTracers() :
     78             cls=ccl.angular_cl(cosmo,tr[i1],tr[i2],ells)

~/LSST/lsstRepos/LSSLike/desclss/lss_theory.py in get_tracers(self, cosmo, dic_par)
     33                                                        z = thistracer.z, n=(zbins, thistracer.Nz), bias = (z_b_arr, b_b_arr)))
     34             else :
---> 35                 raise ValueError("Only \"point\" tracers supported")
     36         return tr_out
     37 

ValueError: Only "point" tracers supported

I'd appreciate some insight into whats going wrong. At this point, I am basically trying to get a SACC object that actually works with LSSLike, and then I can proceed with creating the objects for my own analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant