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

Continuation of Cosmology clone (#383) #386

Merged
merged 25 commits into from Sep 7, 2017

Conversation

Projects
None yet
2 participants
@nickhand
Member

nickhand commented Aug 31, 2017

No description provided.

rainwoodman and others added some commits Aug 30, 2017

Immutable Cosmology
- make Cosmology object immutable.
- add match() to modify sigma8 and possible other similar derived parameters

- reworked the relation between clone, from_file, __init__ and __setstate__.
- `pars` is for Class Parameters. `args` is for Cosmology input arguments.
- `pars` is also a valid `args`
- the state of the object is fully specified by `pars`.
- compile_args (old verify_parameters) compiles args to pars, so we move
  it upward convert args when needed.
- merge_args (old sanity_cosmo_parameters) merges two args such that those
  provided later overrides the earlier.

@nickhand nickhand referenced this pull request Aug 31, 2017

Merged

Cosmology clone #383

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

This is all clear now and I think includes all of the desired fixes from the original PR @rainwoodman

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 1, 2017

What about adding an match(Omega_cb=?)

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

What is Omega_cb?

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 1, 2017

Like Omega_m in Astropy; match can adjust Omega_cdm, Omega_b, and Omega_lambda to match a given Omega_cb if Omega_k was zero?

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

Ah, I see what you mean...do you like Omega_nr, as in non-relativistic at all times, any better?

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

Is it worth it to explore matching Onu? The result of the to_astropy() function has some discrepancies due to differences in the neutrino definitions. I had a quick look and it seemed like it would be difficult to match properly

rainwoodman added some commits Sep 1, 2017

Accept and prefer Omega0_x for clarity.
Omega_x is a function of the cosmology object,
and these parameters are accessible as Omega0_x later.

Omega_x is still supported as direct 'CLASS' parameters.
(we compile Omega0_x to Omega_x anyways)
@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 1, 2017

Isn't Omega_nr just Omega_m ?

The time dependency of Onu is different, so it is impossible to match them..

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

I guess I think of Omega_nr as only CDM + baryons, the species that are always cold, whereas Omega_m has the non-CDM too...

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 1, 2017

A portion of the ncdm distribution function is nr too, so...

rainwoodman added some commits Sep 1, 2017

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

Yep I agree. I was just trying to think of a better name. This looks good though

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 1, 2017

It might be worth it to include deprecated support for the past Cosmology() signature. I am realizing that past Cosmology() inits are broken now

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 2, 2017

This should be all green now once we tag a new classylss version. @rainwoodman let me know what you think of the deprecated init handling. I think the only downside is we lose the function signature for Python 2 users

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 2, 2017

It feels like AstropyCompat shall be moved to nbodykit too.

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 5, 2017

Shall we go ahead with a new classylss tag?

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 6, 2017

Yes, I'll tag a new classylss version now. Let's leave AstroCompat where it is for now

@nickhand

This comment has been minimized.

Member

nickhand commented Sep 7, 2017

Shall we merge this @rainwoodman? I have a couple of other PRs to put in and then we can tag a new release I think.

@rainwoodman

This comment has been minimized.

Member

rainwoodman commented Sep 7, 2017

Sure!

@nickhand nickhand merged commit cd84427 into master Sep 7, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.05%) to 95.397%
Details

@nickhand nickhand deleted the cosmology-clone branch Sep 7, 2017

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