ttricco / sarracen

A Python library for smoothed particle hydrodynamics (SPH) analysis and visualization.
https://sarracen.readthedocs.io
GNU General Public License v3.0
15 stars 18 forks source link

calc_density() incorrect for mixed particle types with global mass #62

Closed ttricco closed 8 months ago

ttricco commented 1 year ago

If a SarracenDataFrame contains mixed particle types (say gas and dust), and the particle mass is specified in params rather than per particle, then calc_density() will use the gas mass for all particle types.

This is not an issue if particles have been separated in read_phantom() using separate_types='all', as this assigns the correct particle mass to the global params in each SarracenDataFrame.