MG-MAMPOSSt, a Fortran code to test gravity at galaxy-cluster scales

1 Osservatorio Astronomico della Regione Autonoma Valle d’Aosta, Loc. Lignan 39, I-11020, Nus, Italy 2 CEICO, Institute of Physics of the Czech Academy of Sciences, Na Slovance 2, 182 21 Praha 8, Czechia 3 INAF, Osservatorio Astronomico di Trieste, via Tiepolo 11, 34143 Trieste, Italy 4 IFPU, Institute for Fundamental Physics of the Universe, via Beirut 2, 34014 Trieste, Italy 5 Institut d’Astrophysique de Paris (UMR 7095, CNRS and Sorbonne Université), 98 bis Bd Arago, F-75014 Paris, France 6 Institute of Theoretical Physics, Philosophenweg 16, Heidelberg University, 69120, Heidelberg, Germany ¶ Corresponding author DOI: 10.21105/joss.04800


Summary
MG-MAMPOSST is a FORTRAN90 code to perform tests of General Relativity (GR) through the analysis of kinematic observations of galaxy clusters. The code solves the Jeans equation, building on the MAMPOSST method of Mamon et al. (2013). It extends this method through new parametrisations of the gravitational potential for general families of gravity theories beyond GR aimed to explain the late-time accelerated expansion of the universe Perlmutter et al. (1999). Through appropriate input of the projected positions and line-of-sight velocities of a cluster's member galaxies, MG-MAMPOSST reconstructs the cluster mass profile and the velocity anisotropy profile in modified gravity, jointly constraining the kinematics (mass and anisotropy profile) and modified gravity parameters. The code is further supplemented with a new capability to produce weak lensing forecasts for joint kinematic and lensing analysis, offering a valuable tool for studying the nature of gravity at cluster scales.

Statement of need
In the last two decades, the cosmology and astrophysics communities have developed a significant interest in tests of dark energy theories at large scales. Among the vast range of probes of modified gravity and dark energy models, galaxy clusters offer a powerful laboratory at scales where possible departures from General Relativity (GR) should become observable (e.g., Cataneo & Rapetti, 2018 and references therein). Cluster mass profiles (e.g., Pizzuti et al., 2016;Sakstein et al., 2016;Wilcox et al., 2015) and cluster abundances (e.g., Cataneo et al., 2016;Lombriser et al., 2012) have been extensively used in the literature to place stringent bounds on some popular classes of extensions of GR. In this context, we developed MG-MAMPOSST, a FORTRAN90 code capable of performing tests of gravity models using the kinematics of member galaxies in clusters. The code is based upon the original MAMPOSST method, developed by G. Mamon, A. Biviano and G. Boué (Mamon et al., 2013, hereafter MAM13). A public version of MAMPOSST by G. Mamon can be found at https://gitlab.com/gmamon/MAMPOSSt. Whereas the original code relies on the assumption of a standard Newtonian gravitational potential, MG-MAMPOSST implements general and viable models of gravity beyond GR, to place constraints on the space of theories and investigate the essential statistical correlations between model parameters. In addition, the code is capable of producing complementary weak-lensing forecasts for joint kinematics and lensing analysis. MG-MAMPOSST was first presented and applied to real galaxy cluster data in Pizzuti et al. (2017), then extended and upgraded by Pizzuti et al. (2021).
MAMPOSST (Modelling Anisotropy and Mass Profile of Spherical Observed Systems) determines mass profiles of galaxy clusters (or in general, spherical systems in dynamical equilibrium) by analysing the internal kinematics of the cluster members. Given an input of projected positions and line-of-sight (l.o.s.) velocities of the member galaxies, and under the assumptions of spherical symmetry and dynamical relaxation, the code solves the Jeans equation to reconstruct the gravitational potential, the velocity anisotropy profile -which measures the difference among the velocity dispersion components in each direction, and (optionally) the projected number density profile. MG-MAMPOSST extends the method to the case where the gravitational potential is explicitly modified by the presence of an additional scalar degree of freedom. The non-standard gravitational potential is confronted against real or synthetic data provided as input to the code to infer the value of the free parameters describing the gravity model. In addition to the modified mass profile, the code requires a parametric model for the profiles of velocity anisotropy and number density of the member galaxies, with several available options. The code's main output is a tabulated likelihood/posterior as a function of all the free model parameters of gravity and other input physics. The code takes ∼ 1 second to find the best-fit values of the parameters for the selected models, and a few hours to perform a complete run of ∼ 10 5 sampling of the posterior through a simple (although efficient) Monte Carlo-Markov Chain (MCMC) exploration of the parameter space.

