Mass reconstruction in disk like galaxies using strong lensing and rotation curves: The Gallenspy package
Abstract
Two methods for mass profile reconstruction in disk-like galaxies are used in this work, the first one is done with the rotation curve’s fit based on the data of circular velocity obtained observationally in a stellar system, while the other method is focused on the Gravitational Lensing Effect (GLE). For these mass reconstructions, two routines developed in the programming language python were used: one of them is Galrotpy [1], which was built by members of the Galaxies, Gravitation and Cosmology group from the Observatorio Astronómico Nacional of the Universidad Nacional de Colombia and whose funtionality is applied in the rotation curves, the second routine is Gallenspy which was created in the development of this work [2], and is focused in the GLE. It should be noted that both routines perform a parametric estimation from Bayesian statistics, which allow to obtain the uncertainties of the estimated values. Finally the great power of combining galactic dynamics and GLE is shown. For this purpose the mass profiles of the galaxies SDSSJ2141-001 and SDSSJ1331+3628 were reconstructed with Galrotpy and Gallenspy, the results obtained are compared with those reported by other authors regarding these systems.
Keywords: Mass reconstructions, GLE, rotational curves, mass profiles, Gallenspy, Galrotpy.
1 Introduction
The study of mass distribution in galaxies allows to obtain valuable information about the universe structure on a large scale and the process of stellar evolution. For this reason, the rotation curves and the GLE present in galaxies are relevant, because they allow the analysis of the distribution of baryonic and dark matter in these systems. With this approach we can obtain significant restrictions on values such as cosmological densities, the Hubble constant, and the cosmological constant among others.
The analysis of the rotation curves is done based on the Newtonian gravitation theory, in this case is important to point out that the flatness in the contours of these curves is the cause why dark matter is included by other authors in different mass reconstructions [1, 3, 4, 5]. From this perspective, dark matter reconciles the keplerian decrease with the observations done along the astronomy history, which forces to include the superposition of different mass components in the fitting of the rotation curves with observational data.
In addition to the rotation present in the galaxies, GLE has been evidenced in many of them, an effect related to the deflection that the light coming from a background source presents due to gravitational potential of these stellar systems. Thanks to the achievements of the General Relativity Theory, it is possible to estimate the mass distribution of these galaxies based on the deflector angle of the light beams [6, 7]. For this reason this effect can be complemented with the dynamical analysis of mass reconstruction profiles in galaxies.
Between the types of GLE observations present in galaxies and clusters, the formation of Einstein rings and giant arcs is very common. This is evidenced in this work by the mass reconstructions of the galaxies SDSSJ2141-001 and SDSSJ1331+3628, regarding to the rotational velocity data of this galaxies it is important to clarify that these were obtained from Dutton et.al. [3, 5] hence the mass profiles reconstruction was done with both methods.
Finally it is important to point out that in this work, the advantages of combining GLE and galactic dynamics are presented, showing that both methods are complementary and powerful in mass reconstructions.
2 Galactic Dynamics
In the past years, has been evidenced that the disk-like galaxies have different mass components, these can be classified into four kinds: dark matter halo, stellar halo, disk, and bulge. These components interact in concordance with Newtonian dynamics, where each mass distribution is essential in the understanding of the functional form of the gravitational potential for these stellar systems.

Since the gravitational force () present in galaxies is conservative [8], it can be related to the gravitational potential () like:
(1) |
This implies that to the mass volumetric density () and are related by means of the Poisson equation [1]:
(2) |
where is the universal gravitation constant.
Due to the linearity of the Poisson equation [9, 1], in the case of a galaxy with N components and respective volumetric mass densities , , …, the total density of this system is:
(3) |
Therefore the total gravitational potential is expressed like .
As the circular velocity (in the equatorial plane) associated to a gravitational potential in disc-like galaxies is described by:
(4) |
the total circular velocity of this kind of galaxies is expressed as a superposition of the velocities belonging to each gravitational potential, which is evidenced in the equation 5:
(5) |
and therefore it is possible to make reconstructions of mass profiles in disk-like galaxies through the fitting of rotation curves with the observational values of circular velocity, as shown in figure 2.

3 Gravitational Lensing Effect
In GLE, the relation between the coordinates of the images and the source is given by the equation:
(6) |
where is the deflector potential, which has the information of the lens and the cosmological distances. For the case of mass profiles with spherical symmetry, it is possible to assume that [10]
(7) |
where is the convergence, defined as
(8) |
where is the superficial mass density and is given by the relation
(9) |
in this case, is the speed of light, , and are the angular diameter distances between observer-lens, observer-source and lens-source respectively.
Additionally, the mapping between the planes of the lens and the source is done through the jacobian transformation matrix
(10) |
for .
With this transformation matrix, the magnification of the images can be defined as
(11) |
therefore the critical curve is the set of points in the lens plane where .
Note: The set of points in the source plane, which through the equation 6 belongs to the critical points is denominated caustic curve.
4 Combining GLE and Galactic Dynamics
Due to the superposition between the different mass distributions in galaxies, there are mass profiles reconstructions done with galactic dynamics and other with lensing where the obtention of parameters does not occur within acceptable reliability regions [3].
A solution proposal for this problem has been proposed by other authors [11, 3], regarding the combination of these mass reconstructions methods, which means taking advantage of the geometry used for each one of them.
For this purpose it must be taken into account, that while the mass projection in the galactic dynamics is done in the equatorial plane of the galaxy, in the case of the GLE the operator is projected in the plane (, ) where the deflected images are formed.

