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

astropy methods for cosmology class #422

Closed
fbeutler opened this Issue Oct 8, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@fbeutler

fbeutler commented Oct 8, 2017

I am trying to calculate the Hubble parameter with the cosmology class, but it does not seem to exist? The angular diameter distance works file

print("cosmo.H(0.5) = ", cosmo.H(0.5))

File "/Users/xflorian/anaconda/envs/nbodykit-env/lib/python3.6/site-packages/nbodykit/cosmology/cosmology.py", line 221, in getattr
raise AttributeError("Attribute %s not found in any of the delegate objects" % name)
AttributeError: Attribute H not found in any of the delegate objects

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Oct 8, 2017

Most of the astropy methods are removed as we change to CLASS set of function names:

In [3]: from nbodykit.cosmology import Planck15

In [4]: Planck15.hubble_function?
Docstring:
Background.hubble_function(self, z)

The Hubble function in CLASS units. Users should use :func:`efunc`
instead.
Type:      builtin_function_or_method

Tab-completion shows these names but currently they are not in the documentation of classylss or nbodykit, unfortunately.

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Oct 8, 2017

Also, as noted in the docstring, you probably want to use Planck15.efunc and multiply with Planck15.H0 (in Mpc/h units) instead.

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Oct 8, 2017

Temporary documentation of the available methods is listed at https://rainwoodman.github.io/classylss/classylss.binding.html

@fbeutler

This comment has been minimized.

fbeutler commented Oct 8, 2017

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment