email: [email protected] 22institutetext: National Astronomical Observatory of Japan, Tokyo, 181-8588, Japan
TDCOSMO XIV: Practical Techniques for Estimating External Convergence of Strong Gravitational Lens Systems and Applications to the SDSS J0924+0219 System
Abstract
Context. Time-delay cosmography uses strong gravitational lensing of a time-variable source to infer the Hubble Constant. The measurement is independent from both traditional distance ladder and CMB measurements. An accurate measurement with this technique requires the consideration of the effects of objects along the line of sight outside the primary lens, which is quantified by the external convergence (). In absence of such corrections, will be biased towards higher values in overdense fields and lower values in underdense fields.
Aims. We discuss the current state of the methods used to account for environment effects. We present a new software package built for this kind of analysis and others that can leverage large astronomical survey datasets. We apply these techniques to the SDSS J0924+0219 strong lens field.
Methods. We infer the relative density of the SDSS J0924+0219 field by computing weighted number counts for all galaxies in the field, and comparing to weighted number counts computed for a large number of fields in a reference survey. We then compute weighted number counts in the Millennium Simulation and compare these results to infer the external convergence of the lens field.
Results. Our results show the SDSS J0924+0219 field is a fairly typical line of sight, with median and standard deviation .
Key Words.:
methods: data analysis, gravitational lensing: strong, gravitational lensing: weak, cosmology: cosmological parameters, cosmology: distance scale1 Introduction
One of the most important problems in modern cosmology is the so-called Hubble Tension: the name given to an apparent discrepancy between the value of the Hubble Constant () inferred from the Cosmic Microwave Background assuming the standard -CDM cosmological model (e.g. Aghanim et al., 2020), and the value inferred from Cepheid-calibrated Type Ia supernovae. (e.g. Riess et al., 2021). The solution to this discrepancy may involve unknown systematics, new physics, or some combination of the two. Work on the resolution is ongoing, but having independent methods for inferring the value of the Hubble constant is critical for solving the problem. Such methods include using the tip of the red giant branch to calibrate supernovae,(Freedman et al., 2019) and BAO+BBN (Cuceu et al., 2019), among others. Here we consider Time Delay Cosmography, which uses strong gravitational lensing of time-variable sources (usually quasars) to infer the value of .
TDCOSMO is an international collaboration which aims to use strong gravitational lensing to infer the value of with sub-percent precision. A typical lens in the TDCOSMO sample involves a source quasar being strongly lensed by a foreground galaxy, producing four images. When the quasar’s luminosity varies, this variation appears in each of th eimages at different times. The ”time delay” between two images depends on the mass distribution of the lens, and the time-delay distance:
(1) |
where is the redshift of the lensing galaxy (or ”deflector”), and , and are the angular diameter distances to the deflector, source, and from the deflector to the source, respectively. Given a model of the lens and a measurement of the time delays, it is possible to infer the time-delay distance and therefore .
When analysing a strong lens, there are a number of sources of uncertainty that propagate to the final inferred value of (see Millon et al., 2020, for a more complete overview). Among these are so-called environmental effects: gravitational bodies besides the primary lens that affect the lensing observables and, by proxy, the inferred value of . Accounting for these effects is crucial in improving the precision of the inferred measurement. Broadly speaking we treat weak perturbers differently from strong ones, with the difference being determined with the ”flexion shift” formalism (see for example Buckley-Geer et al., 2020; Sluse et al., 2019; McCully et al., 2017).
In this paper, we focus on the techniques for inferring the cumulative effect of all weak perturbers along the line of sight to the source quasar. In principle, an ”ideal” analysis would include these perturbers in a complete mass model of the system, rendering the analysis we do here unnecessary. While this may be possible for a few systems where high-quality spectroscopic data of the perturbers is available, it does not scale well to the large number of strong lensing systems we aim to analyze in the future. Instead of building a complete model, we compare the field of interest to some suitably large reference field, with the goal of estimating the relative density of the field as compared to the universe at large. This is a purely statistical analysis. In this paper, we will discuss the current state of this technique, apply it to the field around the SDSS J0924+0219 lens system (hereafter J0924, see section 4.1), and discuss how it might be iterated upon in the future. The cumulative effect of all weak perturbers is parameterized by the external convergence, denoted .
While controlling uncertainties on individual lens systems is crucial, the precision of the measurement can be improved by including many lenses in the final inference. Of course, this is much easier said than done as the amount of work required to fully analyze a single lens is significant. However in the modern era of data-driven astronomy, the amount of available data is increasing by orders of magnitude and developing tools for efficiently analyzing these datasets is a top priority. To that end, we introduce lenskappa, a new package designed specifically for the types of environment analysis discussed in this paper, but with broader applications. lenskappa is built on top of heinlein, a data management library designed for use with large astronomical survey datasets. At present heinlein and lenskappa support Subaru Hyper Suprime Cam Strategic Survey Program (HSC-SSP; Aihara et al., 2019), the Dark Energy Survey (Collaboration, 2005), and the CFHT Legacy Survey (Gwyn, 2012).
This paper is organized as follows: In Section 2, we outline the fundamentals of Time Delay Cosmography and the basic process used to compute a value of for a generic lens system. In Section 3 we discuss the datasets used in our analysis, and introduce lenskappa. In Section 4, we report the results of our analysis of the J0924 field obtained using lenskappa. In Section 5 we discuss our results and look forward to later work.
2 Summary of the technique
At a high level, gravitational lensing is the result of the underlying mass distributions of the universe, with greater concentrations of mass resulting in more significant lensing. In general, it is difficult to assess the impact of any one mass structure on the image of some background object. Strong lenses are naturally an exception, which occurs when a single, high-mass object falls on (or nearly on) the axis drawn between an observer and some background source. However we are seeking to understand the total lensing effect of many additional objects, each producing a tiny effect on the lensing observables. As light passes through the universe, the amount of lensing it undergoes will be determined by the relative concentration of mass along its full path of travel. Our analysis therefore seeks to infer the effects of the mass distributions in our line of sight by comparing it to many lines of sight in the universe. By determining how close this line of sight is to the average line of sight in the universe, we can place constraints on its impact on our primary lens observables. In this section, we introduce the basics of time delay cosmography and describe the technique we use to estimate for a generic lens system. For a more complete overview, we refer the reader to Treu & Marshall (2016) and Birrer et al. (2022).
2.1 Fundamentals of Time Delay Cosmography, and Strong vs. Weak Lensing
Time delay cosmography focuses on strong lensing of time-variable sources, usually a quasar. As the luminosity of the source varies, this variation appears in each of the several images of the source, but not at the same time. The time delay between any two images can be written as follows:
(2) |
where represents the angular position of an image on the sky, represents the actual (unobservable) angular position of the source on the sky, and is the scaled lensing potential. The first two terms are a result of the different distances traveled by the light for the two images, while the later two terms are the difference in the Shapiro time delay. The goal of a complete cosmographic analysis is to infer the time-delay distance (see eq. 1). Using measurements of the time delay combined with a robust model of the lensing galaxy it is possible to measure the time delay distance and, therefore, the Hubble constant.
The multiple images observed in such a system are en example of strong gravitational lensing. Qualitatively, strong lensing is any lensing which produces multiple images of some background object. Quantitatively, strong lensing occurs whenever the local density of the lens is greater than the lensing critical density:
(3) |
For a given perturber, the convergence at a given location is defined as the local density in units of the critical density:
(4) |
For , strong lensing does not occur. Instead, mass distributions with result in magnification or demagnification of the image of the background object. This is the situation for the perturbers along the line of sight in our system that are not included in the primary lens model, though we note that some perturbers that meet this criterion are included in the mass model based on their flexion shift (see section 2.2), and therefore excluded from our statistical analysis. However, the effect of the pertubers we do include in the estimate discussed here is not directly observable because the actual angular size of the background object is not known.
We quantify the cumulative effect of all perturbers (not including those incorporated into the primary lens model) and voids along the line of sight with the external convergence, . Conceptually, the value of is the convergence of a mass sheet which, if placed coplanar to the primary lens, would produce the same magnification or demagnification as the perturbers do collectively. The external convergence is defined relative to that of a line of sight where the mass distribution is smoothly distributed with a density equal to the global mass density of the Universe. Therefore positive values of represent lines of sight that are overdense with respect to the overall density of the Universe, while underdense lines of sight have negative values.
These perturbers can also produce shear, denoted , which results in stretching and distorting of the image of the source. However, this effect can be estimated in the primary lens model, as it affects the location of the the images and the shape of the Einstein ring (if present). We use the constraint from the lens model in our analysis as an additional constraint (see section 2.6)
Assuming can be measured, it serves as a correction factor to the computed value of the time delay distance:
(5) |
where represents the uncorrected value of the time delay distance. This propagates directly to the inferred value of the Hubble constant by
(6) |
where is the value of the Hubble Constant inferred before correcting for the environment. We see therefore that in the absence of the appropriate corrections, the inferred value of Hubble constant would be biased towards higher values in an overdense field, and lower values in an underdense field.
We now review the techniques we use to compute the value of for a generic lens system.
2.2 Relevant Perturbers in the Line of Sight
To start, we identify objects along the line of sight that contribute to . We separate objects into strong and weak perturbers, using an operational definition discussed below. Strong perturbers are generally close to the center of the field or agalaxy group (see for example Sluse et al., 2019; Fassnacht et al., 2006). Strong perturbers are included explicitly in the mass model of the lens, while weak perturbers are treated statistically. To separate these, we use the flexion shift formalism, first proposed in McCully et al. (2017). The flexion shift of an object is given by
(7) |
where and are the Einstein radii of the main lens and perturber respectively, and is their angular separation. The quantity is given by
(8) |
where
(9) |
and where , , , and are the angular diameter distances from the deflector to the perturber, to the source, to the perturber, and from the deflector to the source. The flexion shift roughly measures the perturbations to the images of the source due to 3rd order terms from the perturber. Ultimately, what constitutes a ”weak” or ”strong” perturber is somewhat arbitrary, but there this is a clear trade-off between the improvement from including a particular perturber in the mass model and the amount of work required to do so. McCully et al. (2017) recommends using as the cutoff between strong and weak perturbers to ensure a bias on .
2.3 Comparison Datasets
The first step in determining the value of is comparing the field of interest to a large number of lines of sight from some large reference field. This comparison gives us an empirical estimate of the relative matter density of the lens field as compared to all lines of sight in the universe. The reference field should be large enough to avoid sampling bias. For a small comparison field (on the order of a few ) statistical overdensities or underdensities may occur (see for example Fassnacht et al., 2010). However modern survey datasets are available which cover hundreds to thousands of square degrees, allowing us to use a sufficiently large comparison field to avoid sampling bias (see section 4.2 for a discussion of our choices for this analysis). Ideally the data for the reference field and lens field are taken by the same instrument and processed by the same analysis pipeline. This turns out to be the case for the analysis of J0924 discussed later in this paper, but will not be true in general. At a very minimum we seek data with at least one band in common, with deep enough observations to produce meaningful results. When comparing the survey dataset to our line of sight, we set a magnitude cut and remove any objects from both datasets fainter than this cut. Previous work (see Collett et al., 2013) has suggested that represents a good limit, as setting a fainter limit does not appear to meaningfully impact the results of this style of analysis. This limit is also bright enough to be well above the detection limits of modern sky surveys, ensuring reliable photometry.
Once the appropriate data are in hand, it is important to consider which objects should be used in the comparison. It is important to set a magnitude cut that will remove objects too close to the detection limit of the instrument for photometry to be reliable, while still leaving enough data to make robust estimates of the relative density. However setting too bright of a limit will result in having too few objects to compare to.
Additionally, we cut out all objects with a redshift greater than the redshift of the source quasar, as these objects will not affect the path of the light as it travels from the quasar to our telescopes.
2.4 Weighted Number Counts of Lens Field
Because the value of cannot be directly measured, we first define tracer quantities that can be computed directly from the available data. By comparing the value of these quantities in the lens field to the value of the identical quantity computed for a large number of reference fields, we obtain an empirical estimate of the relative density of the line of sight of interest. As a first approximation, we expect the greatest contribution to from massive objects close to the center of the line of sight. The primary mass contribution in any line of sight will be dark matter halos, but these are not directly observable. To quantify the contribution from these weak perturbers, we compute weighted number counts of the visible structures (i.e. galaxies) in the lens field as compared to a large number of reference fields. This technique has been used extensively in previous work (Fassnacht et al., 2006; Suyu et al., 2010; Greene et al., 2013; Buckley-Geer et al., 2020) . To do this, we select a region of interest around the lens and compare it to a large number of identically-shaped fields selected at random from the reference survey. At each step, we compute the ratio of the weighted number counts for the galaxies in the lens field to the identical statistic computed in the given reference field. For the given step, the value of the weight is therefore:
(10) |
Where indexes the reference fields, indexes the galaxies in a given field, and is the value of the weighted statistic for the given galaxy.
Following Rusu et al. (2017) we also consider a second style of weighting that improves our results. Instead of summing the value of weights for all objects in the field, we instead compute the weight for a given field as where is the number of galaxies in the given reference field and is the median value of the weight for all galaxies in the reference field. Doing this helps avoid situations where single objects dominate the sum in a particular line of sight. This is especially important for weights involving stellar mass and the inverse seperation. In this scheme, the value of the weight for the given reference field is therefore
(11) |
There has been discussion in the literature about which are the best weights to consider for the most robust determination of (Greene et al., 2013; Rusu et al., 2017, 2019). In this work, we only consider a subset of the weights considered in previous works (see Table 1).
Name | Value | Symbol |
---|---|---|
Number Count | ||
Inverse Distance | ||
Potential | ||
Redshift | ||
z/r |
2.5 Weighted Number Counts in Simulated Data
In order to determine the posterior distribution of for the given system, it is necessary to compare the weighted number counts to similar counts obtained from a reference field for which is known. We use a simulated dataset for this purpose. The simulation must contain several components in order to be suitable for this analysis. First, it must contain catalogs of galaxies with known luminosity and redshift. Second, values of the external convergence must be measured at a suitably large number of points to be representative of the universe at large. Rusu et al. (2017) examined possible biases from inferring using the number counts method in the Millennium Simulation, and found these methods produced a good estimate of . We discuss our choice of simulation further in section 4.3. Because this technique involves ratios, much of the dependence on the simulation’s underlying cosmological parameters should cancel out. However, ensuring this would require a second simulation with the attributes described. An exciting development in this space are the initial results from the MillenniumTNG (Hernández-Aguayo et al., 2022). Full weak-lensing convergence maps are planned, but not yet available.
2.6 From Weighted Number Counts to
We now have weighted number counts for the lens field itself and for a large number of fields in a simulated dataset, each of which is associated with a value of . We seek to compute ): the probability distribution of given the data. We can replace this with the joint probability distribution of and the data as follows:
(12) |
After some work it can be shown (see Rusu et al., 2017)
(13) |
Where is the probability distribution of given weighting scheme given the data, and is the probability distribution of in the simulated dataset, given a particular value of the weight. Here, it is assumed that the simulated dataset is the correct prior for the observable universe. In other words, that it correctly relates values of weights to values of
Additionally, a constraint on based on can be included, which accounts for the expected correlation between these two values. In general, is a two-dimensional vector on the plane of the sky, but we use only the overall magnitude in our analysis. is a parameter that can be fitted in the primary mass model of the lens. We use just as we would a weighted number count distribution. For any range of values of , we can construct a histogram of the value of for all lines of sight with values of that fall in this range. We then weight the contribution from these lines of sight by , which is the posterior on inferred from the mass model.This provides a prior on that can meaningfully affect the final result. In section 5, we present results both with and without using as a constraint.
In previous work (e.g. Rusu et al., 2017), this full probability distribution for each weight was replaced by a normal distribution centered on the median of the full weight distribution, with a width determined by examining measurement uncertainties. In practice, this width was much smaller than the width of the actual distribution. This is cheaper computationally, but ignores covariance between the various types of the weights. While the increase in computation time is significant, the majority of the important decisions in the analysis are made when we compute weighted number count ratios, and using this method does not meaningfully increase our time-to-result
Since all the individual weights are measured at the same sequence of randomly-drawn fields, we can construct a full m-dimensional probability distribution where m is the number of weights being considered. We then explore this probability distribution when implementing the formalism described above. Formally, the posterior on becomes:
(14) |
When computing this quantity, we split the m-dimensional probability distribution into m-dimensional bins. We have also tested this procedure bins and see consistent results for the J0924 field. With significantly more bins, the computational time balloons and the number of fields in each bin drops significantly, even near the center of the distribution. The value of is simply the number of lines of sight in the reference survey that fall in this bin divided by the total number of lines of sight being considered. Given the large numbers of lines of sight we consider, the distributions are smooth and it may be possible to model them explicitly and explore the distribution with an MCMC, but we save this for a future analysis. The exception to this is the pure unweighted number counts in a aperture, due to the fact that the ”weight” is integer valued and the number of galaxies in the aperture is relatively modest.
For we construct a histogram of the measured values of for all lines of sight from the simulated datasets that fall within the given bin, normalized by the number of lines of sight in the bin. Without this normalization, values near the mean of the simulation will always be weighted more heavily because there are comparatively more of them. Our choice of simulation is discussed in section 4.3
The inputs to our analysis code include the full weight distributions for the lens field, the weights computed from the simulated dataset, and the maps for the simulated dataset for the source redshift. We iterate over the probability distribution discussed above, computing a histogram of the values of in each m-dimensional bin. The overall histogram is the sum of these histograms, weighted by the value of the weight distribution in that bin.
2.7 Comparison to Other Methods
There are other methods for estimating which have been explored as discussed below. Ultimately many of these techniques involve a trade-off between speed of analysis and precision of the final result. Our goal is explicitly to design and implement techniques that allow us to analyze hundreds or even thousands of lens systems in a reasonable amount of time, with the goal of combining full results (including lens modeling, and time delay measurements) from many lenses to make some final statement about the value of . Because of this, a technique with slightly less constraining power for a single lens is tolerable if it can be performed and iterated on rapidly. A few other techniques for estimating are discussed below. While all show promise, and are interesting for their own sake, none show a significant enough improvement to justify the increased time and complexity of analysis, at least in the context of our stated large-scale goals.
2.7.1 Weak Lensing Analysis
While the value of at any given point on the sky is not observable, can be measured by looking a distortions in the shapes of galaxies in the line of sight. Assuming can be measured, techniques such as those presented in Kaiser et al. (1995) can be employed to reconstruct the underlying mass distribution. However this analysis requires extremely high quality data about the morphology of galaxies in the line of sight, as is measured from the extremely small distortions that are present in the images of the galaxies. Obtaining such high quality data, as well as the overhead of analyzing it, represents a significant bottleneck. This analysis was performed in Tihhonova et al. (2018) on the same line of sight analyzed in Rusu et al. (2017). Results between the two methods are consistent, with only modest improvement to precision for the weak lensing analysis.
2.7.2 Explicit Modeling
Building an explicit mass model of all perturbers (or at least, some larger sample) is attractive from a pure astrophysics perspective. This approach was explored in McCully et al. (2017) and demonstrated some success. However, the analysis assumed lines of sight with extensive spectroscopic coverage. While this may be true for some lines of sight, spectroscopy is expensive in time and resources and it is not obvious that the improvement is significant enough to justify this. Furthermore, explicitly modeling a line of sight requires making assumptions about the host halos of the galaxies, a potential source of additional bias.
2.7.3 Machine Learning Methods
An additional interesting approach using Bayesian graph neural networks (BGNNs) is presented in Park et al. (2022). This approach was compared to a toy version of the analysis discussed here, using only a single summary statistic instead of a combination of several. The BGNN technique demonstrated greater precision and accuracy over using a single summary statistic on simulated data, however we estimate the difference would be much less significant if the comparison was done against the full line of sight analysis discussed in this work. That said, a more detailed comparison between these techniques would be welcome in the future. Park et al. (2022) also demonstrated a meaningful bias for both techniques in more extreme fields ( and ) due to a lack of similarly extreme fields in simulated datasets to compare to. This is worth examining further, but does not immediately suggest significant improvements from using the BGNN techniques, especially for extreme fields.
3 Datasets, automation, and lenskappa
As with many areas of astronomy, time-delay cosmography is grappling with datasets that are growing at unprecedented rates. There are dozens of known quad lenses which may be suitable for cosmographic analysis, but a full analysis has only been completed on a small fraction of them. Techniques for increasing the rate of analysis are therefore crucial to the continued success of the technique.
While there are many open science questions in Time Delay Cosmography, much of the solution to the rate problem lies in software engineering rather than astronomy. When building for this kind of of analysis, we keep three key questions in mind:
-
•
What is the minimum amount of data required to complete a particular analysis step with sufficient precision?
-
•
How much of the analysis can realistically be automated?
-
•
Do we expect the analysis techniques to change significantly in the future?
The answer to these questions may not be independent. For example, a pipeline that uses less data at the expense of increasing uncertainties on individual systems may be tolerable if it significantly increases the rate at which these systems can be analyzed. The third question is also important. Writing flexible software packages that can easily be updated as analysis techniques evolve usually increase the time to first result, but substantially decrease average time to result in the long run.
Among the various steps required to fully analyze a lens system, the number counts technique discussed in this paper is likely the most straightforward to automate. It is mostly statistical, and the most difficult computational challenge is efficiently filtering a large dataset by location. Furthermore the survey datasets used in this analysis are quite robust, and many of the lens systems fall within one or more survey footprints. This makes the first question a non-issue, at least for a significant fraction of the lenses.
To that end, we introduce lenskappa111https://github.com/PatrickRWells/lenskappa and heinlein222https://github.com/PatrickRWells/heinlein. The goal of lenskappa is to build a tool capable of automating environment analysis to the greatest extent possible, while still providing sufficient flexibility to allow us to iterate on our current methods. lenskappa is in turn built on top of heinlein, which serves as a high-level interface to locally stored astronomical datasets. When computing weighted number counts in lenskappa, the core weighting loop consists of:
-
1.
Select a region of interest from a large survey.
-
2.
Retrieve object catalog and auxiliary data for the region.
-
3.
Compute interesting quantities, using the data retrieved for the region.
A single iteration of this loop is represented in Figure 1

heinlein handles the middle step of this loop. It provides high-level routines for storage, retrieval, and filtering of large survey datasets, as well as intuitive interfaces for interaction between data types (for example, applying a bright star mask to a catalog). heinlein can perform a 120” cone search in the HSC dataset in around 1.5 seconds, without requiring the data be pre-loaded into memory. For later queries of nearby locations, the speed is improved by more than an order of magnitude through caching. This makes heinlein suitable both for interactive use and for the kind of analysis done in lenskappa.
With data retrieval optimized, lenskappa focuses on allowing users to design and implement analyses that operate on large swathes of the sky. The techniques described in this paper, for example, could easily be adapted to build mass maps of the universe as seen in these surveys. However the goal is to work towards a tool which allows for much more flexibility, enabling any analysis that involves calculations done on many small regions within a large astronomical survey. Other applications could include lens finding, though we note that image data is not yet supported in heinlein.
lenskappa includes several features to facilitate this including:
-
•
High-level API for defining analyses
-
•
Plugin architecture for adding new capabilities without modifying the core code.
-
•
Automatic support for any dataset supported by heinlein
3.1 Analyzing modern astronomical survey datasets at scale
One of the big challenges in doing analyses on these kinds of datasets is the need for the computing environments to be close to the data whenever possible. Querying over the internet is useful for assembling datasets, but is not a particularly good solution when analyzing a dataset at scale. Many researchers will not have access to sufficient storage to store these datsets, and it is impractical to expect individual survey teams to provide computing resource for general use. The size of these datasets will enable next-generation analyses, but only with the development of next-generation tools running at scale, which will require computing infrastructure that may not be readily available to many researcher.
We support using cloud computing services to fill this gap. Commercial providers have expanded and matured by leaps and bounds over the last decade, and routinely handle storage and analysis tasks on datasets orders of magnitude larger than the ones being discussed here. Additionally, cloud computing technologies are significantly more accessible then on-premise technology: they require far lower startup costs and can be quickly scaled (to accommodate more users, or bigger jobs) without the bottlenecks that slow down the expansion of on-premise infrastructure.
It is also possible to use cloud solutions as a supplement to already-existing on premise solutions. Holzman et al. (2017) demonstrated this by analyzing data from the Compact Muon Solenoid experiment at massive scale.
In the future, we plan to develop lenskappa and heinlein tools that could be easily deployed onto services like these, providing quick and easy access to large survey datasets in addition to techniques for processing and analyzing that data. The datasets would be stored in the cloud, allowing users to deploy their analyses without worrying about the connection to the underlying dataset. Such an approach has been demonstrated by Kusnierz et al. (2022), which enabled serverless access to ROOT for quick analysis tasks on high energy datasets without the user having to manually retrieve the data. With some work, heinlein will enable this type of analysis by serving as a bridge between computing infrastructure (which could be managed by individual researchers) and the underlying data lake (which could be managed by the survey team). Abstracting away data retrieval will allow researchers to focus on what matters most: designing the analyses they wish to perform and interpreting results.
4 Analysis of SDSS J0924+0219
In this section, we discuss the analysis of the J0924 system, as performed by lenskappa.
4.1 The Lens Field
SDSS J0924+0219 is a quadruply lensed quasar first reported in Inada et al. (2003). The quasar itself is at redshift , while the lensing galaxy is located at (Eigenbrod, A. et al., 2006). Quadruply lensed quasars are particularly valuable for cosmographic analysis because it is in principle possible to measure 12 different time delays, though only three of these are independent. An image of the field can be seen in figure 2. This system was modeled in Chen et al. (2022)
One particularly important feature of the lens field is the bright star located in the lower left. The star covers a reasonably large fraction of the overall area in the 120” aperture, undoubtedly covering several background objects and making photometry for objects very near it unreliable. We apply techniques that have previously been used in this kind of analysis to correct for this. This technique is discussed in more detail in section 4.2.
The lens field falls within the Subaru Hyper Surpime-Cam Strategic Survey Program footprint, and full color information is available for all objects in the relevant catalogs. We use these catalogs, including photometric redshifts, for all objects inside the field. Additionally we use the bright star masks and photometric redshift PDFs provided by the HSC team.