In figure 3, the geometries belonging to the methods of mass reconstruction used in this work are illustrated, wherein the GLE the projection of mass in a cylinder through the line of sight and within a radius restricted by the position of the deflected images is done, which from the formalism of strong lensing is related to the formation of the Einstein ring [3] and is described by the equation 12.
(12) |
with the mass projected in the cylinder of figure 3.
In the case of mass projection from galactic dynamics, it corresponds to enclosed spheres of differents radius due to the estimated circular velocities in the galaxy. This geometrical approach is optimal, as long as the disc has an inclination, so that the observer can see it from its edges.
Based on the theory previously shown, the combination of GLE and galactic dynamics for this work is proposed around the restrictions in the parameter space that both methods can provide, in such a way that it is possible to distinguish more clearly the gravitational contribution of each mass component in disc-like galaxies.
5 Gallenspy
Gallenspy is an open source code created in python, designed for the mass profiles reconstruction in disk-like galaxies using GLE. It is important to note that this algorithm allows to invert numerically the lens equation (equation 6) for gravitational potentials with spherical symmetry, in addition to the estimation in the position of the source (,), given the positions (, ) of the images produced by the lens.
The main libraries used in this routine are: numpy [12] for the data handling, matplotlib [13] regarding the generation of graphic interfaces, galpy [14] to obtain mass superficial densities, as to the parametric adjust with Markov-Montecarlo chains (MCMC) it was used emcee [15] and for the graphics of reliability regions corner [16] is used.
The deflector potential is obtained numerically in Gallenspy by means of the equation 7, which is very helpful because some mass distribution models do not have analytical solutions for the equations 3, 6 and 7.
Also it is important to note others tasks of Gallenspy like computing of critical and caustic curves and obtaining the Einstein ring. For a more detailed description, it is recommended to see the repository page where the source code 111https://github.com/ialopezt/GalLenspy is available together with its requirements and instructions for its use.
5.1 Tested case with Isotherm Singular Sphere (SIS)
A way by which Gallenspy was tested, was the comparison with the analytical solutions given by Hurtado [10] of the isotherm singular sphere (SIS) under certain specific conditions. In figure 4 some of these comparisons are shown for the obtention of deflection angle, the images formation, and deflector potential in the case of a circular source of radius to a distance of with respect to the observer, this mass profile was modeled with a dispersion velocity of .



As it is possible to observe in each comparative graphic, the results obtained numerically with Gallenspy present high reliability where the percentage error is of due to the grid used in this case.
5.2 Gallenspy input
To use Gallenspy, it is important to give the values of cosmological distances in and critical density in , which are introduced by means of a file named Cosmological_distances.txt
. On the other hand, the user must introduced the coordinates of the observational images (in radians) in the file coordinates.txt
.(Note: for the case of a circular source it is present the file alpha.txt
, where the user must introduce angles value belonging to each point of the observational images.)
5.3 Visual fitting with Gallenspy
Gallenspy presents an interactive fitting of parameters through a routine developed in Jupyter Notebook named Interactive_data
, in this case the user has the possibility of choose freely the parametric range for each value, however it is suggested a parametric space illustrated in table 1 which is based on the values used by other authors and with the ones used to model dwarf and milky-way type galaxies [1].
Range of values with Gallenspy | ||
---|---|---|
Component | Range of parameters | Units |
Bulge I | ||
0.0 0.5 | ||
0.1 1.0 | ||
Bulge II | 0.01 0.05 | |
0.5 1.5 | ||
1 5 | ||
Disk thin | 1 10 | |
0.1 1.0 | ||
0.5 1.5 | ||
Disk thick | 1 10 | |
0.1 15.0 | ||
0.5 1.5 | ||
Exponential Disk | 2 6 | |
1 15 | ||
Halo NFW | 0.1 30 | |
0.1 10 | ||
Halo Burket | 2 38 | |
0.1 10 |
Figure 5 shows the interactive panel, for the fitting of an Exponential Disk lens model and a circular source, this observational data belong to the galaxy J2141 which is analyzed later.

5.4 Bayesian statistics with Gallenspy
In mass reconstructions, Gallenspy allows assigning a mass profile to each component of the lens galaxy, where each free parameter has a range of possible values for the obtention of a set of initial values in the parametric exploration.
Also, it is important to point out that for the mass reconstruction of each component of the galaxy, it is possible to choose between different profiles for the parametric fitting with Gallenspy: for example, in the case of galactic disk it is possible choose between the options of Miyamoto-Nagai and Exponential Disk [1] [8], for the dark matter halo between Navarro-Frenk-White (NFW) and Burket [1] [8], while in the bulge is used the Miyamoto-Nagai even though there are two possible ranges of data in this profile.
When the positions (, ) of the GLE are known, the work with Gallenspy is to find the model and parameters set which can reproduce these provided data, for this reason in this routine the bayesian statistics is not only based on the exploration of all possible positions of the source.
For this parametric exploration, Gallenspy implements the Metropolis-Hasting algorithm through MCMC [17], where it is obtained a posterior probability distribution for each parameter set of the lens model selected of the table 1, which is given by the relation:
(13) |
with:
-
1.
the probability that this parameter set is appropriate for the model and the data .
-
2.
the probability that the data are obtained with the model and the parameter set , is known as likelihood [17] and it is denoted with .
-
3.
the prior which is the reliability that the parameter set is correct for the model.
-
4.
is denoted as , this is the normalization factor and is the probability of obtaining the data with the model .
It is important to note that in Gallenspy the normalization factor is not considered, hence the fundamental work is the compute of the likelihood (this is because the prior for this parameter set has the same value). From this perspective the method for obtaining the initial values of is through a visual fitting in the Interactive_data
routine from which it is possible to make a first approximation between the data set and the model values.
Later in this process, the user must execute the code created in the respective file.py (for the estimation of the source source_lens.py
and in the case of mass reconstruction parameters_estimation.py
) where Gallenspy requests to introduce the initial values obtained in the visual fitting. Next, Gallenspy lets the user choose the number of steps and walkers, which is enough for the MCMC of this computational routine.
In Gallenspy the minimization function , for a source with a number of images in the GLE is given by:
(14) |
where in this equation is the position of observed image j in the data set , the error in position due to the noise in the image and the image j predicted by the mass model used with the parameter set.
The index appears in the function , this because in the GLE the formation of images with various sources is possible, for this reason the likelihood for each explored parameter set is expressed through the Gaussian distribution
(15) |
where N is the number of sources.

In figure 6, the algorithm of Gallenspy is shown whereas in the next section an example of this with the SIS profile is illustrated.
Finally it is important to note that Gallenspy generates a file.txt with the final parameters obtained: in the case of source estimation parameters_lens_source.txt
and parameters_MCMC.txt
, these files are then request by Gallenspy for other tasks as compute of Einstein ring and mass estimations.
5.5 Illustrative example with the SIS profile
Although the SIS is not included in the profiles of Gallenspy, it is possible to show an illustration of the mode which this routine performs the parameters exploration with this mass distribution.
Because of the analytical solutions shown by Hurtado [10] to the lens equation in the SIS profile, the formation of images in the GLE are given by the relations:
(16) |
(17) |
with the dispersion velocity, and are the positive and negative solutions respectively where the images are formed.
Figure 7 evidences the images formation, when for a circular source of radius arcs whose center has coordinates (h = 0.8arcs, k = 0.8arc) and where the cosmological distances are and .

If for this specific case the parametric exploration with Gallenspy is applied, then it is necessary to assume that the values of , , h y k are not known and that the objective is the obtention of the parameters family which through of GLE can reproduce the images illustrated in figure VI, where in this example only values of are supposed to be known. This time, the ranges established for the parametric exploration were , arcsarcs, -8arcs<h<8arcs and 8arcs<k<8arcs.
With the application of the function based on the equation 14, and with an error of in the position of the images, the initial parameters set of the likelihood for the MCMC was obtained. In figure 8(a), the comparison between the images of with those produced by the parameters obtained of is evidenced.


From these values obtained with the multiparametric minimization, the MCMC was executed with Gallenspy. The best result was obtained for a number of 100 walkers and 1000 steps. In figure 8(b) the chain convergence in the obtention of parameter is shown, where it is possible to observe that from the obtained data in step 400 the parameter estimation can be done.


The graphs illustrated in figure 9(a) show the reliability regions, under which the parameters family was obtained for the reproduction of the images belonging to .
Parameter | 95% |
---|---|
SIS | |
Source | |
In table 2 the parameters obtained are shown with its uncertainties for the quantile of 95%, these values are consistent with those established for the obtention of the images of , for this reason with this illustrative example it was possible to observe the way in which Gallenspy proceeds and its efficiency in the estimation of the parameters from the GLE.
Finally the figure 9(b) shows the superposition of images, where the reliability of results obtained with Gallenspy becomes evident.
5.6 Critical and caustic curves with Gallenspy
Another process that Gallenspy performs is the obtention of critical and caustic curves for distinct lens model. To understand this method, it is important to remember that depends on the convergence and the shear , which are relation to the deflector potential computed by Gallenspy in the fitting of images [7, 10].
(18) |
(19) |
and from these results, Gallenspy computes the points of the lens plane where based on the given relation by Hurtado [10]
(20) |
As the obtention of this critical points is not a trivial process, Gallenspy makes this process with the Bartelmann method [18], in which the critical curve in the lens plane is a border that changes the sign of the determinant () as illustred the figure 10.

As it is shown in this image, there are points of the plane even though do not belong to the critical curve, can be considered close to it: from this perspective, if then a point is considered adjacent to the curve in a grid when changes between and any of these neighboring points.
In figure 10 presents the estimation of each point for a grid with dimension based on the sign , this means that for positive values and in the case of negative values , where and are in a range of to . From this perspective, the established restriction in Gallenspy to know if a point is adjacent to the critical curve in the grid is based on the condition:
(21) |
This method is very effective to compute the critical curve as the grid is refined since it allows to reduce the range in which each critical point can be.
Figure 11 shows the process flow diagram for the estimation of critical curves with Gallenspy, it is important to highlight that the error range is low due to the grid’s refinement of points. From this perspective, the set of critical points with a percentage error of is estimated as those points in which the condition of equation 21 is met.

When the critical points are computed by Gallenspy, the obtention of the caustic points is an easy process because the application of the equation 6 is enough.
Going back to the example of SIS profile of the previous section, the critical curve was obtained with Gallenspy. The result is shown in figure 12.


This graph evidences that the critical curve belongs to a circle with a radius of arcs. In this case, it is important to consider the analytical solution to the SIS profile for [10], where the critical curve is a circumference of radius given by the relation
(22) |
Based on the data provided above regarding the SIS, the radius obtained from the equation 22 is of arcs. This is very close to the obtained result with Gallenspy, where it is possible to check a percentage error of in this numerical process.
In this way, in the analytical solution of the SIS it it possible to conclude that the caustic curve in this mass profile belongs to a point in the origin of the plane ()[10], this is evidenced in figure 13 where the source is near to this caustic point and for this reason the magnification of the images is significant.
6 GALROTPY
Galrotpy[1] is an interactive tool focused on the visualization and exploration of parameters through MCMC, in such a way that it is possible to make mass reconstructions from the fitting of rotational curves in disk-like galaxies.
The main python packages used in this routine are: matplotlib[13] for the generation of a graphic environment, numpy[12] for data management, astropy[19], which is useful for units assignation, Galpy[14] for the construction of rotational curves with each mass profile, emcee[15] used in the exploration and fitting of data with MCMC, and corner[16] for the reliability regions of the parametric fitting.
The space of parametric exploration in this routine is the same as Gallenspy due to the reasons given in the previous section. On the other hand, the rotational velocity data from which the parametric fitting is done should be consigned in a file denominated rot_curve.txt, in which the units belonging to the radial coordinates must be expressed in and the velocities in . Figure 14(a) is shows the panel for the selection of gravitational potentials in Galrotpy, in which the variation parameters is done. Thus the user can do a visual fitting between the rotational curve and the observational data of rotational velocity (this is evidenced in figure 14(b)).


6.1 Bayesian statistics in Galrotpy
In the case of Galrotpy the MCMC has similar characteristics with Gallenspy even in the consideration of the prior and in their approach to evaluation of the likelihood.
However, the process of parametric exploration with Galrotpy presents greater facilities due to the visual fitting that is possible to do with this routine and for this reason, the parametric minimization done with Gallenspy is not necessary.
In this way, with the visual parameter fitting Galrotpy proceeds to run the MCMC where as in Gallenspy the user can choose the number of walkers and steps. It is important to point out that in this routine, the likelihood es given by the relation
(23) |
with:
-
1.
N the number of observationally obtained data.
-
2.
the observed velocity.
-
3.
the rotational velocity of the mass model chosen for the fitting.
-
4.
the error in the velocity observational data.
Once Galrotpy does the parametric exploration, the behavior of the MCMC is illustrated and the values with uncertainties of 68% and 95% are shown. Finally Galrotpy generates two types of graphics, one with the fitting rotation curve and other with the reliability regions.
6.2 Mass reconstruction of galaxy M33 with Galrotpy
M33 is a spiral galaxy without bar structure [1], and its set of rotational velocity data was obtained from Corbelli et al. [20]. For the mass reconstruction with Galrotpy, it is important to point out that the parametric exploration was done with a number of 100 walkers and 3000 steps.

In figure 15, is presented the way in which MCMC explores the parameter , where the convergence is given in a lower number of steps less than Gallenspy, thanks to the visual fitting of Galrotpy.

Parameter | ||
Exponential Disk | ||
NFW | ||
Figure 16 shows the fitting done with Galrotpy, where the NFW profile was used for the dark matter halo while the contribution of baryonic matter was analyzed with the Exponential Disk profile. The right side of this figure shows the reliability regions, these values are consigned in the table 3.
The obtained values and its uncertainties are in concordance with the results reported by López Fune et.al. [21], where for the Exponential Disk and in the case of the dark matter halo. With this example, it was possible to show a set of results with high reliability in the use of this routine, and for this reason in the next section Galrotpy and Gallenspy are combined for the mass reconstructions of two disk-like galaxies.
7 Mass Reconstruction of galaxies J2141 and J1331
The galaxies SDSSJ2141-001(J2141) and SDSSJ1331+3628(J1331) are systems that show strong lensing effect, its rotation velocities data were given by Dutton et.al. [3, 5]; for these mass reconstructions the profiles of Miyamoto-Nagai, Exponential Disk, and NFW were taken into account [8, 1]. Regarding the GLE, in the case of J2141 an extended circular source was modeled considering that the deflected image is an arc, while for J1331 it was considered a punctual source in which four images are produced in the lens plane.
As to the mass distribution of these galaxies, other authors have reported a high contribution of baryonic matter [5, 3] and this coincides with the obtained results in the use of Galrotpy and Gallenspy.
7.1 Galaxy J2141
J2141 is a type S0 spiral galaxy, with a dominant gravitational contribution coming from its disk[5]. This object was initially observed in 2006 by means of the Hubble Spatial Telescope(HST)[5], with an ACS camera in a F814 filter and an exposure time of 420 seconds. In 2009 the Keck telescope took again images of these object with a NIR camera and K filter.
From these images the GLE in this galaxy was evidenced, with the formation of an arc belonging to a source with a redshift different to J2141 (,)[5], for this reason it was considered important to study the mass distribution of this galaxy.



