Repository navigation
parameters specify their cosmology - #11530
Conversation
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
| par = getattr(parameters, key) | ||
| if par["flat"]: | ||
|
|
||
| if par["cosmology"] == "FlatLambdaCDM": |
There was a problem hiding this comment.
Sure! ... of what sort? like that all our built-in ones are "FlatLambdaCDM"? I think there's currently an implicit test because the suite should fail on the raised warning if cosmology != FlatLambdaCDM.
There was a problem hiding this comment.
Just a little surprised that this change didn't result in any test updates.
There was a problem hiding this comment.
Ahh. currently all of them are FlatLambdaCDM and the code was doing a sanity check with the parameter "flat". Specifying the cosmology obviates that need.
Here, or in a followup, I would like to do a consistency check on ALL the key-value pairs in the parameter dictionary, because not everything is being used. That would be a good place to check that for cosmology=FlatLambdaCDM, flat is either True or not present (because not needed).
There was a problem hiding this comment.
I do think a test is good... I just don't know what I would test ATM! 😆
|
(I won't merge to give @adrn a chance to have a quick look, but really this just makes sense.) |
Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
993ff56 to
4dc2cb3
Compare
Description
Rather than assuming that the parameters are for a FlatLamdaCDM cosmology, they now specify the cosmology. This is needed for the planned functions to I/O cosmologies from/to JSON and ECSV files.
Part of #10673
Needed for #11517, #11542