Mathematics
MG-MAMPOSST takes the projected phase space ( , z ) of the cluster member galaxies as input. Here, is the projected distance from the cluster center at which a galaxy is seen by the observer, and z is the velocity measured along the l.o.s. in the rest frame of the cluster. The output likelihood is computed by comparing data of galaxies in projected phase space ( , z ) to the theoretical radial velocity dispersion of the cluster member galaxies, obtained for a given set of models and parameters as the solution of the spherical Jeans' equation (see e.g., Mamon & Łokas, 2005), projected in the phase space. The above equation captures the input required for the MG-MAMPOSST method: the gradient of the gravitational potential, which in turn contains information about the model of gravity, as well as the velocity anisotropy profile ( ( )) and the projected number density of tracers ( ( )).
The current version of the code supports up to seven parameters, with two parameters defining the mass profile, one or two parameters for the velocity anisotropy profile, one for the number density profile, and finally, two parameters related to the modified gravity framework. Each parameter can be either treated as free in the fitting procedure, or it can be assigned pre-defined values.
In the original code of MAM13 there are several possible choices for the modelling of the dark matter mass profile in the ΛCDM scenario. MG-MAMPOSST adds new parametrizations to handle popular modifications of gravity. At the moment, all the implemented non-standard profiles rely on the Navarro-Frenk-White (NFW, Navarro et al., 1997) mass density profile to model the matter density distribution, which has been shown to provide a good description of simulated and observed galaxy clusters, both in GR and in modified gravity (see e.g., Peirani et al., 2017;Umetsu, 2020;Wilcox et al., 2016). Nevertheless, other mass models will be included in upcoming versions of the code. Since the mass profile, or equivalently, the gravitational potential, enters only in the expression of the radial velocity dispersion, Equation 1, the implementation of new models can be performed directly by the user, modifying the subroutines in the auxiliary file MAM.f where the above equation is involved straightforwardly. In particular, the functions called sr2int(alr) and fa(tlog) are the only parts of the MG-MAMPOSST code where parametrisations for the mass profile appear.
The code is equipped with the two most popular and observationally viable classes of dark energy models beyond GR based on a single, extra scalar field. These correspond to the so-called "chameleon" models and the "Beyond Horndeski/DHOST" models. Common between these two families of models is an extra dynamical scalar degree of freedom ( ) which introduces a new gravitational force modifying the (gradient of the) gravitational potential as In the above equation, ( , ) is the total mass profile at radius , as a function of the parameter vector , while ( , , MG ) is the contribution of the fifth force, which depends on the parametrisation of the mass density, and the parameters defining the modified gravity models MG . Both families are characterized by two free parameters determining the action of the fifth force, which can be constrained with MG-MAMPOSST. For a detailed discussion of these models and the associated equations, we refer to Pizzuti et al. (2021), as well as to the original papers where the models were first introduced Dima & Vernizzi (2018). Both families have been extensively studied in the literature (e.g., Burrage & Sakstein, 2018;Jain et al., 2016;Sakstein & Jain, 2017;Saltas & Lopes, 2019;Terukina et al., 2014;Wilcox et al., 2015;Wilson & Bean, 2021). For recent constraints on DHOST models see, e.g., Laudato et al. (2022), Pizzuti, Saltas, Umetsu, et al. (2022), Saltas & Christensen-Dalsgaard (2022), and Haridasu et al. (2021).
As shown by Pizzuti et al. (2021), internal kinematics alone do not typically provide stringent bounds on the modified gravity parameters, due to the strong degeneracy between model parameters. For this reason, MG-MAMPOSST also supports the inclusion of simulated lensing to the kinematics analysis in modified gravity, a feature which is particularly useful for forecasting the constraining power of the method for upcoming imaging and spectroscopic surveys such as Euclid or LSST.

Functionality and Design
A complete run of the MG-MAMPOSST code is based upon several correlated files which store the input/output information. In particular: • gomamposstopt_x.inp contains the names and locations of the input data file and of the input parameter file, as well as the names and locations of the output files. Each of them can be customised by the user.
• data/datphys.dat is the input data file, structured as a table where the number of rows coincides with the number of data points. The first column is the projected radius in units of kpc, the second and third columns represent the l.o.s. velocities and the associated errors in units of km/s.
• input_pars/pars_test.txt is the input parameters file, where one can select the number of free parameters and their guess values, the models of the various kinematic components (gravitational potential, number density profile and velocity anisotropy profile) and other relevant physical quantities for the MG-MAMPOSST analysis.
• Options.txt contains additional options required by MG-MAMPOSST, e.g. how to explore the parameter space (fixed grid of values or MCMC) and the details of the lensing simulation in modified gravity.
• Output/MaxLik.dat is the main output. It is organized as a table where each row indicates the values of the parameters for a given point in the six-dimensional parameter space and the corresponding value of the logarithm of the Likelihood/Posterior.
The MG-MAMPOSST run further produces additional output files, stored in the Output folder and, optionally, a plot of the marginalized posteriors for the free parameters when the MCMC exploration mode is selected. For some MG and GR mass models, the code also outputs a plot of the best-fit mass profile along with its associated one and two-sigma uncertainties. The plot generation requires the Python getdist package (Lewis, 2019). In Figure 1 an example of a typical output plot is shown for MCMC sampling in the case of DHOST model of gravity with five free parameters. The run has been performed by using the sample dataset shipped with the code; the test of execution described in the documentation and the README should produce almost the same figure. For a complete description of the code's basic usage and functionalities, see the code's documentation in the repository or on arXiv (Pizzuti, Saltas, Biviano, et al., 2022). Figure 1: Example of the marginalized distribution for the free parameters of the DHOST modified gravity model implemented in MG-MAMPOSST, obtained by using the test dataset provided in the code repository. The MCMC sampling has been performed over 10 5 points in the parameter space. Dark blue and light blue areas correspond to 1 and 2 confidence regions, respectively. and 200 are the mass profile parameters, ∞ is the velocity anisotropy profile parameter and 1 , 2 are the parameters defining the modified gravity model analysed.