The rotational velocity data of this galaxy was derived from spectral lines Mg b 5177, Fe II5270, Na D 5896, O II 3727 and 6563, obtained from the Keck telescope. In figure 18(b), the inclination of these emission lines are shown for the case of 6563.
Table 4 contains the rotational velocity data for different values of galactocentric radius.
Radius(arcsec) | Radius(kpc) | Velocity(km/s) | Error(km/s) |
---|---|---|---|
0.000 | 0.00 | 3.5 | 5.3 |
0.593 | 1.45 | 114.1 | 5.8 |
1.185 | 2.89 | 153.8 | 2.9 |
1.778 | 4.33 | 212.7 | 2.6 |
2.370 | 5.78 | 243.8 | 2.6 |
2.963 | 7.22 | 259.8 | 2.3 |
4.148 | 10.11 | 254.9 | 7.5 |
4.740 | 11.56 | 263.4 | 2.3 |
5.333 | 13.00 | 265.9 | 3.5 |
7.1.1 Data concerning the GLE
For the coordinates of the arc in the lens plane (), a restriction of its contours was made in the way of lower the computational cost in Gallenspy.
This image treatment was made in python, trough a pixel to pixel discrimination based on its position and luminosity, which makes it possible to get the contour showing in figure 19.

As it is possible to observe, this obtained contour is incomplete given the noise of image 18(a), even so, the number of obtained coordinates was enough for an appropriate adjustment with a circular source.
In this case the equivalence between arc seconds and pixels was made based on the observed scale of figure 18(a), and in this way it was possible to get each coordinate of the image in radians as observed in figure 19.
For the determination of cosmological distances, the CDM model was assumed due to the fact that it has been used by other authors in this galaxy [5]; in this way the current matter density is and the Hubble parameter .
With these considerations, the cosmological distances given by Dutton et al. [5] are , and ; which leads to .
In relation to the source, its ranges of possible values for the position and the radius are displayed in table 5.
Parameter | Range | Units |
---|---|---|
Radius | 0.05<r<1.5 | arcs |
x-center | -2.5<h<2.5 | arcs |
y-center | -2.5<k<2.5 | arcs |
7.1.2 Mass reconstruction of J2141.
In this mass reconstruction, the profiles selected in table 1 were Bulge I, Exponential Disk, and NFW. The first parametric exploration was done with Galrotpy, where the more reliable result for the MCMC was obtained for a number of 100 walkers and 1500 steps. The parametric exploration roads are shown in figures 20, 21 and 22.






In these graphics, the initial values of the MCMC are in red lines, whereas for the dark matter halo and bulge is not evidenced a convergence of the values; this is pointed out by Dutton as the problem of degeneracy among the disk and the different mass components of the galaxy.[5]
These authors [5] affirm that the main reason of this degeneracy is the gravitational dominance of the disc in this system, to adress this problem, it is possible to adjust the rotation curve only with the profile of this mass component. Therefore it is very difficult to know with clarity the circular velocity contribution of other components.
Because of this situation, this mass reconstruction was done through the integration of galactic dynamics and GLE, where the restrictions of each method occur in different geometries. Therefore this combination is a powerful tool to break this degeneracy.
In this way and with the arc coordinates, the parameters of the source were estimated as shown in figure 23(a) under a lens model of Exponential Disk, where these values are presented in table 6 with a source radius of 0.03.
Parameter | ||
---|---|---|


With the position and size of the source, the mass reconstruction of J2141 based on the GLE was done with the restrictions obtained of the rotation curves in relation with the parametric space. For this specific case, the amplitude of the parametric exploration established was three times of the table 1.
The combination of lensing and Galactic Dynamics was a very efficient process in breaking of the degeneracy between the mass components of J2141, this allowed a lower mass density value for the disc as it is shown in figure 24. Based on the result, it is important to point out how the combination of Galrotpy and Gallenspy is a great alternative for galaxies where the gravitational contribution of each mass component is not easy to distinguish.

In table 7 the parameters and its uncertainties are consigned, where the parameters with major dispersion belong to NFW profile, which is related to the degeneracy of this system.
Parameter | ||
NFW | ||
Exponential Disc | ||
Miyamoto-Nagai | ||
Based on the values of these parameters, the Einstein ring and Einstein radius were computed. In figure 23(b), this curve obtained by Gallenspy is evidenced, where the Einstein radius presented a value of .
The compute of enclosed mass for J2141, was done taking into account the relation:
(24) |
Table 8 shows the estimated values.
Parameter | |
---|---|
These results are in concordance with the range of values given by Dutton et al. [5], where they reported for J2141 a value of within the Einstein radius.
The results obtained in this work show separately mass estimation of the bulge and disc, different from results of Dutton et al., where they obtain the stellar mass without discriminating each contribution of these baryonic matter components. These mass values are shown in Table 9, and the fitting made to the rotation curve and arc generated in the GLE with these results is illustrated in images 25(a) and 25(b).
Component of the galaxy | |
---|---|
Bulge | |
Disk | |
Dark Matter Halo |


In the rotational curve’s fitting, it is possible to evidence how the dark matter halo is gravitationally dominant in a radius less than , this observation could be done due to the combination of GLE and galactic dynamics, since the generated arc is in a near radius to this galaxy zone and therefore the combination of restrictions between Gallenspy and Galrotpy is a great option.
7.2 Galaxy J1331
SDSSJ1331+3628 (J1331) is a spiral galaxy with a counter-rotating massive core [3], where just like J2141, the inclination of this galaxy allows to get its rotational velocity values in function of the galactocentric radius.
J1331 is localet in RA = 202.9188∘ and DEC = 36.469990∘, and in the observation of this system Treut et.al (2011) [22] observed 2 distinct redshifts within a radius of 1 arcs (), given the GLE in this galaxy.
The images of this galaxy, were obtained by means of the SWELLS(Sloan WFC Edge-on late-type lens survey)(WFC-Wide Field Camera)[23]; In figure 26 these images are illustrated with the HST telescope in the F450W and F814W filters, where the high size of its core is evidenced, for this reason in the right side it is evidenced a slit done by Trick et. al [3], where they reconstructed the brightness surfaces.

