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

Default cosmology #4

Open
SzymonPrajs opened this issue Mar 8, 2016 · 1 comment
Open

Default cosmology #4

SzymonPrajs opened this issue Mar 8, 2016 · 1 comment

Comments

@SzymonPrajs
Copy link

Just wondering if the default cosmology shouldn't be updated to the Planck '15 values?

Also, is there some way of passing a name of the result, similar to Astropy, which would set all defaults. Something along the lines of Cosmology(results="WMAP9") rather than having to set the values manually?

@kbarbary
Copy link
Member

kbarbary commented Mar 8, 2016

Would probably be better to define constants corresponding to various results. e.g.,

const WMAP9 = cosmology(h=0.69, Neff=3.04, ...)
const Planck15 = cosmology(h=..., Neff=..., ...)

The only issue is that experiments report multiple sets of parameters, depending on assumptions. e.g., the best fit parameters assuming Lambda CDM, the best fit assuming wCDM, assuming flat, assuming w0-wa, etc. What does astropy do here?

One solution would be to define a type for each result and use dispatch. This would be an alternative to the const approach above.

abstract CosmologyResult
type WMAP9 <: CosmologyResult end

FlatLCDM(::Type{WMAP9}) = FlatLCDM(...[best fit parameters]...)
FlatWCDM(::Type{WMAP9}) = FlatWCDM(...[best fit parameters]...)
...

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

2 participants