Abstract
Mass-modeling methods are used to infer the gravitational field of stellar systems, from globular clusters to giant elliptical galaxies. While many methods already exist, most require assumptions on the form of the underlying distribution function or binning the data, leading to some loss of information. Furthermore, when only line-of-sight (LOS) data are available, many methods suffer from the well-known mass-anisotropy degeneracy. To overcome these limitations, we developed a new and publicly available mass modeling method GravSphere2 . It combines individual stellar velocities from LOS and proper motion (PM) measurements to solve the Jeans equations up to fourth order, without any data binning. Using flexible functional forms for the velocity anisotropy profiles at second and fourth order, we show how including additional constraints from a new observable, fourth-order PMs, allows us to obtain a full solution along the three dimensions and breaking the mass-anisotropy degeneracy at all orders. We tested our method on mock data for dwarf galaxies, showing how GravSphere2 improves on previous methods. GravSphere2 introduces four key improvements over previous Jeans mass modeling methods in the literature: (i) we included fourth-order velocity moment equations in both the LOS and PM directions, for the first time, using them to break model degeneracies; (ii) we used a fully general treatment of both the second and fourth-order velocity anisotropies; (iii) we introduced a ``bin-free'' approach where we fit individual tracer velocities and positions using flexible and self-consistent probability density functions that include kurtosis; and (iv) we improved the likelihood sampling by using the nested sampler dynesty was able to recover the mass density, stellar velocity anisotropy, and the logarithmic slope of the mass density profile within its quoted 95% confidence intervals across almost all mocks over a wide radial range ( $0.1 łesssim r/R_ łesssim 10$ , where R_1/2 is the projected half-light radius). As the number of tracers is lowered (even down to just ten tracers) it gracefully degrades, with larger uncertainties but no induced bias. We find that outperforms simple mass estimators, suggesting that it is worth using even when only a few LOS velocities are available. Using 1,000 tracers without PMs recovers the logarithmic density slope at R_1/2 with$12%$(25%) statistical errors for cuspy (cored) mock data, enabling us to make a distinction between the two. When including PMs, this result can be improved to$8%$(12%). With only 100 tracers and no PMs, we were still able to recover slopes with ∼ 30% (20%) errors. will become a valuable new tool to hunt for massive black holes and invisible dark matter in spherical stellar systems, from globular clusters and dwarf galaxies to giant ellipticals and galaxy clusters.