The images produced for the GLE are shown in figure 27(a), which are labeled with letters A,B,C y D, also it is important to clarify that the other 3 unlabeled images do not belong to this group, since according to what Trick et.al indicate[3] these are part of a stellar formation region.
Regarding dynamical aspect of J1331, Dutton et al.(2013) obtained its rotational velocity values with the use of Keck I telescope by means of a LRIS spectrograph (Low Resolution Imaging Spectrograph)[3], where these data were obtained of the absortion lines Å), Å) and Å), while the gas velocity was estimated with emision lines Å) and Å).


An important aspect of J1331 is its supermassive core, according to what is exposed by other authors [3] about half the brightness is enclosed in the effective radius illustrated in figure 27(b). For this reason, this galaxy has been and object of interest in different works [22, 24], where a possible merger event in the past of this system which changes its structure and kinematics is speculated.
7.2.1 Mass reconstruction based on the GLE
Unlike J2141, the mass profiles for J1331 within its core can not be used by Galrotpy, due to the rotational negative velocity values present in this part of the galaxy.
Therefore, the galaxy region enclosed in the effective radius was analyzed totally with lensing, such that the only restrictions applied in Gallenspy are in the parametric ranges used with Galrotpy for the fitting of the rotation curves in close radii to the galaxy periphery.
In this way, other authors note how the breaking of the degeneracy is not an easy task [3, 4], and even if different advances have been obtained this objective has not been achieved yet.
The observational data of the images (A-D) are consigned in table 10, where it was necessary to express these coordinates in arcs for a scale pixel arcs.
Coordinates | A | B | C | D | G |
---|---|---|---|---|---|
12.1 | -8.5 | 21.7 | -3.3 | 0.5 | |
16.6 | -10.4 | -0.5 | 19.2 | 0.5 |
For the determination of the cosmological distances, the redshifts were taken into account in the numerical solution to the Dyer-Roeder equation [10], which Gallenspy carries out based on the Jimenez code [25]. For this case, the cosmological model CDM was used. The obtained results were Kpc, Kpc and Kpc.
The next step in Gallenspy was the estimation of the source position, for which the obtained values are in table 11.
Parameter | ||
---|---|---|
In the parameters exploration for the mass reconstruction, the established ranges of the bulges I and II belonging to the table 1 were not enough for the fitting of the observational images, and this is shown in figure 28. For this reason a very massive bulge was considered, where the selected most appropriate profile is of the Miyamoto-Nagai with parametric exploration ranges of thick disc evidenced in table 1.

This process was done in Gallenspy with 100 walkers and 100 steps in the MCMC, and in figure 29 these contours are shown.



Under this estimation, the most appropriate set of parameters for the mass distribution of J1331 obtained with Gallenspy is in table 12, these values allowed to get the fit shown in figure 30(b).
Parameter | ||
NFW | ||
Exponential Disk | ||
Miyamoto-Nagai | ||
With this mass distribution, the critical and caustic curves and the Einstein ring are presented in figure 31(a),31(b) and 30(a) where the Einstein radius and critical radii have values of , and respectively. It is important to point that with this lens model was possible to estimate the mass within the effective radius under which Trick et al. [3] got restrictions for the mass estimation through the luminosity of J1331.


In table 13 the mass values restricted by the Einsten radius are consigned; the results reported by Trick et al. under the lens model that they assumed [3], the Einstein radius estimated is with an enclosed mass of . This is in concordance with the results obtained in this work with Gallenspy.
Mass components | Mass value |
---|---|
Bulge | |
Disk | |
Dark matter halo | |
Einstein Mass |
Regarding the restriction within the critical radius, the values obtained of baryonic and dark matter are and respectively, these results are also consistent with the reported by Trick et al. [5], where for the effective radius these values are for the total mass and of baryonic matter, also it should be clarified that these authors obtain their results with alternative methods to the GLE of J1331[3].
The results obtained with Gallenspy show that this is a very effective tool for the mass reconstructions within the critical curve and Einstein radius. However for J1331, the estimation is not enough with radii greater than arcs, and therefore in this case Galrotpy was used.
In other works [3, 4] it is evidenced how the mass reconstructions for J1331 from a dynamics analysis have many complications due to the complexity of its rotation curve. This is the reason why Trick et al. [3] restricted this mass reconstruction to the effective radius, while Dutton et al. in 2013 [4] dedicated efforts in studying the periphery of the galaxy. Based on what was previously shown, each routine in this work was applied separately in different galaxy regions.
7.2.2 Mass reconstruction of J1331 with Galrotpy
The best result in the fitting of the rotation curve with Galrotpy was made with 20 walkers and 100 steps, wherein the image 32 the contours of each parameter obtained are presented in figure 33.

In table 14 are presented these values and its uncertainties for each parameter. The estimated mass distribution with these indicated parameters was restricted to 7.56 arcs (in this radius are all data of rotational velocity), and therefore the enclosed mass in this amplitude was estimated in where the baryonic matter has a value of .
Parameter | ||
NFW | ||
Exponential Disk | ||
Miyamoto Nagai | ||
The results given by Dutton et al. in 2013 [4] indicate that the baryonic matter in this radius is of which is in concordance with the result obtained through of Galrotpy. Also, it is important to note, the great relation in the estimation of the bulge mass, where they report a value of and in this work the obtained value is .