Our analysis follows the same outline discussed in section 2. We discuss the details particular to this lens field below.
4.2 The HSC Survey and Weighted Number Count Ratios
The Hyper Suprime-Cam Subaru Strategic Survey is a large survey program, aiming to cover roughly 1400 deg2 of sky in five photometric bands (grizy) down to 26, with deeper coverage expected in smaller regions of the sky (Aihara et al., 2017). We base our analysis on the roughly 400 deg2 that had coverage in all five bands as of the second data release (Aihara et al., 2019). Data release 3 was made available while this paper was in preparation, but we do not consider it here.
The HSC Survey is a natural choice for a comparison dataset for this system because the J0924 field itself falls within the survey footprint. We therefore have both robust and comparable photometry. When computing weighted number count ratios, the basic approach is identical to the one outlined in the section 2.4, with some specific adjustments:
We use objects with r_extendness_value , which selects galaxies. Bosch et al. (2017) demonstrates that their algorithm for computing this quantity does a reasonably good job of selecting galaxies, though it may incorrectly classify some galaxies as stars, and vice-versa. However we note that the HSC-wide survey was intentionally selected to enable cosmological analyses by being in regions that are away from the galactic plane and low on dust extinction (Aihara et al., 2017). This, combined with robust bright-star masks and our large sample size ensures unmasked stars do not significantly impact the final weighted number count ratios.
The full photometric redshift PDFs for all objects in the data release have been made available by the HSC team (Nishizawa et al., 2020). They use two separate fitting algorithms, and results from both algorithms are included in the catalog. We compute weighted number count ratios using both sets of redshifts, and do not find a meaningful difference between the resultant distributions. As such, we use the ”DEmP” redshift and stellar masses for our analysis (Hsieh & Yee, 2014; Tanaka et al., 2017).
When computing weighted number counts, we remove all objects closer than 5 arcsec from the center of the field following Rusu et al. (2017). Objects this close to the center of the field are typically explicitly included in the mass model of the lens, and so we also remove them from the comparison fields to avoid biasing results.
The HSC survey team makes available masks that represent areas of the sky where photometry may be unreliable or lacking due to the presence of bright stars (Coupon et al., 2017). This is particularly important in our field due to the presence of the bright star that can be seen in Figure 2 When iterating over the reference survey, we retrieve the bright star masks for each region being considered. We apply both these masks and the masks for the lens field itself to both catalogs at each weighting step. Doing this ensures that results are not biased if a given field in the reference survey has significantly more or less of its area covered by bright star masks. This procedure was first used in Rusu et al. (2017)
The 400 deg2 of sky we consider here is separated into seven disconnected regions. Initially, we computed weighted number count ratios in five of these regions. This produces nearly-identical distributions, with the difference between the lowest and highest median being the standard deviation of the distribution, suggesting our fields are large enough to to avoid sampling bias. Based on this, we restrict our subsequent analysis to 135 deg2 of sky located in the region and . For each combination of aperture and limiting magnitude, we compute weighted count ratios at 100,000 randomly selected fields.

