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

Different parameter values in metadata.cosmology and metadata.cosmology_raw #151

Closed JegerBroxterman closed 1 year ago

JegerBroxterman commented 1 year ago

I am finding inconsistencies in the snapshot cosmological parameter values when calling them from different places. metadata.cosmolgy_raw provides the correct input parameter values (e.g. 'T_CMB_0 [K]': array([2.7255]), 'M_nu_eV': array([0.06])) whereas metadata.cosmology gives wrong values for these quantities (Tcmb0=2.997 K and m_nu=[0. 0. 0.] eV). The other parameter values seem to be correct. Possibly an issue with morphing the cosmology information correctly into an astropy.cosmology object?

MatthieuSchaller commented 1 year ago

My suspicion: The astropy object we use may not be generalized enough for the runs we have (here FLAMINGO).

JBorrow commented 1 year ago

Yeah I don't think we pass in the neutrino values as they didn't exist when I wrote the original code. Astropy does have the functionality to deal with this though.

MatthieuSchaller commented 1 year ago

Key thing: check whether this is leading to issues down the line: e.g. SOAP or other pipeline tools.

MatthieuSchaller commented 1 year ago

This is a critical bug. We have more and more people using swiftsimio on the flamingo snapshots for cosmology purposes.

The code involved here is beyond my poor python knowledge however. But if nobody else has time to do it, I'll try to investigate.

MatthieuSchaller commented 1 year ago

Is this fixed or are there still on-going investigations?

JBorrow commented 1 year ago

The fix needs to be implemented fully, I think.