7.2.3 Analysis of the mass reconstruction for J1331
From the mass reconstructions performed for this galaxy with Galrotpy and Gallenspy, it follows that about of the 78% of the mass of J1331 is enclosed in the effective radius, this confirmed the presence of a supermassive core, which due to presenting a negative direction in its rotation opens the possibility to think that this galaxy is the result of a merger process between two stellar systems, with angular momentum oriented in distinct orientations.[3]
Also it is important to mention the high effectiveness of Galrotpy in this process, where the obtained results for radii close to the galaxy periphery were very successful in comparison with the results of Dutton et al. in 2013 [4], all this taking into account that these estimations were done with the fitting from just 3 values of rotational velocity.
Besides, it is important to remember that the degeneracy between the disc and halo is still a research topic [3, 4], and for this reason, the possibility of adjusting Galrotpy for negative values of the rotational velocity is open, since this would allow to combine lensing and galactic dynamics for similar galaxies to J1331.
8 HE 0435-1223 test case
An additional case of tested for Gallenspy was the Quasar HE 0435-1223, in which the GLE is evidenced through a quadruply imaged belonging to a background source [26]. HE 0435-1223 was discovered by Wisotzki et al. (2000) and since then it has been a research object in distinct works[26].

Figure 34 shows these formed images by means of GLE, where the redshifts of the lens and source are and respectively, with a value of for the Einstein radius.
Based on these redshifts value, the cosmological distances estimated by Gallenspy are , and . Also it is important to point out that the positions of the images formed in the GLE were obtained from Courbin et al.(2011) [26], and in this way it was possible to perform the mass reconstruction for this quasar with the Exponential Disk and NFW profiles, where the estimated parameters are presented in table 15.
Parameter | ||
NFW | ||
Exponential Disk | ||
With these parameters, the obtained images are illustrated in figure 35, where the values of baryonic and dark matter are consigned in table 16. The results given by Courbin et al.(2011) for this system, reveal that the total mass of this quasar is of which is very close to the obtained value in this work, other important aspect is the baryonic matter fraction which in this work is of while Courbin et al.(2011) reported with the Sapelter IMF; in this way it is possible to confirm that Gallenspy is an efficient tool.
Mass | Value |
---|---|
Baryonic | |
Dark | |
Einstein Mass |

