SWIFTSIM / swiftsimio

Python library for reading SWIFT data. Uses unyt and h5py.
GNU Lesser General Public License v3.0
15 stars 12 forks source link

Add warning when the cosmology can't be represented correctly? #183

Closed MatthieuSchaller closed 1 week ago

MatthieuSchaller commented 4 months ago

We currently rely on astropy cosmology but this is not general enough to handle the default flamingo/colibre cosmologies. Should we add a warning when we load anything that is not a flat neutrino-free LCDM model?

kyleaoman commented 1 month ago

Why isn't it general enough? The astropy FLRW class can handle arbitrary non-flat cosmologies with massive neutrinos, which seems like it should be enough. https://docs.astropy.org/en/stable/api/astropy.cosmology.FLRW.html#astropy.cosmology.FLRW

kyleaoman commented 1 month ago

Also time-varying DE cosmologies: https://docs.astropy.org/en/stable/cosmology/ref_api.html

MatthieuSchaller commented 1 month ago

mmmh has this changed astropy-side recently? I recall issues at least at the start of flamingo with the neutrino side of things. Might be mute now.

kyleaoman commented 1 month ago

As far as I remember it's been like this for a long time - quick look at astropy history suggests massive neutrinos were in the initial cosmology module in 2015.

MatthieuSchaller commented 1 month ago

Then I am wrong about it and have been for a long time.