4.3 Millennium Simulation
The Millennium Simulation (Springel et al., 2005) is a dark matter only simulation split into 64 fields. After the original run was completed, synthetic galaxy catalogs were painted into the resultant halos by several teams. Following (Rusu et al., 2017) we use the semi-analytic catalogues of De Lucia & Blaizot (2007). Additionally, Hilbert et al. (2009) split each field into a grid of 4096x4096 points and used ray tracing to compute convergence and shear at each of these points in 63 redshift planes. These, combined with its large size, makes it an excellent choice for our analysis. In our analysis, we use redshift plane 36 with .
First, we compute the weighted number counts at a large number (order ) of equally spaced grid points in the Millennium simulation. For the aperture, we place the fields apart (snapped to the nearest grid point), while for the aperture we place fields apart. Both cases result in over 1.5 million lines of sight across the simulation, each of which has an associated value of and This differs from the same calculation for the lens field itself in a key way: the values reported are the total value of the weights at every point considered, rather than a ratio of values. To normalize, we divide weighted number count in each field by the median value for all lines of sight in our sample. The median value of the resultant distribution is therefore unity.
A key difference between the synthetic catalogs and the real data from the HSC survey is that in the Millennium Simulation catalog redshifts are exact. In previous work (eg. Rusu et al., 2017) this difference was accounted for by computing photometric redshifts for all objects in the Millennium Simulation, using the same pipeline that was used to compute the photometric redshifts in the comparison dataset. We are unable to use this technique in this case because the HSC survey photo-z pipelines are not publicly available as of the preparation of this paper. Instead, we download the full catalog of training data used by the HSC. These are galaxies for which spectroscopic redshifts are available. We divide the objects in the test dataset into redshift and magnitude bins. For each galaxy in a bin, we compute the offset in the central value of the redshift , and take the median of these as our estimate of the redshift bias in that bin. Additionally we take the median value of (as reported by the HSC photometric redshift pipeline) for all photometric redshifts in that bin. We take the the median value of as our estimate of photometric redshift uncertainty. For each object in the Millennium Simulation catalog, we construct an artificial photemetric redshift PDF. The center of the distribution is the ”actual” redshift of the object, offset by the the amount computed previously for the appropriate bin. The width of the distribution is the value of computed for the same bin.
At each weighing step in the Millennium Simulation, we then sample from these ”photometric redshift” PDFs when computing weighted number counts. For each line of sight, we sample from each of these PDFs 50 times. This produces 50 separate catalogs (all with slightly different values for object ”redshifts”), and we compute weighted number counts for each one. We find that this process produces no meaningful change to our final inference for , even when a weight that depends on the redshift is taken into account. However this process massively increases the amount of data output by our code, and therefore significantly increases the amount of time required to do the final inference on . This does suggest that photometric redshift uncertainties do not have a significant impact on the inferred value of , but we plan to explore this more completely in the future.
5 Results and Discussion
Our weighted number counts for the lens field include a total of five weights (, , , , , see Table 1), two apertures (45” and 120”), two limiting magnitudes (23 and 24), and two summing techniques (pure sum and medians). For brevity, we report only the medians of these distributions in Table 2. The full distributions, along with the analysis code used to produce the posterior distributions for are available on github. 333https://github.com/PatrickRWells/J0924-analysis. A visual catalog of the objects in the field and their relative weights can be seen in Figure 3.
The weighted number count ratios suggest the SDSS J0924 field is mildly overdense as compared to the universe as a whole. This overdensity is significantly more obvious when considering the ” aperture. This is quite reasonable; as the size of the aperture increases, the density of field will approach the density of the universe as a whole. See Figure 4 for an overview of the weights considered in this work.
It is however less obvious why the value of the weights seem to depend on the limiting magnitude, with the median values for being significantly higher than for . This may suggest that the quality of the lens field catalog is poor below magnitude 23, We remind the reader that the ” region around the lens itself is masked when computing weighted number counts.
Weight | i¡23, 120” | i¡24, 120” | i¡23, 45” | i¡24, 45” |
---|---|---|---|---|
1.04 | 1.04 | 1.42 | 1.35 | |
1.17 | 1.09 | 1.57 | 1.35 | |
1.19 | 1.10 | 1.56 | 1.36 | |
1.03 | 0.99 | 1.56 | 1.37 | |
1.21 | 1.07 | 1.74 | 1.37 | |
1.08 | 1.01 | 1.59 | 1.45 | |
1.12 | 1.01 | 1.50 | 1.47 | |
1.03 | 1.00 | 1.50 | 1.36 | |
1.10 | 1.04 | 1.63 | 1.40 |

