read_phantom() creates a mass key in params to store the global mass of a particle, thereby avoiding storage of duplicated mass values per particle. This doesn't work when a dataframe contains more than 1 species of particles that have different particle masses (e.g., gas + dust).
This PR fixes/changes a few things:
read_phantom() will create a mass column if more than 1 particle species is present (multiple itype). If there is a single particle species, such as gas only, then it relies on the global variable mass in params instead, as it has done before. This should fix issue #62.
read_phantom() has reliable detection of 32/64-bit precision for default ints and floats. Previously, this might fail to detect 64-bit ints.
There are now unit tests of the phantom data reads.
read_phantom()
creates amass
key inparams
to store the global mass of a particle, thereby avoiding storage of duplicated mass values per particle. This doesn't work when a dataframe contains more than 1 species of particles that have different particle masses (e.g., gas + dust).This PR fixes/changes a few things:
read_phantom()
will create amass
column if more than 1 particle species is present (multipleitype
). If there is a single particle species, such as gas only, then it relies on the global variablemass
inparams
instead, as it has done before. This should fix issue #62.read_phantom()
has reliable detection of 32/64-bit precision for default ints and floats. Previously, this might fail to detect 64-bit ints.