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

Lorenzo Pizzuti, Ippocratis Saltas, Andrea Biviano, Gary Mamon, Luca Amendola

► To cite this version:

Lorenzo Pizzuti, Ippocratis Saltas, Andrea Biviano, Gary Mamon, Luca Amendola. MG-MAMPOSSt, a Fortran code to test gravity at galaxy-cluster scales. Journal of Open Source Software, 2023, 8, 10.21105/joss.04800. insu-03947322

HAL Id: insu-03947322

https://insu.hal.science/insu-03947322

Submitted on 19 Jan 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# MG-MAMPOSSt, a Fortran code to test gravity at galaxy-cluster scales

Lorenzo Pizzuti¹,²¶, Ippocratis D. Saltas², Andrea Biviano³,⁴, Gary Mamon⁵, and Luca Amendola⁶

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

Software

- Review 🐰

- Repository 🐰

- Archive 🐰

Editor: Eloisa Bentivegna 🐰 🔍

Reviewers:

- @ttricco

- @eloisabentivegna

Submitted: 04 August 2022

Published: 10 January 2023

License

Authors of papers retain copyright
and release the work under a
Creative Commons Attribution 4.0
International License (CC BY 4.0).

## 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⁵ 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 $(R, v_z)$ of the cluster member galaxies as input. Here, $R$ is the projected distance from the cluster center at which a galaxy is seen by the observer, and $v_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 $(R, v_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),

$$ \sigma_r^2(r) = \frac{1}{\nu(r)} \int_r^\infty \exp \left[ 2 \int_r^s \frac{\beta(t)}{t} dt \right] \nu(s) \frac{d\Phi}{ds} ds, \quad (1) $$

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 ($\beta(r)$) and the projected number density of tracers ($\nu(r)$).

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 $\Lambda$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 ($\phi$) which introduces a new gravitational force modifying the (gradient of the) gravitational potential as

$$ \frac{d\Phi}{dr} = \frac{G}{r^2} [M(r, \theta_{DM}) + f(r, \theta_{DM}, \theta_{MG})]. \qquad (2) $$