Based on the above, we would expect our final value of to be somewhat positive. However the strength of the external shear of the field, reported in (Chen et al., 2022) is . This places it significantly below the median (and, in fact, mean) for all lines of sight in the Millennium Simulation. For each combination of limiting magnitude and aperture we compute for a number of different combinations of weights:
-
•
Pure (unweighted) number counts, combined with each of the remaining weights individually.
-
•
Pure number counts and inverse distance weights, combined with each of the remaining weights individually.
-
•
For each of the above cases, we run the kappa inference both with and without the constraint from .
The number count ratios used for this analysis are listed in Table 2. We do not mix distributions obtained using our two different weighting techniques.
We also repeat this for each while using the median weighting scheme rather than the sum scheme. All together, this leaves us with 112 individual histograms for the value of kappa.
We find that the choice of specific weights is less important than the number of weights being considered. In all cases, inferring with three weights instead of two tightens the resultant distribution, but does not significantly affect the central value. Rusu et al. (2017) found best results when combining and with one additional weight and the constraint from . We find the same here. Specifically, the central value of the distribution does not change meaningfully based on the choice of the third weight, but we find slightly tighter constraints when using .
We also find that results are consistent between apertures, but find that a brighter value of the limiting magnitude results in a noisier posterior on . Because so many objects fall between magnitude 23 and 24, removing these objects results in significantly noisier weighted number counts which translate to the final inference on