9 Conclusions
In this work the Gallenspy code was presented, which is very useful in mass reconstructions based on GLE; in this way it is important to highlight, the way in which this routine allows to obtain the mass distribution of bulge and disc separately unlike to the methods of reconstruction applied by other authors [5, 3, 4].
Also, the advantages of combining Lensing and Galactic Dynamics were illustrated with the use of Galrotpy and Gallenspy, in this case, with the restrictions given by each routine, it was possible to have significant progress in breaking the degeneracy in J1331 and J2141. Additionally, Gallenspy was used for J1331 in the mass reconstruction within the critic radius, while with Galrotpy the peripheral region was analyzed and although this degeneracy could not be broken completely, the estimated parameters have concordance with the obtained results of other authors [3, 4]. This gives reliability to the constructed routines.
On the other hand, it is important to highlight the use of mass models with spherical symmetry, the ones are used by distinct authors [27] [26], and which allows to get results as in mass reconstructions as in estimations of Hubble parameter.
Regarding future improvements for Gallenspy, the increase in the number of mass profiles used in this routine is considered, besides there is the possibility of extending this code for reconstructions of superficial brightness functions in lens galaxies, like the estimation of temporary cosmological delays for the study of the universe expansion.
Finally it is important to mention the advantages of performing visuals fitting with Galrotpy and Gallenspy for rotation curves and GLE, since through this process it is possible get the initial set of values for the MCMC in both routines.
References
- Granados et al. [2021] A. Granados, D. Torres, L. Castañeda, L. Henao, S. Vanegas, Galrotpy: a tool to parametrize the gravitational potential of disc-like galaxies, New Astronomy 82 (2021) 101456.
- López [2020] I. López, Reconstruction of mass profiles in disc like galaxies based on its properties of lensing and rotation curves, Master Thesis, Universidad Nacional de Colombia (2020).
- Trick et al. [2016] W. H. Trick, G. van de Ven, A. A. Dutton, A spiral galaxy’s mass distribution uncovered through lensing and dynamics, Monthly Notices of the Royal Astronomical Society 463 (2016) 3151–3168.
- Dutton et al. [2013] A. A. Dutton, T. Treu, B. J. Brewer, P. J. Marshall, M. Auger, M. Barnabè, D. C. Koo, A. S. Bolton, L. V. Koopmans, The swells survey–v. a salpeter stellar initial mass function in the bulges of massive spiral galaxies, Monthly Notices of the Royal Astronomical Society 428 (2013) 3183–3195.
- Dutton et al. [2011] A. A. Dutton, B. J. Brewer, P. J. Marshall, M. W. Auger, T. Treu, D. C. Koo, A. S. Bolton, B. P. Holden, L. V. Koopmans, The swells survey–ii. breaking the disc–halo degeneracy in the spiral galaxy gravitational lens sdss j2141- 0001, Monthly Notices of the Royal Astronomical Society 417 (2011) 1621–1642.
- Castañeda [2003] L. Castañeda, Efecto de la constante cosmológica en la probabilidad de lentes gravitacionales., Master Thesis, Universidad Nacional de Colombia (2003).
- Schneider P. [1999] F. Schneider P., Ehlers J., Gravitational Lenses., volume 1, Springer Science+Business Media, 1999.
- Binney and Tremaine [2011] J. Binney, S. Tremaine, Galactic dynamics, Princeton university press, 2011.
- Binney and Tremaine [1994] J. Binney, S. Tremaine, Galactic dynamics, volume 20, Princeton university press, 1994.
- Hurtado [2014] R. Hurtado, Perfil de masa de abell 370 a partir de sus propiedades como lente gravitacional., 2014.
- Koopmans L. V. E. [1998] J. N. Koopmans L. V. E., de Bruyn A. G., The edge-on spiral gravitational lens b1600+434, MNRAS 447 (1998) 295–534.
- Van Der Walt et al. [2011] S. Van Der Walt, S. C. Colbert, G. Varoquaux, The numpy array: a structure for efficient numerical computation, Computing in science & engineering 13 (2011) 22–30.
- Barrett et al. [2005] P. Barrett, J. Hunter, J. T. Miller, J.-C. Hsu, P. Greenfield, matplotlib–a portable python plotting package, in: Astronomical data analysis software and systems XIV, volume 347, 2005, p. 91.
- Bovy [2015] J. Bovy, galpy: A python library for galactic dynamics, The Astrophysical Journal Supplement Series 216 (2015) 29.
- Foreman-Mackey et al. [2019] D. Foreman-Mackey, W. Farr, M. Sinha, A. Archibald, D. Hogg, J. Sanders, J. Zuntz, P. Williams, A. Nelson, M. de Val-Borro, T. Erhardt, I. Pashchenko, O. Pla, emcee v3: A Python ensemble sampling toolkit for affine-invariant MCMC, The Journal of Open Source Software 4 (2019) 1864. doi:10.21105/joss.01864. arXiv:1911.07688.
- Foreman-Mackey [2016] D. Foreman-Mackey, corner.py: Scatterplot matrices in Python, The Journal of Open Source Software 1 (2016) 24. doi:10.21105/joss.00024.
- Huijser et al. [2020] D. Huijser, R. MEYER, B. BREWER, G. LEWIS, Bayesian Statistics in Astronomy, Ph.D. thesis, University of Auckland, 2020.
- Bartelmann [2003] M. Bartelmann, Numerical methods in gravitational lensing, arXiv preprint astro-ph/0304162 (2003).
- Robitaille et al. [2013] T. P. Robitaille, E. J. Tollerud, P. Greenfield, M. Droettboom, E. Bray, T. Aldcroft, M. Davis, A. Ginsburg, A. M. Price-Whelan, W. E. Kerzendorf, et al., Astropy: A community python package for astronomy, Astronomy & Astrophysics 558 (2013) A33.
- Corbelli et al. [2014] E. Corbelli, D. Thilker, S. Zibetti, C. Giovanardi, P. Salucci, Dynamical signatures of a cdm-halo and the distribution of the baryons in m 33, Astronomy & Astrophysics 572 (2014) A23.
- López Fune et al. [2017] E. López Fune, P. Salucci, E. Corbelli, Radial dependence of the dark matter distribution in m33, Monthly Notices of the Royal Astronomical Society 468 (2017) 147–153.
- Treu et al. [2011] T. Treu, A. A. Dutton, M. W. Auger, P. J. Marshall, A. S. Bolton, B. J. Brewer, D. C. Koo, L. V. Koopmans, The swells survey–i. a large spectroscopically selected sample of edge-on late-type lens galaxies, Monthly Notices of the Royal Astronomical Society 417 (2011) 1601–1620.
- Brewer et al. [2012a] B. J. Brewer, A. A. Dutton, T. Treu, M. W. Auger, P. J. Marshall, M. Barnabè, A. S. Bolton, D. C. Koo, L. V. Koopmans, The swells survey–iii. disfavouring ‘heavy’initial mass functions for spiral lens galaxies, Monthly Notices of the Royal Astronomical Society 422 (2012a) 3574–3590.
- Brewer et al. [2012b] B. J. Brewer, A. A. Dutton, T. Treu, M. W. Auger, P. J. Marshall, M. Barnabè, A. S. Bolton, D. C. Koo, L. V. Koopmans, The swells survey–iii. disfavouring ‘heavy’initial mass functions for spiral lens galaxies, Monthly Notices of the Royal Astronomical Society 422 (2012b) 3574–3590.
- Orlando [2020] J. C. J. Orlando, Retardo cosmológico temporal en modelos de energía oscura., 2020.
- Vuissoz et al. [2008] C. Vuissoz, F. Courbin, D. Sluse, G. Meylan, V. Chantry, E. Eulaers, C. Morgan, M. Eyler, C. Kochanek, J. Coles, et al., Cosmograil: the cosmological monitoring of gravitational lenses-vii. time delays and the hubble constant from wfi j2033–4723, Astronomy & Astrophysics 488 (2008) 481–490.
- Schneider and Sluse [2013] P. Schneider, D. Sluse, Mass-sheet degeneracy, power-law models and external convergence: Impact on the determination of the hubble constant from gravitational lensing, Astronomy & Astrophysics 559 (2013) A37.