In the above equation, $M(r, \theta_{DM})$ is the total mass profile at radius $r$, as a function of the parameter vector $\theta_{DM}$, while $f(r, \theta_{DM}, \theta_{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 $\theta_{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 I.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><img src="image_2.png" /><figcaption>**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\sigma$ and $2\sigma$ confidence regions, respectively. $r_s$ and $r_{200}$ are the mass profile parameters, $A_\infty$ is the velocity anisotropy profile parameter and $Y_1, Y_2$ are the parameters defining the modified gravity model analysed.</figcaption></figure>
Acknowledgements

Lorenzo Pizzuti acknowledges support from the Czech Academy of Sciences under grant number LQ100102101. Lorenzo Pizzuti is partially supported by a 2019 "Research and Education" grant from Fondazione CRT. The OAVdA is managed by the Fondazione Cle'ment Fillietroz-ONLUS, which is supported by the Regional Government of the Aosta Valley, the Town Municipality of Nus and the "Unite' des Communes valdotaines Mont-E'milius. Ippocratis D. Saltas is supported by the Czech Grant Agency (GACR), under grant number 21-16583M. The authors further acknowledge all the developers of the free FORTRAN routines used in MG-MAMPOSST. Credits are given in the header of each routine.

References

Burrage, C., & Sakstein, J. (2018). Tests of chameleon gravity. *Living Reviews in Relativity*, 21(1), 1. https://doi.org/10.1007/s41114-018-0011-x

Cataneo, M., & Rapetti, D. (2018). Tests of gravity with galaxy clusters. *International Journal of Modern Physics D*, 27(15), 1848006-1848936. https://doi.org/10.1142/S0218271818480061

Cataneo, M., Rapetti, D., Lombriser, L., & Li, B. (2016). Cluster abundance in chameleonf(r) gravity i: Toward an accurate halo mass function prediction. *JCAP*, 2016(12), 024024. https://doi.org/10.1088/1475-7516/2016/12/024

Crisostomi, M., & Koyama, K. (2018). Vainshtein mechanism after GW170817. *Phys. Rev.*, D97(2), 021301. https://doi.org/10.1103/PhysRevD.97.021301

Dima, A., & Vernizzi, F. (2018). Vainshtein screening in scalar-tensor theories before and after GW170817: Constraints on theories beyond horndeski. *Phys. Rev. D*, 97, 101302. https://doi.org/10.1103/PhysRevD.97.101302

Haridasu, B. S., Karmakar, P., De Petris, M., Cardone, V. F., & Maoli, R. (2021). Testing generalized scalar-tensor theories of gravity with clusters of galaxies. arXiv e-Prints, arXiv:2111.01101. https://arxiv.org/abs/2111.01101

Jain, R. K., Kouvaris, C., & Nielsen, N. G. (2016). White Dwarf Critical Tests for Modified Gravity. *Physical Review Letters*, 116(15), 151103. https://doi.org/10.1103/PhysRevLett.116.151103

Kobayashi, T., Watanabe, Y., & Yamauchi, D. (2015). Breaking of Vainshtein screening in scalar-tensor theories beyond Horndeski. *Phys. Rev.*, D91(6), 064013. https://doi.org/10.1103/PhysRevD.91.064013

Laudato, E., Salzano, V., & Umetsu, K. (2022). Multicomponent DHOST analysis in galaxy clusters. *Monthly Notices of the RAS*, 511(2), 1878–1892. https://doi.org/10.1093/mnras/stac180

Lewis, A. (2019). *GetDist: a Python package for analysing Monte Carlo samples*. https://arxiv.org/abs/1910.13970

Lombriser, L., Slosar, A., Seljak, U., & Hu, W. (2012). Constraints on f(R) gravity from probing the large-scale structure. *Phys. Rev.*, D85, 124038. https://doi.org/10.1103/PhysRevD.85.124038

Mamon, G. A., Biviano, A., & Boué, G. (2013). MAMPOSSt: Modelling Anisotropy and Mass Profiles of Observed Spherical Systems - I. Gaussian 3D velocities. *Monthly Notices of the RAS*, 429, 3079–3098. https://doi.org/10.1093/mnras/sts565

Mamon, G. A., & Łokas, E. L. (2005). Dark matter in elliptical galaxies - II. Estimating the mass within the virial radius. *Monthly Notices of the RAS*, 363, 705–722. https://doi.org/10.1093/mnras/sts565
//doi.org/10.1111/j.1365-2966.2005.09400.x

Navarro, J. F., Frenk, C. S., & White, S. D. M. (1997). A Universal Density Profile from Hierarchical Clustering. *Astrophysical Journal*, **490**, 493–+. https://doi.org/10.1086/304888

Peirani, S., Dubois, Y., Volonteri, M., Devriendt, J., Bundy, K., Silk, J., Pichon, C., Kaviraj, S., Gavazzi, R., & Habouzit, M. (2017). Density profile of dark matter haloes and galaxies in the HORIZON-AGN simulation: the impact of AGN feedback. *Monthly Notices of the RAS*, **472**(2), 2153–2169. https://doi.org/10.1093/mnras/stx2099

Perlmutter, S., Aldering, G., Goldhaber, G., Knop, R. A., Nugent, P., Castro, P. G., Deustua, S., Fabbro, S., Goobar, A., Groom, D. E., & others. (1999). Measurements of Ω and Λ from 42 High-Redshift Supernovae. *Astrophysical Journal*, **517**, 565–586. https://doi.org/10.1086/307221

Pizzuti, L., Saltas, I. D., & Amendola, L. (2021). mg-mamposst: a code to test modifications of gravity with internal kinematics and lensing analyses of galaxy clusters. *MNRAS*, **506**(1), 595–612. https://doi.org/10.1093/mnras/stab1727

Pizzuti, L., Saltas, I. D., Biviano, A., Mamon, G., & Amendola, L. (2022). MG-MAMPOSSt, a code to test gravity at galaxy-cluster scales: a technical introduction. *arXiv e-Prints*, arXiv:2201.07194. https://arxiv.org/abs/2201.07194

Pizzuti, L., Saltas, I. D., Umetsu, K., & Sartoris, B. (2022). Probing vainsthein-screening gravity with galaxy clusters using internal kinematics and strong and weak lensing. *Monthly Notices of the RAS*, **512**(3), 4280–4290. https://doi.org/10.1093/mnras/stac746

Pizzuti, L., Sartoris, B., Amendola, L., Borgani, S., Biviano, A., Umetsu, K., Mercurio, A., Rosati, P., Balestra, I., Caminha, G. B., Girardi, M., Grillo, C., & Nonino, M. (2017). CLASH-VLT: constraints on f(R) gravity models with galaxy clusters using lensing and kinematic analyses. *Journal of Cosmology and Astroparticle Physics*, **2017**(7), 023. https://doi.org/10.1088/1475-7516/2017/07/023

Pizzuti, L., Sartoris, B., Borgani, S., Amendola, L., Umetsu, K., Biviano, A., Girardi, M., Rosati, P., Balestra, I., Caminha, G. B., Frye, B., Koekemoer, A., Grillo, C., Lombardi, M., Mercurio, A., & Nonino, M. (2016). CLASH-VLT: testing the nature of gravity with galaxy cluster mass profiles. *Journal of Cosmology and Astroparticle Physics*, **2016**(4), 023. https://doi.org/10.1088/1475-7516/2016/04/023

Riess, A. G., Filippenko, A. V., Challis, P., Clocchiatti, A., Diercks, A., & et al. (1998). Observational Evidence from Supernovae for an Accelerating Universe and a Cosmological Constant. *Astronomical Journal*, **116**, 1009–1038. https://doi.org/10.1086/300499

Sakstein, J., & Jain, B. (2017). Implications of the Neutron Star Merger GW170817 for Cosmological Scalar-Tensor Theories. *Phys. Rev. Lett.*, **119**(25), 251303. https://doi.org/10.1103/PhysRevLett.119.251303

Sakstein, J., Wilcox, H., Bacon, D., Koyama, K., & Nichol, R. C. (2016). Testing Gravity Using Galaxy Clusters: New Constraints on Beyond Horndeski Theories. *JCAP*, **1607**(07), 019. https://doi.org/10.1088/1475-7516/2016/07/019

Saltas, I. D., & Christensen-Dalsgaard, J. (2022). Searching for dark energy with the Sun. *arXiv e-Prints*, arXiv:2205.14134. https://arxiv.org/abs/2205.14134

Saltas, I. D., & Lopes, I. (2019). Obtaining Precision Constraints on Modified Gravity with Helioseismology. *Phys. Rev. Lett.*, **123**(9), 091103. https://doi.org/10.1103/PhysRevLett.123.091103

Terukina, A., Lombriser, L., Yamamoto, K., Bacon, D., Koyama, K., & Nichol, R. C. (2014). Testing chameleon gravity with the coma cluster. *JCAP*, **2014**(04), 013–013. https://doi.org/10.1088/1475-7516/2014/04/013
Umetsu, K. (2020). Cluster-galaxy weak lensing. *Astronomy and Astrophysics Reviews*, 28(1), 7. https://doi.org/10.1007/s00159-020-00129-w

Wilcox, H., Bacon, D., Nichol, R. C., Rooney, P. J., Terukina, A., Romer, A. K., Koyama, K., Zhao, G.-B., Hood, R., Mann, R. G., & al., et. (2015). TheXMMCluster survey: Testing chameleon gravity using the profiles of clusters. *Monthly Notices of the Royal Astronomical Society*, 452(2), 11711183. https://doi.org/10.1093/mnras/stv1366

Wilcox, H., Nichol, R. C., Zhao, G.-B., Bacon, D., Koyama, K., & Romer, A. K. (2016). Simulation tests of galaxy cluster constraints on chameleon gravity. *Monthly Notices of the RAS*, 462(1), 715-725. https://doi.org/10.1093/mnras/stw1617

Wilson, C., & Bean, R. (2021). Testing f (R) gravity with scale dependent cosmic void velocity profiles. *Physical Review D*, 104(2), 023512. https://doi.org/10.1103/PhysRevD.104.023512