Considering only as a constraint leads to a median value on of -0.015. As a result, including as a constraint significantly lowers the central value of our distributions, though it also tightens the distribution. However we note this shift is fairly modest as compared to the width of the distribution. This is similar to the result seen in Rusu et al. (2017), though in that case the inferred value of the shear was significantly closer to the median in the Milennium Simulation of 0.028, and the shift of the central value was not as significant. We find our tightest constraints on through a combination of , and combined with constraints from . This leads us to a final value of of -0.012 with a width Without the constraint from , we obtain a median value of 0.012 with Full posteriors for these combinations can be found in Figure 5. We use a aperture and limiting magnitude of for these results.
6 Conclusions and Future Work
In this paper, we have discussed the current state of the line of sight number counts technique for environment analyses in time delay cosmography. We have introduced two main improvements to previous iterations of the analysis. First, our packages lenskappa and heinlein make designing and running these analyses much quicker than before, in addition to making it much simpler to add additional survey datasets. This will accelerate the pace of future analyses, and enable population-level analyses of lens environments. Additionally, we have made use of the entire distributions of weighted number counts, which accounts for covariance between weights and is generally more robust than just exploring a small region around the medians. We have applied these techniques to the J0924 field, and found that this field is a fairly typical line of sight, with a slightly negative median value of
6.1 Future Development of lenskappa
Our primary goal for this project has been to build a software tool that can quickly and reliably analyze weak perturbers along lines of sight to strong gravitational lenses. We have accomplished this goal, but we plan to extend the capabilities of lenskappa to include tools for analyzing strong perturbers and coherent structures (such as galaxy groups). These objects must be handled individually, and require very different analysis tools. However we see a significant advantages to being able to do full environment analyses within a single software package.
6.2 Future Analyses
Leveraging the capabilities of lenskappa, we hope to better understand lines of sight to gravitational lenses on a population level. Fassnacht et al. (2010) and Wong et al. (2018) have shown that lenses seem to fall in preferentially overdense lines of sight, but that this overdensity seems to be confined to the immediate surroundings of the lens itself. Lenskappa gives us the tools to perform these population-level analyses quickly, with the freedom to adjust and re-run the analysis as needed. As a first step, we hope to complete an analysis with 4-5 new lens systems, as well as 2-3 systems that have previously been analyzed to check our results.
As an additional check, we would like to analyze a large number of non-lens lines of sight. This would ensure there are no biases introduced by comparing distributions based on real galaxy catalogs to those obtained from the synthetic catalogs in the Millennium Simulation.
Recently, Park et al. (2022) demonstrated the use of Bayesian Graph Neural Network to estimate the value of in a simulated dataset. Their method out-performs a simplified version of the analysis performed here that uses only a single weight. Further work may demonstrate the ability of the technique to match or even outperform the weighted number counts technique, but a more complete comparision will need to be performed to assess this.
Acknowledgements.
P.W. and C.D.F. acknowledge support for this work from the National Science Foundation under Grant No. AST-1907396. P.W. thanks Liz Buckley-Geer, Anowar Shajib, and Simon Birrer for useful discussions throughout the preparation of this manuscript.References
- Aghanim et al. (2020) Aghanim, P. C. N., Akrami, Y., Ashdown, M., et al. 2020, Astronomy & Astrophysics, 641, A6
- Aihara et al. (2019) Aihara, H., AlSayyad, Y., Ando, M., et al. 2019, Publications of the Astronomical Society of Japan, 71
- Aihara et al. (2017) Aihara, H., Arimoto, N., Armstrong, R., et al. 2017, Publications of the Astronomical Society of Japan, 70 [https://academic.oup.com/pasj/article-pdf/70/SP1/S4/23692189/psx066.pdf], s4
- Birrer et al. (2022) Birrer, S., Millon, M., Sluse, D., et al. 2022
- Bosch et al. (2017) Bosch, J., Armstrong, R., Bickerton, S., et al. 2017, Publications of the Astronomical Society of Japan, 70
- Buckley-Geer et al. (2020) Buckley-Geer, E. J., Lin, H., Rusu, C. E., et al. 2020, Monthly Notices of the Royal Astronomical Society, 498, 3241–3274
- Chen et al. (2022) Chen, G. C.-F., Fassnacht, C. D., Suyu, S. H., et al. 2022, Monthly Notices of the Royal Astronomical Society, 513, 2349
- Collaboration (2005) Collaboration, T. D. E. S. 2005 [arXiv:astro-ph/0510346]
- Collett et al. (2013) Collett, T. E., Marshall, P. J., Auger, M. W., et al. 2013, Monthly Notices of the Royal Astronomical Society, 432, 679
- Coupon et al. (2017) Coupon, J., Czakon, N., Bosch, J., et al. 2017, Publications of the Astronomical Society of Japan, 70
- Cuceu et al. (2019) Cuceu, A., Farr, J., Lemos, P., & Font-Ribera, A. 2019, Journal of Cosmology and Astroparticle Physics, 2019, 044
- De Lucia & Blaizot (2007) De Lucia, G. & Blaizot, J. 2007, Monthly Notices of the Royal Astronomical Society, 375, 2
- Eigenbrod, A. et al. (2006) Eigenbrod, A., Courbin, F., Dye, S., et al. 2006, A&A, 451, 747
- Fassnacht et al. (2006) Fassnacht, C. D., Gal, R. R., Lubin, L. M., et al. 2006, The Astrophysical Journal, 642, 30
- Fassnacht et al. (2010) Fassnacht, C. D., Koopmans, L. V. E., & Wong, K. C. 2010, Monthly Notices of the Royal Astronomical Society, 410, 2167
- Freedman et al. (2019) Freedman, W. L., Madore, B. F., Hatt, D., et al. 2019, The Astrophysical Journal, 882, 34
- Greene et al. (2013) Greene, Z. S., Suyu, S. H., Treu, T., et al. 2013, The Astrophysical Journal, 768, 39
- Gwyn (2012) Gwyn, S. D. J. 2012, The Astronomical Journal, 143, 38
- Hernández-Aguayo et al. (2022) Hernández-Aguayo, C., Springel, V., Pakmor, R., et al. 2022
- Hilbert et al. (2009) Hilbert, S., Hartlap, J., White, S. D. M., & Schneider, P. 2009, Astronomy & Astrophysics, 499, 31
- Holzman et al. (2017) Holzman, B., Bauerdick, L. A. T., Bockelman, B., et al. 2017, Computing and Software for Big Science, 1
- Hsieh & Yee (2014) Hsieh, B. C. & Yee, H. K. C. 2014, The Astrophysical Journal, 792, 102
- Inada et al. (2003) Inada, N., Becker, R. H., Burles, S., et al. 2003, The Astronomical Journal, 126, 666
- Kaiser et al. (1995) Kaiser, N., Squires, G., & Broadhurst, T. 1995, The Astrophysical Journal, 449, 460
- Kusnierz et al. (2022) Kusnierz, J., Padulano, V. E., Malawski, M., et al. 2022, in 2022 22nd IEEE International Symposium on Cluster, Cloud and Internet Computing (CCGrid) (IEEE)
- McCully et al. (2017) McCully, C., Keeton, C. R., Wong, K. C., & Zabludoff, A. I. 2017, The Astrophysical Journal, 836, 141
- Millon et al. (2020) Millon, M., Galan, A., Courbin, F., et al. 2020, Astronomy & Astrophysics, 639, A101
- Nishizawa et al. (2020) Nishizawa, A. J., Hsieh, B.-C., Tanaka, M., & Takata, T. 2020
- Park et al. (2022) Park, J. W., Birrer, S., Ueland, M., et al. 2022
- Riess et al. (2021) Riess, A. G., Casertano, S., Yuan, W., et al. 2021, The Astrophysical Journal Letters, 908, L6
- Rusu et al. (2017) Rusu, C. E., Fassnacht, C. D., Sluse, D., et al. 2017, Monthly Notices of the Royal Astronomical Society, 467, 4220
- Rusu et al. (2019) Rusu, C. E., Wong, K. C., Bonvin, V., et al. 2019, Monthly Notices of the Royal Astronomical Society, 498, 1440
- Sluse et al. (2019) Sluse, D., Rusu, C. E., Fassnacht, C. D., et al. 2019, Monthly Notices of the Royal Astronomical Society, 490, 613
- Springel et al. (2005) Springel, V., White, S. D. M., Jenkins, A., et al. 2005, Nature, 435, 629
- Suyu et al. (2010) Suyu, S. H., Marshall, P. J., Auger, M. W., et al. 2010, The Astrophysical Journal, 711, 201
- Tanaka et al. (2017) Tanaka, M., Coupon, J., Hsieh, B.-C., et al. 2017, Publications of the Astronomical Society of Japan, 70 [https://academic.oup.com/pasj/article-pdf/70/SP1/S9/23692265/psx077.pdf], s9
- Tihhonova et al. (2018) Tihhonova, O., Courbin, F., Harvey, D., et al. 2018, Monthly Notices of the Royal Astronomical Society, 477, 5657
- Treu & Marshall (2016) Treu, T. & Marshall, P. J. 2016, The Astronomy and Astrophysics Review, 24
- Wong et al. (2018) Wong, K. C., Sonnenfeld, A., Chan, J. H. H., et al. 2018, The Astrophysical Journal, 867, 107