<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Turbocharging constraints on dark matter substructure through a synthesis of strong lensing flux ratios and extended lensed arcs</title></titleStmt>
			<publicationStmt>
				<publisher>MNRAS</publisher>
				<date>08/21/2024</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10655877</idno>
					<idno type="doi">10.1093/mnras/stae1810</idno>
					<title level='j'>Monthly Notices of the Royal Astronomical Society</title>
<idno>0035-8711</idno>
<biblScope unit="volume">533</biblScope>
<biblScope unit="issue">2</biblScope>					

					<author>Daniel Gilman</author><author>Simon Birrer</author><author>Anna Nierenberg</author><author>Maverick_S H Oh</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[<title>ABSTRACT</title> <p>Strong gravitational lensing provides a purely gravitational means to infer properties of dark matter haloes and thereby constrain the particle nature of dark matter. Strong lenses sometimes appear as four lensed images of a background quasar accompanied by spatially resolved emission from the quasar host galaxy encircling the main deflector (lensed arcs). We present methodology to simultaneously reconstruct lensed arcs and relative image magnifications (flux ratios) in the presence of full populations of subhaloes and line-of-sight haloes. To this end, we develop a new approach for multiplane ray tracing that accelerates lens mass and source light reconstruction by factors of $\sim\!\! 100\!\!-\!\!1000$. Using simulated data, we show that simultaneous reconstruction of lensed arcs and flux ratios isolates small-scale perturbations to flux ratios by dark matter substructure from uncertainties associated with the main deflector mass profile on larger angular scales. Relative to analyses that use only image positions and flux ratios to constrain the lens model, incorporating arcs strengthens likelihood ratios penalizing warm dark matter with a suppression scale $m_{\rm {hm}} / {\rm M}_{\odot }$ in the ranges of $\left[10^7 \!\!-\!\! 10^{7.5}\right]$, $\left[10^{7.5} \!\!-\!\! 10^{8}\right]$, $\left[10^8 \!\!-\!\! 10^{8.5}\right]$, and $\left[10^{8.5} \!\!-\!\! 10^{9}\right]$ by factors of 1.3, 2.5, 5.6, and 13.1, respectively, for a cold dark matter ground truth. The 95 percent exclusion limit improves by 0.5 dex in $\log _{10} m_{\rm {hm}}$. The enhanced sensitivity to low-mass haloes enabled by these methods pushes the observational frontier of substructure lensing to the threshold of galaxy formation, enabling stringent tests of any theory that alters the properties of dark matter haloes.</p>]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Steinhardt 2000; <ref type="bibr">Tulin, Yu &amp; Zurek 2013)</ref>. In SIDM, haloes initially form a central core, and eventually undergo a process referred to as core collapse that causes an order-of-magnitude increase in their central density of haloes <ref type="bibr">(Balberg, Shapiro &amp; Inagaki 2002;</ref><ref type="bibr">Gilman et al. 2021;</ref><ref type="bibr">Gilman, Zhong &amp; Bovy 2023;</ref><ref type="bibr">Nadler, Yang &amp; Yu 2023b;</ref><ref type="bibr">Yang, Nadler &amp; Yu 2023)</ref>.</p><p>Characterizing the properties of substructure on small scales, below 10 9 M , would have profound consequences for our understanding of dark matter and cosmology. In the standard picture of cosmological structure formation, dark matter haloes emerge from the collapse of primordial density fluctuations. Halo mass scales below 10 9 M correspond to wavenumber k &gt; 10 Mpc -1 , a relatively unconstrained region of the primordial matter power spectrum that could hide clues related to inflation, the early Universe, and dark matter <ref type="bibr">(Zentner &amp; Bullock 2003;</ref><ref type="bibr">Bringmann, Scott &amp; Akrami 2012;</ref><ref type="bibr">Van Tilburg, Taki &amp; Weiner 2018;</ref><ref type="bibr">Ando, Hiroshima &amp; Ishiwata 2022;</ref><ref type="bibr">Gilman et al. 2022;</ref><ref type="bibr">Esteban, Peter &amp; Kim 2023)</ref>. Moreover, the predictions from dark matter theories such as WDM and SIDM diverge more strongly from CDM predictions as one moves to progressively smaller scales and lower halo masses.</p><p>In search of new physics, observational probes of dark matter structure from dwarf galaxies <ref type="bibr">(Kim, Peter &amp; Hargis 2018;</ref><ref type="bibr">Correa 2021;</ref><ref type="bibr">Nadler et al. 2021</ref><ref type="bibr">Nadler et al. , 2024;;</ref><ref type="bibr">Bechtol et al. 2022;</ref><ref type="bibr">Dekker et al. 2022;</ref><ref type="bibr">Akita &amp; Ando 2023;</ref><ref type="bibr">Slone et al. 2023)</ref>, stellar streams <ref type="bibr">(Bovy, Erkal &amp; Sanders 2017;</ref><ref type="bibr">Banik et al. 2018</ref><ref type="bibr">Banik et al. , 2021;;</ref><ref type="bibr">Bonaca MNRAS 533, 1687</ref><ref type="bibr">-1713</ref><ref type="bibr">(2024</ref><ref type="bibr">) et al. 2019)</ref>, and gravitational lensing <ref type="bibr">(Dalal &amp; Kochanek 2002;</ref><ref type="bibr">Nierenberg et al. 2014</ref><ref type="bibr">Nierenberg et al. , 2017;;</ref><ref type="bibr">Vegetti et al. 2014</ref><ref type="bibr">Vegetti et al. , 2018;;</ref><ref type="bibr">Hezaveh et al. 2016;</ref><ref type="bibr">Birrer, Amara &amp; Refregier 2017;</ref><ref type="bibr">Gilman et al. 2020</ref><ref type="bibr">Gilman et al. , 2021</ref><ref type="bibr">Gilman et al. , 2023;;</ref><ref type="bibr">He et al. 2022;</ref><ref type="bibr">Seng&#252;l et al. 2022;</ref><ref type="bibr">Dhanasingham et al. 2023;</ref><ref type="bibr">Dike, Gilman &amp; Treu 2023;</ref><ref type="bibr">Keeley et al. 2023;</ref><ref type="bibr">Powell et al. 2023;</ref><ref type="bibr">Wagner-Carena et al. 2023;</ref><ref type="bibr">Mondino et al. 2024;</ref><ref type="bibr">Nightingale et al. 2024)</ref> characterize the properties of substructure on sub-galactic scales. If the dark matter has no coupling to the standard model besides gravity, these cosmic probes of dark matter constitute the only experiments with which to investigate its properties (see the reviews by <ref type="bibr">Bechtol et al. 2022;</ref><ref type="bibr">Drlica-Wagner et al. 2022)</ref>.</p><p>Among the various observational probes that constrain dark matter properties through studies of low-mass haloes, strong gravitational lensing provides the unique capability to characterize the properties of substructure across cosmological distances, and across several Gyr of cosmic time (see the recent review by <ref type="bibr">Vegetti et al. 2023)</ref>.</p><p>Strong lensing refers to a phenomenon in which multiple highly magnified and distorted images of a background source appear due to deflection of light around an intervening cosmic structure, such as a galaxy. As lensing depends only on gravity, it circumvents systematic uncertainties associated with using luminous matter as a tracer for the underlying dark matter, and can characterize both the abundance and internal structure of dark matter haloes <ref type="bibr">(Minor et al. 2021;</ref><ref type="bibr">Amorisco et al. 2022;</ref><ref type="bibr">Gilman et al. 2022;</ref><ref type="bibr">Ballard et al. 2024)</ref>. Through the direct, purely gravitational detection of dark haloes, strong lensing can extend the reach of cosmic probes of dark matter structure to scales below the threshold of galaxy formation (&#8764;10 7 M ).</p><p>Performing such a measurement requires exquisite data. Over the last decade, radio interferometry <ref type="bibr">(Koopmans, Browne &amp; Jackson 2004;</ref><ref type="bibr">McKean et al. 2007;</ref><ref type="bibr">Spingola et al. 2018)</ref>, the Hubble Space Telescope (HST; <ref type="bibr">Nierenberg et al. 2017</ref><ref type="bibr">Nierenberg et al. , 2020;;</ref><ref type="bibr">Shajib et al. 2019</ref>), the W. M. Keck Observatory <ref type="bibr">(Nierenberg et al. 2014)</ref>, and the JWST <ref type="bibr">(Nierenberg et al. 2024</ref>) have observed a particular class of strong lens system in which a quasar becomes quadruply imaged. These systems are ideally suited to probe low-mass dark matter structure because the relative magnifications among lensed images (flux ratios) experience strong perturbation by low-mass haloes. The minimum mass sensitivity of the flux ratios is determined by the size of the lensed background source <ref type="bibr">(Dobler &amp; Keeton 2006)</ref>, and recent JWST observations of the 'warm dust region' around the background quasar are expected to provide sensitivity to haloes at 10 7 M .</p><p>As shown in Fig. <ref type="figure">1</ref>, a quadruply imaged quasar can sometimes appear alongside spatially resolved lensed emission from the quasar host galaxy, or lensed arcs. While the flux ratios provide sensitive localized constraints on the lens model, the lensed arcs that encircle the main deflector impose stringent constraints on the mass profile across larger angular scales (e.g. <ref type="bibr">Shajib et al. 2020;</ref><ref type="bibr">Powell et al. 2022)</ref>. Incorporating constraints from the arcs leads to tighter constraints on the main deflector mass profile, improving the precision of model-predicted flux ratios <ref type="bibr">(Oh et al. 2024)</ref>. However, due mainly to computational limitations, no existing methodology enables the self-consistent reconstruction of lensed arcs and quasar flux ratios in the presence of potentially tens of thousands of dark matter haloes. As a result, substructure lensing analyses performed with quadrupleimage lenses use only the image positions and flux ratios to constrain the lens model and the properties of dark matter substructure.</p><p>To make best use of existing and future flux ratio measurements, in this paper we introduce a new lens modelling methodology to characterize the properties of substructure in quadruply imaged quasars with extended lensed arcs. To reduce the computational costs An HST image of J0405-3308, the type of strong lens system we consider in this work. Four images of a background quasar (labelled A, B, C, and D) appear alongside a lensed arc that encircles the main deflector. The methodology presented in this paper develops the formalism to selfconsistently reconstruct the lensed images, the relative magnifications, and the lensed arc in the presence of dark matter subhaloes and line-of-sight haloes. The figure is adapted from <ref type="bibr">Shajib et al. (2019)</ref>.</p><p>associated with this analysis, we introduce a new approximation for multiplane ray tracing that accelerates lens mass and source light reconstruction by factors of 100-1000, depending on the number of haloes in the lens model. We demonstrate the accuracy of this methodology by performing end-to-end Bayesian inference on simulated data sets. As we will show, the joint reconstruction of lensed arcs and flux ratios leverages complementary information from angular scales that span from the typical Einstein radius (&#8764;1 arcsec) down to the milliarcsec scales probed by flux ratios. The methods we develop enable more robust constraints on the properties of low-mass dark matter haloes and the nature of dark matter.</p><p>This paper is organized as follows: In Section 2, we describe the Bayesian inference problem of inferring substructure properties from strong lens modelling. In Section 3, we detail the computational challenge that has precluded the joint modelling of lensed quasar flux ratios and lensed arcs, and introduce a methodology for multiplane ray tracing that alleviates this computational burden. Section 4 discusses how we create simulated data sets to evaluate the performance of the lens modelling techniques presented in Section 3 in the context of constraining WDM. Section 5 presents the results of applying the methodology to the simulated data sets, and quantifies the improvement afforded by reconstructing lensed arcs simultaneously with flux ratios relative to analyses that use only the image positions and flux ratios to constrain substructure properties. We summarize our finding and give concluding remarks in Section 6.</p><p>We perform lensing calculations using the open-source software package LENSTRONOMY<ref type="foot">foot_1</ref>  <ref type="bibr">(Birrer &amp; Amara 2018;</ref><ref type="bibr">Birrer et al. 2021)</ref>. We generate the populations of dark matter substructure using the open-source software PYHALO<ref type="foot">foot_2</ref>  <ref type="bibr">(Gilman et al. 2020</ref>). To MNRAS 533, <ref type="bibr">1687-1713 (2024)</ref> perform the forward modelling calculations that interface between LENSTRONOMY and PYHALO, we use the new open-source software SAMANA. 3 We assume a flat cosmology with m = 0.32, &#963; 8 = 0.81, and H 0 = 67.4 km s -1 Mpc -1 (Planck Collaboration VI 2020).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">DARK MATTER SUBSTRUCTURE I N F E R E N C E</head><p>We begin in Section 2.1 by phrasing our objective as a Bayesian inference problem in which we use image positions, flux ratios, and imaging data to constrain a set of hyper-parameters that determine the properties of dark matter substructure. In Section 2.2, we discuss an approximate Bayesian computing (ABC) method to compute the joint likelihood function of lensed image positions, flux ratios, and the imaging data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">The Bayesian inference problem</head><p>For a quadruply imaged quasar with lensed arcs from the quasar host galaxy, such as the example shown in Fig. <ref type="figure">1</ref>, the observables include the relative positions of the four lensed quasar images O pos , the three flux ratios O f , and the imaging data O img associated with the lensed arcs. Given a set of hyper-parameters q that parametrize a dark matter theory, our aim is to compute the posterior probability distribution:</p><p>where O = (O 1 , O 2 , ....) represents the data from a sample of lenses, &#960; (q) represents the prior on q, and L (O i |q) represents the likelihood function for a single lens with data O i &#8801; O pos , O img , O f . To connect the hyper-parameters q with O i , we must sample from an enormous volume of parameter space that specifies the masses, positions, and density profiles of a typically very large, O 10<ref type="foot">foot_3</ref> , number of dark matter subhaloes and field haloes. Hereafter, we will refer to m sub as a realization of substructure that we generate from the dark matter model specified by q. The likelihood follows from marginalizing over many realizations:</p><p>In the preceding equation, we have introduced a vector of nuisance parameters, N , which include quantities that parametrize the main deflector mass profile (hereafter, the macromodel), the spatial extent and structure of the lensed background quasar, and the surface brightness profile of the quasar host galaxy; p (N ) represents a prior on these parameters. We have included importance weights w (q|O i ), a topic we will discuss in Section 2.2.3. The first term in the integrand, p (O i |m sub , N ), is the product of an astrometric term computed with the lensed image positions p O pos |m sub , N , a term that depends on the imaging data, p O img |m sub , N , and the flux ratios p (O fr |m sub , N ). We perform this integral through Monte Carlo sampling of the parameter space, and define a likelihood through an ABC approach, as discussed in the next section.</p><p>We compute observables O i using the multiplane lens equation <ref type="bibr">(Blandford &amp; Narayan 1986)</ref>:</p><p>which describes backward ray propagation through lens planes indexed by n. For later use, we have also introduced an effective multiplane deflection angle &#945; eff (&#952; , m sub , N ). The quantity &#945; n represents the deflection field acting in each lens plane, D i represents an angular diameter distance to the ith lens plane, and D ij represents an angular diameter distance between planes i and j . The subscripts s and n denote the source plane and the lens plane of the main deflector.</p><p>The angle &#952; represents an angle on the sky as seen by an observer.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Efficient sampling methods and summary statistics</head><p>The high dimension of the data vector that includes image positions, flux ratios, and imaging data, O i , poses challenges related to exploring the vast parameter space of possible lens model configurations, most of which do not fit all of the available data. Current analysis methods deal with this issue by reducing the dimension of the data vector before computing the likelihood function. For example, in an analysis of eight quadruply imaged quasars that used only the image positions and flux ratios, <ref type="bibr">Gilman et al. (2020)</ref> perform a non-linear optimization of the macromodel such that each proposed lens model satisfies the lens equation for the observed image positions in the presence of substructure.</p><p>In this work, we use a similar strategy to focus computational resources in regions of parameter space that contribute most significantly to the integral in equation (2). The task at hand involves the simultaneous reconstruction of the main deflector mass and source light profile in the presence of a fixed population of dark matter subhaloes and line-of-sight haloes, m sub . Using a particle swarm optimization (PSO) implemented in LENSTRONOMY, we simultaneously reconstruct the imaging data and background source while applying a non-linear solver to a portion of the lens macromodel to satisfy the lens equation for the quasar image positions. We guide the PSO towards viable regions of parameter space by punishing poor fits to the imaging data on a pixel-by-pixel basis in the image plane. In Section 3.2, we describe an approximation for full multiplane ray tracing that we use to accelerate the PSO and any subsequent multiplane ray tracing calculations in the presence of the full population of haloes described by m sub .</p><p>The lens models that result from PSO optimizations provide better fits to the imaging data than the overwhelming majority lens models proposed only on the basis of matching the image positions. Once we have constructed these lens models, we proceed to compute the astrometric, flux ratio, and imaging data likelihoods, as described in the next three sections.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.1">The astrometric likelihood</head><p>As discussed in the previous section, during the PSO we use the approach discussed by <ref type="bibr">Birrer, Amara &amp; Refregier (2015)</ref> and apply a non-linear solver to a portion of the lens macromodel such that the lens equation is automatically satisfied for each proposed lens model. To handle observational measurement uncertainties in the lensed quasar image positions, we add astrometric perturbations to the image positions prior to performing the PSO, and later on we will evaluate the flux ratios at these new perturbed coordinates. Thus, at MNRAS 533, <ref type="bibr">1687-1713 (2024)</ref> this stage we have accounted for L O pos |m sub , N by selecting lens models that only reproduce the observed image positions to high precision.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.2">The flux ratio likelihood</head><p>Following existing methods <ref type="bibr">(Gilman et al. 2019)</ref>, we compute the flux ratio likelihood using an ABC rejection algorithm based on a summary statistic S computed with respect to the three observed flux ratios, O f , and f (m sub , N ), the model-predicted flux ratios:</p><p>We accept a realization and the corresponding parameters drawn from &#960; (q) if S &lt; , where represents a tolerance threshold. For a given , the number of accepted samples between two regions of parameter space approximates the relative likelihood between the two regions of parameter space. ABC rejection algorithms converge to exact (relative) likelihoods as &#8594; 0 while the number of samples tends to infinity.</p><p>In our analysis, we generate &#8764;10 6 realizations per lens, and accept the top N accept = 3000 samples corresponding to the lowest values of S. This results in values of that range between 0.01 and 0.1 among the (mock) lenses in our sample. As in previous work, we handle observational measurement uncertainties by adding them post-processing to the model-predicted flux ratios before computing S. The convergence tests performed for ABC rejection algorithms applied to image flux ratios by <ref type="bibr">Gilman et al. (2020)</ref> motivate our choice of the tolerance threshold on . Finally, we obtain a continuous approximation of the flux ratio sampling distribution marginalized over N , p O f |q sub , by applying a Gaussian kernel density estimator to the accepted samples drawn from the prior on q.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.3">The imaging data likelihood</head><p>We account for the imaging data constraints by applying an ABC rejection cut to a second summary statistic, L, which we define as the probability of observing the imaging data L &#8801; p O img |m sub , N . In principle, we could incorporate information directly through importance sampling with weights equal to L, but this causes numerical stability issues when the relative likelihood among the accepted samples fluctuates by large factors of &#8764;e 5 due to the high dimension of the data vector. We define the acceptance threshold on L as the value of L that corresponds to the top 2 per cent of the imaging data likelihoods. This choice represents a compromise between selecting models that best fit the imaging data and accepting realizations that minimize the S statistic computed with respect to the flux ratios. The optimum choice for this threshold should depend on the constraining power of the imaging data, which in turn depends on the specifics of the lens system in question and in particular the brightness of the lensed arc.</p><p>As we show in Section 5, the imaging data enable stronger conclusions regarding substructure properties by imposing tighter constraints on the mass profile of the main deflector than one obtains from analysing only the image positions and flux ratios. However, our method of incorporating imaging data exposes the likelihood function to a systematic bias associated with reconstruction of the source light profile with substructure in the lens model. This bias manifests as a systematic preference for lens models with less substructure. Moreover, in rare cases a dark matter halo imparts a strong perturbation to the surface brightness of a lensed arc, a feature of the data that the inference methodology we present in this work is not intended to properly capture in the likelihood. For reasons we elaborate on further in Appendix A, we conclude that the imaging data likelihood will not give a reliable inference of substructure properties on its own when calculated according to the methodology we present in this work.</p><p>To mitigate the effects of systematics associated with the imaging data in the presence of substructure, we demand that our posterior distribution has the property lim</p><p>(5)</p><p>That is, the posterior should equal the prior on q when computed only using the imaging data (as &#8594; &#8734;, the flux ratio likelihood term becomes uninformative). We can arrange that our posterior meets this requirement by an appropriate definition of the importance sampling weights in equation ( <ref type="formula">2</ref>). We define the importance weights, w (q|O i ), as</p><p>In other words, we divide the likelihood computed for all available data, O i , by the imaging data and astrometric likelihood, ignoring flux ratio information. As one can easily verify, applying the importance weights in equation ( <ref type="formula">6</ref>) and performing a dark matter inference without incorporating constraints from the flux ratios yield a posterior distribution equal to &#960; (q). One can interpret this term as a prior on the dark matter model q applied to each lens that depends on the parametrization of the source light profile in N . The source reconstruction process involves solving for a configuration of light in the source plane that maximizes the likelihood of the lensed image in the image plane. As discussed in Section 4.3, we model the source light profile as a parametric component plus a shapelet basis expansion, and we optimize the coefficients of the shapelet sets <ref type="bibr">(Birrer et al. 2015)</ref> simultaneously with the parametric components. Properties of substructure can, to some degree, be absorbed by the source light profile, and the degree to which this occurs depends on various choices regarding the source light model and the process of reconstructing the extended light in the source plane (e.g. <ref type="bibr">Ballard et al. 2024)</ref>. The importance weights in equation ( <ref type="formula">6</ref>) reflect our knowledge that choices regarding the source light reconstruction will affect our beliefs regarding the probability of a dark matter model q. The importance weights w q|O img , O pos quantify this effect, and their incorporation in the likelihood corrects for the resulting bias.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">ACCELERATING MULTIPLANE LENS M O D E L L I N G W I T H T H E D E C O U P L E D M U LT I P L A N E F O R M A L I S M</head><p>The approach outlined in the previous section presents a viable strategy for performing a dark matter inference using image positions, imaging data, and flux ratios to constrain the lens model. As discussed in the first paragraph of Section 2.2, a crucial step in the inference method involves a non-linear optimization of the lens mass and source light profile with respect to the imaging data through a PSO, and a simultaneous non-linear solver applied to the lens macromodel such that the lens equation is satisfied for the quasar MNRAS 533, <ref type="bibr">1687-1713 (2024)</ref> image positions, for each realization. However, with exact ray tracing methods, performing this calculation with thousands of dark matter haloes along the line of sight is computationally intractable.</p><p>In this section, we begin in Section 3.1 by reviewing the methodology of lens mass and source reconstruction using existing lens modelling techniques, and explain how the computational intractability of lens mass and source light reconstruction with line-of-sight haloes derives from the recursive nature of equation (3). In Section 3.2, we introduce a new approximation for multiplane lensing that preserves the non-linear effects associated with equation (3) while accelerating calculations by factors of 100-1000. In Section 3.3, we show that this formalism predicts effectively indistinguishable flux ratio likelihoods from full multiplane ray tracing.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Multiplane lens modelling</head><p>To understand computational challenges posed by equation (3), we will walk through the step-by-step procedure of performing a lens mass and source light reconstruction with substructure included along the line of sight and in the main lens plane. Fig. <ref type="figure">2</ref> depicts the backward ray tracing procedure described by equation ( <ref type="formula">3</ref>), and will serve as a useful guide for understanding the lens modelling procedures discussed below, as well as the methods introduced in the next section.</p><p>For what follows, we assume that we have generated a realization of substructure m sub from the dark matter model q. The masses, positions, and density profiles of the haloes are held fixed for the remainder of the calculation. Our objective is to simultaneously reconstruct the mass distribution of the main deflector and the lensed background source in the presence of the realization specified by m sub . The only unknown parameters are those that describe the mass profile of the main deflector, or more generally, the deflection associated with the main deflector &#945; macro . Our task is to determine &#945; macro subject to the requirement that these deflection angles satisfy the lens equation for the four image positions while simultaneously fitting the imaging data. A standard lens modelling procedure proceeds as follows:</p><p>(i) Using equation (3), we ray-trace from the viewer to the pixel location in the plane of the main deflector an angle &#952; . We record the direction of a light ray as it intersects the main lens plane, &#952; front = &#952; + &#945; front , and the comoving transverse distance of a light ray where it hits the main lens plane T x (&#952; , &#945; front ). Once the light ray reaches the main lens plane, we compute the deflection angles produced by main deflector subhaloes, &#945; sub (T x ). For a given realization of haloes, we only need to perform the calculation of T x and &#945; sub (T x ) once for a given angle &#952; because the ray tracing thus far does not depend on the unknown &#945; macro .</p><p>(ii) Propose a set of deflection angles &#945; macro (T x ) produced by the main deflector. This deflection field is unknown, and we will try to optimize it subject to the constraints imposed by the data. Methods discussed by <ref type="bibr">Gilman et al. (2019)</ref> generate proposals for &#945; macro by selecting lens models that satisfy the lens equation. In this work, we use a PSO to generate proposals for &#945; macro that satisfy the lens equation while also reproducing the lensed arcs.</p><p>(iii) Using the proposed &#945; macro , we ray-trace with equation (3) until reaching the source plane. The deflection angles produced by haloes at z &gt; z d depend on &#945; macro due to the recursive nature of equation ( <ref type="formula">3</ref>), so this step involves thousands of function evaluations per pixel in the lensed image.</p><p>(iv) We evaluate the surface brightness of the source light in the source plane, and then cast this light back to the image plane to produce a lensed image. We then evaluate the imaging data likelihood.</p><p>(v) Repeat steps (ii)-(iv) until obtaining a maximum likelihood estimation (or in some cases, a Markov Chain) for the parameters of interest. During each iteration of steps (ii)-(iv), we must re-evaluate the deflections by haloes at z &gt; z d because they are coupled to &#945; macro .</p><p>Because step (iii) involves backward ray tracing operations through all lens planes between the main deflector and the source plane, the computation time scales in proportion with the number of haloes in this region. For a typical configuration with a lens at z d = 0.5 and a source at z s = 2.0, CDM predicts &#8764;1750 haloes in the mass range of 10 6 -10 10 M between the main deflector and source.<ref type="foot">foot_4</ref> Thus, lens mass and source light reconstruction with line-of-sight haloes between the main deflector and the source takes approximately 1750 times as long as a single-plane reconstruction. The likelihood function in equation ( <ref type="formula">2</ref>) dictates millions of such calculations per lens. Assuming that the PSO takes &#8764;1 min for a single-plane reconstruction, performing the lens modelling for 1000 000 realizations of substructure would take &#8764;1750 &#215; 10 6 CPU minutes, or &#8764;3000 CPU years per lens. In practical terms, to perform this analysis on a sample of 10 lenses with a computing allocation of &#8764;10 6 CPU hours, we require an increase in speed by a factor of at least &#8764;250.</p><p>In summary, the computational difficulties that preclude the joint reconstruction of image flux ratios and lensed arcs in substructure lensing analyses stem from the recursive nature of the multiplane lens equation. In the next section, we introduce an approximation for full multiplane ray tracing that circumvents the repeated evaluation of step (iii) in the procedure described earlier in this section, accelerating calculations by factors of up to &#8764;1000.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">The decoupled multiplane approximation for multiplane lensing</head><p>We begin with a reasonable estimate for the deflection field produced by the main deflector, &#945;macro . As a reasonable estimate for this deflection field, we choose one that satisfies the lens equation for the image positions without substructure included in the lens model. Using equation (3), we can perform steps (i)-(iii) in the lens modelling procedure described in the previous section, using our initial guess for &#945;macro to ray-trace through the entire lens system to the source plane. Inserting our choice of &#945;macro into equation (3) for a given realization of substructure, we ray-trace through the lens system and reach an angular coordinate &#946; given by</p><p>where &#945; eff is the effective multiplane deflection angle defined in equation ( <ref type="formula">3</ref>), and where we have explicitly included our proposal for the macromodel deflections &#945;macro in place of the nuisance parameters N .</p><p>Using &#946;, we define a deflection field associated with line-of-sight haloes behind the main deflector, &#945; &#946; , as illustrated by the blue line in Fig. <ref type="figure">2</ref>. This deflection field is a function of the following quantities: First, T x represents the comoving position where a light ray strikes the main lens plane; secondly, an angle &#952; front , which is the observed angle on the sky &#952; plus the cumulative deflections from foreground haloes; thirdly, &#945; sub , the deflection field associated with main deflector subhaloes; and fourthly, the coordinate on the source  <ref type="formula">9</ref>). The figure depicts a backward ray tracing operation beginning from the observer on the left and ending at the source on the right. By performing one ray tracing calculation through the lens volume to the source plane, we calculate &#945; &#946; , an effective deflection field from haloes at z d &lt; z &lt; z s , and apply this deflection field across the main deflector lens plane. This simplification preserves the essential properties of the multiplane deflection field that results from equation (3) while permitting lens mass and source reconstruction with the same computational cost as a single-plane calculation.</p><p>plane &#946; we compute with equation (3) and &#945;macro . Expressing &#945; &#946; in terms of these quantities gives</p><p>The approximation we make is to apply the deflection field &#945; &#946; across the main lens plane for any subsequent ray tracing operation for a given population of dark matter haloes. This results in a lens equation for a coordinate on the source plane &#946;,</p><p>Note that we must still evaluate the main deflector deflection angles &#945; macro at the positions T x defined in step (i) in the previous section. This version of the multiplane lens equation resembles a single-plane lens equation that is linear in the macromodel deflections &#945; macro .</p><p>The deflection field &#945; &#946; is computed with equation ( <ref type="formula">3</ref>), so we expect that it will capture the small-scale lensing distortions associated with multiplane ray tracing. However, after performing a lens modelling operation with equation ( <ref type="formula">9</ref>), we cannot go back to interpret the physical properties (mass, location, density profile, etc.) of individual dark matter haloes behind the main deflector. Physically, our assumption implies that the deflection field produced by the background population of substructures depends primarily on the intrinsic dark matter characteristics of that population and other fixed geometrical effects, and that flux ratio statistics we obtain from considering many realizations of substructure do not depend strongly on the coupling to the main deflector deflection field. This formalism shares some similarities with the perturbative formalism presented by Fleury, Larena &amp; Uzan ( <ref type="formula">2021</ref>), but differs in that we compute &#945; &#946; with exact ray tracing. Equation ( <ref type="formula">9</ref>) increases the speed of lens mass and source light reconstruction with line-of-sight haloes included in the lens model because it decouples deflections produced by haloes behind the main deflector from deflections produced in the main lens plane. Thus, using equation ( <ref type="formula">9</ref>) requires only one full ray tracing calculation to the source plane per coordinate in the image plane, circumventing the repeated evaluation of step (iii) for each new proposal of &#945; macro . A lens mass and source light reconstruction with substructure performed according to this procedure takes less than 10 min, corresponding to an increase in speed by a factor between 100 and 1000, depending on the number of line-of-sight haloes behind the main deflector. We have added this decoupled multiplane approximation for optional use in LENSTRONOMY. 5   </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Validity of the decoupled multiplane approximation</head><p>We can check the validity of the approximation discussed in the previous section for predicting image positions and flux ratio statistics through comparisons with the statistics obtained by exact multiplane ray tracing. First, using exact ray tracing techniques discussed by <ref type="bibr">Gilman et al. (2019)</ref> we compute p eqn3 O pos , O f |q cdm , the probability of observing a given set of flux ratios with subhaloes and line-of-sight haloes included in the lens model with properties as prescribed by CDM (represented by q cdm ). We then repeat this procedure using the ray tracing approximation discussed in the previous section to compute the likelihood p eqn9 O pos , O f |q cdm .</p><p>For details regarding the substructure models we use for these tests, we refer to Section 4.1. We perform these calculations using the image positions of a reference mock lens model created without substructure (hereafter, the 'smooth model'). This reference model has a cross image configuration with lens (source) redshifts z d = 0.5 (z source = 1.5), and a mass profile parametrized as an elliptical power law (EPL) with Einstein radius of 1 arcsec, an axis ratio of 0.75, a logarithmic mass profile slope of -2.0, and external shear strength of 0.09. We have also performed a similar test for a fold image configuration.</p><p>Fig. <ref type="figure">3</ref> shows the joint likelihoods for the three flux ratios of the mock lens, with the flux ratios of the reference smooth lens model marked with the green points. The likelihood computed through exact ray tracing is shown in black, while the likelihood computed with the approximation introduced in the previous section is represented in blue. The likelihoods peak at the smooth model flux ratio values, which is simply a statement that substructure introduces perturbations around the flux ratios predicted by the smooth lens model. A dark matter inference with flux ratios requires the characterization of this multidimensional probability density. Dark matter substructure deforms the structure of this probability distribution in a distinct way from other sources of small-scale perturbation, such as multipole terms added to the main deflector mass profile.</p><p>The requirement of the approximation we introduce is that it predicts identical flux ratio statistics for a given dark matter model. Kolmogorov-Smirnov tests performed on the marginal distributions of the flux ratios shown in Fig. <ref type="figure">3</ref> return p-values greater than 0.99, indicating that the distributions of model-predicted flux ratios are statistically indistinguishable. We have also tested the approximation for an identical set of 10 000 realizations, as opposed to 10 000 unique realizations generated from q. We compute the model-predicted flux ratios with and without the decoupled multiplane approximation, and initialize the solver applied to the macromodel parameters from the same random seed. Predicting the same flux ratios for an identical realization of haloes is not formally a requirement that the method needs to satisfy to predict consistent flux ratio statistics, but none the less we find that for identical realizations, 95 per cent of the samples obtained from exact ray tracing and the approximation we present differ by less than 5 per cent. We can conclude that the approximation presented in the previous section does not introduce a detectable bias in the model-predicted image flux ratios for a CDM dark matter model while decreasing the time per flux ratio calculation by a factor of 5-10.</p><p>Unlike the flux ratios and image positions, it is computationally intractable to compare our approximation with exact ray tracing when reconstructing imaging data for the reasons discussed in Section 3.1. Instead, we perform tests with simulated data sets to verify that we obtain unbiased inferences of dark matter substructure properties when using this approximation to reconstruct imaging data with substructure included in the lens model. We describe the details of these simulations in the following section.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">TESTS ON SIMULATED DATA</head><p>This section details how we create simulated data sets with which to test the lens modelling methodology discussed in the previous section. Section 4.1 discusses the WDM model on which we test the methodology. Section 4.2 discusses the properties of the simulated main deflectors we use in our simulations. Section 4.3 details the parametrization of the lens and source light models used to create and model the simulated data sets. Section 4.4 details the modelling assumptions related to the observing conditions and point spread function. Throughout this section, we use U to represent a uniform prior and N to represent a Gaussian prior, not to be confused with N , the vector of nuisance parameters appearing in equation (2).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Modelling of dark matter subhaloes and line-of-sight haloes</head><p>We test the methodology presented in Section 3 on a WDM model, although the methodology we present is applicable to any theory that predicts the abundance and internal structure of haloes. WDM refers to a class of theory in which the abundance and density profiles of dark matter haloes become suppressed below a certain mass threshold determined by the free-streaming length. We model the halo mass function in WDM using the parametric form </p><p>We use a pivot scale of m 0 = 10 8 M , and a logarithmic profile slope of &#945; = 1.9 <ref type="bibr">(Springel et al. 2008</ref>). The normalization is related to the projected mass in substructure in the range of 10 6 -10 10 solar masses by f proj = 10 7 sub /0.01 kpc -2 M kpc -2 , and Nbody simulations of massive ellipticals predict typical values in the range of &#8764;2-3 &#215; 10 7 M kpc 2 (e.g. <ref type="bibr">Fiacconi et al. 2016)</ref>, although these numbers are uncertain due to various numerical uncertainties inherent to the simulations, such as the artificial disruption of MNRAS 533, <ref type="bibr">1687-1713 (2024)</ref> subhaloes and subhalo finders. To encompass a broad range of theoretical uncertainties associated with sub , we use a log-uniform prior between log 10 sub = -2.5 and log 10 sub = -1.0. We apply the same suppression function in equation ( <ref type="formula">10</ref>) to both the line-ofsight and subhalo mass functions.</p><p>We model halo density profiles as tidally truncated Navarro-Frenk-White profiles <ref type="bibr">(Navarro, Frenk &amp; White 1997;</ref><ref type="bibr">Baltz, Marshall &amp; Oguri 2009)</ref>:</p><p>where &#961; s is a characteristic central density, r s is the scale radius, and r t implements a tidal radius. For field haloes, we set r t equal to r 50 , which is comparable to the splash-back radius of a halo <ref type="bibr">(Adhikari, Dalal &amp; Chamberlain 2014;</ref><ref type="bibr">Diemer &amp; Kravtsov 2014;</ref><ref type="bibr">More, Diemer &amp; Kravtsov 2015)</ref>. We truncated subhalo density profiles based on the mass and three-dimensional position inside the host (see <ref type="bibr">Gilman et al. 2020</ref>).</p><p>The central density &#961; s determines the lensing efficiency of a halo of a fixed total mass. The delayed onset of structure formation in WDM models suppresses the central density of haloes with mass below m hm <ref type="bibr">(Bose et al. 2016;</ref><ref type="bibr">Ludlow et al. 2016)</ref>. The concentrationmass relation establishes the connection between &#961; s and halo mass through the concentration parameter, c. We use the concentrationmass relation presented by <ref type="bibr">Diemer &amp; Joyce (2019)</ref>, and implemented with the software COLOSSUS <ref type="bibr">(Diemer 2018)</ref>, to assign concentrations to CDM haloes. We compute the concentrations in WDM according to <ref type="bibr">(Bose et al. 2016</ref>)</p><p>where &#946; (z) = 0.026 -0.04z. We generate line-of-sight haloes (subhaloes) with (infall) masses in the range of 10<ref type="foot">foot_7</ref> -10 10 M . Haloes more massive than 10 10 M would likely contain a luminous galaxy, in which case we would include these objects in the lens macromodel. Haloes less massive than 10 6 M lie below the sensitivity threshold of our data given our assumptions regarding the background source size (see the next section).</p><p>In the dark matter inference, we sample sub from a log-uniform prior log 10 sub &#8712; U (-2.5, -1.0). This is a broad and uninformative prior that we use to reveal any degeneracies between sub and m hm , and to understand to what degree imaging data can break these degeneracies. We sample log 10 m hm &#8712; U (4.0, 10.0). For both the halo mass function and concentration-mass relation, values of m hm &lt; 10 5 M result in mass functions and concentrationmass relations that deviate from the CDM prediction below the estimated sensitivity threshold of our data; thus, we can consider these realizations as consistent with CDM. We fix the values of all other parameters introduced in this section to the stated values.</p><p>We create two sets of simulated data with which to test our inference methodology. First, we create a sample of 25 lenses with a CDM ground truth using sub = 0.05 kpc -2 and m hm = 0. The chosen value of sub roughly corresponds to the amount of substructure inferred by <ref type="bibr">Gilman et al. (2020)</ref> and is consistent with N-body simulations to within an O (10) factor <ref type="bibr">(Fiacconi et al. 2016)</ref>. Secondly, we create a sample of 25 lenses with a WDM ground truth with sub = 0.04 kpc -2 and m hm = 10 7.5 M . Both sets of mocks have the same main deflector mass models and background sources, but the image positions and flux ratios between them differ slightly due to the different populations of haloes in the lens models.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Mass profile of the main deflectors</head><p>In this section, we discuss how we create simulated main deflector mass profiles for the mock lenses (Section 4.2.1) and how we model the mock lenses during the inference performed on the mock data sets (Section 4.2.2).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.1">Creating mock lens mass profiles</head><p>To test the methodology discussed in Section 2, we create a sample of 25 mock lens systems with properties broadly comparable to the known population of such systems <ref type="bibr">(Auger et al. 2010;</ref><ref type="bibr">Oguri &amp; Marshall 2010)</ref>. The mocks have lens (source) redshifts in the range of 0.3-0.9 (0.9-3.0). We model the main deflector galaxy as an EPL mass profile with an Einstein radius set to 1 arcsec for each system, axis ratios in the range of 0.50-0.95, and logarithmic mass profile slopes &#947; drawn from a Gaussian prior N (2.0, 0.1). We apply external shear across the main lens plane with a random orientation and a strength &#947; ext in the range of 0.02-0.16.</p><p>The observed population of elliptical galaxies sometimes exhibits deviations from ellipticity quantified in terms of multipole perturbations on top of the elliptical mass profile <ref type="bibr">(Bender et al. 1989;</ref><ref type="bibr">Hao et al. 2006)</ref>. A multipole perturbation adds convergence 6 :</p><p>where r is the separation in arcseconds from the mass centroid, the angle &#966; m determines the orientation, and a m(phys) is the amplitude of the convergence associated with the multipole perturbation. <ref type="bibr">Oh et al. (in preparation)</ref> further explore the implications of these multipole perturbations in the context of flux ratio analyses in strong lenses.</p><p>We base our implementation of the multipole perturbations on the observed properties of 847 elliptical galaxies presented by <ref type="bibr">Hao et al. (2006)</ref>. The shape of the isodensity contours inferred from the light (and assuming that light traces mass) can be related to the physical amplitude of the perturbation by a m(phys) = a m &#215; &#952; E / &#8730; q, where &#952; E is the Einstein radius, q is the axis ratio of the ellipse, and a m represents the deviation from ellipticity of the light. The third-(m = 3) and fourth-order (m = 4) moments make the dominant contribution to the multipole expansion of galaxy shapes <ref type="bibr">(Bender et al. 1989</ref>). <ref type="bibr">Hao et al. (2006)</ref> find a 3 distributed as N (0.0, 0.005) with values of &#966; 3 uncorrelated with the position angle of the underlying mass profile. <ref type="bibr">Hao et al. (2006)</ref> also measure a 4 &#8712; N (0.0, 0.01) with an orientation that tends to align with the orientation of the underlying mass profile. When the a 4 orientation aligns with the orientation of the underlying ellipse, the profile appears boxy (a 4 &lt; 0) or disky (a 4 &gt; 0). The observed amplitudes a 3 and a 4 have no apparent correlation.</p><p>Based on the findings by <ref type="bibr">Hao et al. (2006)</ref>, when creating mock deflectors we include the dominant m = 3 and m = 4 terms and use priors for their observed amplitudes a 3 &#8712; N (0.0, 0.005) and a 4 &#8712; N (0.0, 0.01). Based on the measurements by <ref type="bibr">Hao et al. (2006)</ref> and <ref type="bibr">Oh et al. (2024)</ref>, we enforce alignment between the a 4 orientation and the underlying EPL profile (producing boxy or disky contours), and sample &#966; 3 &#8712; U (-&#960;/6, &#960;/6). For additional discussion regarding the role of multipole perturbations in dark matter inferences with quadruply imaged quasars, we refer to Appendix B.</p><p>MNRAS 533, 1687-1713 (2024)</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2.2">Modelling of the lens mass profile</head><p>When modelling the mock lenses, all of the parameters that describe the EPL profile are left free to vary while reconstructing the imaging data, as well as the strength and position angle of the external shear. We draw a 3 , a 4 , and &#966; 3 from the same priors as those used to create the simulated data sets. During the reconstruction of the imaging data for each realization, we keep the multipole terms fixed to the values drawn from their respective priors. We eventually constrain these parameters when down-selecting on the imaging data and flux ratio summary statistics, as discussed in Section 2.2.</p><p>We have experimented with allowing a 3 and a 4 to vary freely while reconstructing the imaging data, but find that this causes their inferred amplitudes to take on unphysical values. This unexpected behaviour could arise from degeneracies in the imaging data likelihood between multipole perturbations to the lens model and full populations of dark matter haloes, as well as limitations associated with the PSF and source reconstruction. During the lens modelling, we include a Gaussian prior on &#947; , the logarithmic slope of the main deflector mass profile, with a mean of -2.0 and standard deviation of 0.2.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Source and lens light models</head><p>In the next two sections, we discuss the lens and source light models used to create the simulated data sets (Section 4.3.1), and how we model the lens and source light profiles in the inference (Section 4.3.2).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.1">Creating mock lens and source light profiles</head><p>We parametrize the main deflector light as a circular S&#233;rsic profile <ref type="bibr">(S&#233;rsic 1963)</ref>. The source light model includes two components: the lensed quasar and its host galaxy. For the quasar, we assume flux ratios measured from the warm dust region now observable with JWST <ref type="bibr">(Nierenberg et al. 2024</ref>) with a physical size of &#8764;1-10 pc. To create the mocks, we model the quasar emission as a circular Gaussian with a full width at half-maximum sampled from a uniform prior U (1-10) pc. We assume a flux ratio measurement precision of 3 per cent, and an astrometric precision in the relative quasar image positions of 5 mas, based on the recent measurements <ref type="bibr">(Nierenberg et al. 2024)</ref>.</p><p>To create realistic lensed arcs, we place the spiral galaxy shown in Fig. <ref type="figure">4</ref> at the source redshift for each of the 25 mock deflectors. We extract this source from the COSMOS survey catalogue <ref type="bibr">(Koekemoer et al. 2007</ref>) using the software package PALTAS <ref type="bibr">(Wagner-Carena et al. 2023</ref>). This particular galaxy was selected because it exhibits enough morphological complexity (spiral arms) to warrant a smallscale basis set expansion of its light profile to reproduce a lensed image. Many real strong lens systems exhibit this level of complexity in their inferred source light profiles, and we include this feature in our simulations to determine whether our methodology yields unbiased inferences of substructure properties with a complex source morphology.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3.2">Modelling of lens and source light profiles</head><p>We model the main deflector light as an elliptical S&#233;rsic profile. We model the quasar emission region as a circular Gaussian, and sample its size uniformly from a prior U (1, 10) pc for each system. We model the quasar host galaxy with an elliptical S&#233;rsic profile with additional small-scale complexity implemented through shapelet basis functions <ref type="bibr">(Birrer et al. 2015</ref>). An integer n max determines the degree of complexity these functions can describe, with the complexity of the reconstructed image with increasing n max .</p><p>To choose an appropriate level of source complexity in the model, we choose the value of n max that minimizes the Bayesian information criterion (BIC) defined as</p><p>where k is the number of model parameters, n represents the number of data points, and max [L] represents the maximum likelihood of the data given the model. The BIC statistic compensates between obtaining a better fit to data and overfitting a model. To calculate the BIC, we fit a smooth lens model (i.e. a lens model without substructure) to each mock. For each mock system, we found that the BIC reaches a minimum for a source model consisting of an elliptical S&#233;rsic profile plus shapelets at n max = 10. With this source model, we obtain a reduced &#967; 2 per degree of freedom; &#967; 2 /DOF &#8776; 1.2, with DOF = 3694, for the lens models accepted based on the imaging data likelihood. Appendix A provides additional discussion regarding the reconstruction of the source light in our simulations.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Point spread function and observing conditions</head><p>Most of the known quadruply imaged quasars, and many of those with flux ratios recently measured by JWST, have archival HST imaging <ref type="bibr">(Shajib et al. 2019;</ref><ref type="bibr">Schmidt et al. 2023)</ref>. Anticipating use of these data, we therefore assume HST-like observations with a pixel size of 0.05 arcsec, an rms background noise per pixel of 0.006 photons s -1 , and an exposure time of 1600 s. We use a Gaussian point spread function model with a width of 100 mas in the creation and modelling of the mock lenses.<ref type="foot">foot_8</ref> </p><p>MNRAS 533, 1687-1713 (2024)  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">RESULTS</head><p>This section presents the results of the inference of the lens model and substructure properties obtained from 25 simulated strong lens systems assuming a CDM ground truth, and 25 lens systems created assuming a WDM ground truth. Both sets of lens systems are analysed using the inference methodology discussed in Section 2, the lens modelling approach discussed in Section 3, and the simulation details presented in Section 4. We begin in Section 5.1 with case studies of four mock lens systems created with a CDM ground truth. We discuss in detail how the image positions, flux ratios, and imaging data work in tandem to simultaneously constrain the mass profile of the main deflector and the properties of substructure in each system. In Section 5.2, we present the joint constraints on the normalization of the subhalo mass function and the free-streaming length of dark matter obtained from the full sample, and quantify the degree to which including constraints from lensed arcs improves constraints on substructure properties relative to existing analysis methods that use only image positions and flux ratios.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1">Case studies</head><p>We begin by analysing the results of applying our inference methodology to four mock lenses created with a CDM ground truth to gain physical insight into how the joint modelling of lensed arcs, image positions, and flux ratios constrains the lens model and the properties of substructure. Figs 5-8 show the four lenses chosen for these case studies. We pick these four systems because they exhibit a variety of image configurations, lens and source redshifts, experience varying degrees of perturbation by haloes, and have among the most informative likelihood functions. The left panels show the simulated lensed images, while the right panels display the true convergence in dark matter substructure for each mock. As in previous work <ref type="bibr">(Gilman et al. 2019)</ref>, we define the convergence for a multiplane lens system in terms of the divergence of the deflection field (see equation 3):</p><p>To illustrate the distribution of dark matter substructure, we subtract the convergence from the lens macromodel, &#954; macro , from the total  convergence given by equation ( <ref type="formula">16</ref>). In place of the deflection field from background haloes, we take the divergence of &#945; &#946; , the effective deflection field from haloes behind the main deflector defined in Section 3.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.1">The complementary information conveyed by imaging data and flux ratios</head><p>As the imaging data subtend angular scales comparable to the image separation, we expect that the reconstruction of the lensed arcs will impose the strongest constraints on the large-scale mass profile of the main deflector. Using all available data (magenta), we obtain the tightest constraints on the macromodel parameters, but adding flux ratio information to lens models already constrained by imaging data leads to only marginal improvement. These trends persist among all the mock lenses we analyse in our simulations, and are consistent with a Figure <ref type="figure">9</ref>. The inference on the macromodel parameters in Mock 4 in the CDM ground truth sample. The black distribution shows the inference obtained from using only image positions and flux ratios to constrain the lens model. The blue distribution results from using image positions and imaging data to constrain the lens model, and the magenta distribution results from using image positions, flux ratios, and imaging data. These distributions are marginalized over the properties of substructure in each system. From left, the x-axis labels correspond to the normalization of the main deflector mass profile &#952; E , the axis ratio q, the position angle of the main deflector ellipticity &#966; q , the external shear strength &#947; ext , the position angle of the external shear &#966; &#947; ext , the logarithmic profile slope of the main deflector &#947; , and the multipole moments a 3 and a 4 . Contours enclose 68 and 95 per cent credible intervals, and the true lens model parameters for the mock lens are marked with the green crosshairs. physical picture in which the large-scale mass distribution of the lens is primarily constrained by imaging data.</p><p>The flux ratios, however, convey vital information for constraining the properties of the deflection field on angular scales below those probed by imaging data. 8 Fig. <ref type="figure">13</ref> shows the joint likelihood function computed with the image positions, flux ratios, and imaging data for 8 We recall that we have constructed the likelihood function in such a way that the posterior distribution of substructure properties given the data can only differ from the prior if one incorporates constraints from the flux ratios (see Section 2.2 and equation 6).</p><p>each of the four case study lenses shown in Figs <ref type="figure">5</ref><ref type="figure">6</ref><ref type="figure">7</ref><ref type="figure">8</ref>. The parameters shown in the figures are sub and m hm , the normalization of the subhalo mass function (equation 11) and the cut-off scale of the halo mass function (equations 10 and 13). The colour scale in Fig. <ref type="figure">13</ref> corresponds to the relative likelihood between positions in the parameter space. The top-left region of parameter space includes dark matter models with a significant suppression of the halo mass function and relatively few subhaloes, while the bottom-right corner of parameter space includes a plethora of subhaloes and a CDM-like halo mass function. The likelihoods shown in Fig. <ref type="figure">13</ref> exhibit clear preferences for models with a plethora of substructure in the case of Mocks 6 and 23, and for relatively little substructure for Mocks 4 and 11. Note that the improvement in the inference of the macromodel parameters shown in Figs 9-12 after adding flux ratio information does not significantly change between the four case study lenses, and thus the degree to which the flux ratios constrain the large-scale mass distribution of the lens does not depend on the amount of substructure required to fit the flux ratios. However, as we will discuss in the next section, the imaging data strengthen inferences of substructure properties by breaking degeneracies between large-scale deformation of the main deflector mass profile and small-scale perturbations caused by haloes.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.2">Visualizing accepted and rejected realizations</head><p>A useful feature of the open-source code we present with our analysis, SAMANA, 9 is the ability to recreate a lens model from a random seed assigned to each realization that we record as a model parameter. Thus, after down-selecting on lens models and substructure realizations following the methodology discussed in Section 2.2, we can regenerate lens models from the random seeds to gain physical insight as to why we reject or accept certain realizations when computing the likelihood.  two examples of lens models that we would accept based on the image positions and flux ratios, but which we reject based on a poor fit to the imaging data (bottom two rows). From left, the columns show the reconstructed lensed image, the projected multiplane convergence in substructure obtained from subtracting the macromodel convergence from the total convergence, i.e. 1 2 &#8711; &#8226; &#945; eff&#954; macro , and the normalized residuals from the fit to the imaging data. In the centre panels, we label the observed (model-predicted) flux ratios in green (black), and the true (model-predicted) critical curves in green (black). We have included the critical curves in these figures to serve as a proxy for the shape of the main deflector. Alignment of the critical curves indicates an accurate reconstruction of the main deflector mass profile.</p><p>As shown in the top two rows of each figure, the realizations that we accept simultaneously match the small-scale properties of the deflection field constrained by the flux ratios and the largescale properties of the deflection field primarily constrained by the imaging data. The bottom two rows of Figs <ref type="figure">14</ref><ref type="figure">15</ref><ref type="figure">16</ref><ref type="figure">17</ref>show examples of realizations that match the observed image positions and flux ratios, but which we reject based on a poor fit to the imaging data. In the rejected lens models, a particular configuration of dark matter haloes conspires with a large-scale deformation of the deflection field to produce the correct flux ratios, but these configurations of the lens model cannot reproduce the observed lensed arcs. These figures provide a visual illustration of how incorporating imaging data breaks degeneracies between large-and small-scale properties of the lens model, isolating flux ratio perturbations caused by haloes from large-scale deformations of the deflection field constrained by the arcs. Figs 14-17 also serve to aid in the interpretation of the likelihood functions shown in Fig. <ref type="figure">13</ref>, with Mock 6 providing a particularly clear illustration of how perturbations by dark matter haloes manifest in the likelihood. Closely examining the true multiplane convergence map for Mock 6 in right panel of Fig. <ref type="figure">6</ref>, a collection of dark matter subhaloes and line-of-sight haloes appear in close proximity to image A (the bottom-right image). The collective impact of these structures imparts an &#8764;12 per cent perturbation to the magnification of this image. To match this feature in the data, substructure models that match the flux ratios in Mock 6 tend to have a single massive halo, or a collection of low-mass haloes, perturbing image A. These haloes appear prominently in the convergence maps shown in the centre panels of Fig. <ref type="figure">15</ref>.</p><p>Substructure realizations with haloes perturbing the images in Mocks 6 and 23 occur more frequently in CDM than in WDM, and thus the likelihood functions shown in Fig. <ref type="figure">13</ref> for these systems punish models with fewer haloes. On the other hand, Mocks 4 and 11 have flux ratios consistent with those predicted by a smooth lens model to within the measurement uncertainties. As such, the substructure realizations that match the flux ratios for Mocks 4 and 11 tend to have fewer haloes than the dark matter models that match the flux ratios in Mocks 6 and 23, as reflected in the likelihoods. The likelihood function from the full sample of mock lenses results from a product of the individual likelihoods, and is discussed in the next section. MNRAS 533, 1687-1713 (2024) (2019), which use only the image positions and flux ratios to constrain the lens model and substructure properties. The magenta contour in Fig. <ref type="figure">18</ref> shows the constraints resulting from applying the methodology presented in Section 2, in which we use the lensed arcs, image positions, and flux ratios to constrain the lens model. Both distributions assume a flux ratio measurement precision of 3 per cent. To make a direct comparison between these two approaches and evaluate the relative improvement, we compute the likelihood obtained from only the image positions and flux ratios (black contours) using the same tolerance threshold to down-select on the flux ratio summary statistics when computing the magenta constraints, which make use of all available data.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2">Inference on substructure properties from the full sample</head><p>In terms of credible intervals, incorporating imaging data improves the 95 per cent exclusion level by 0.5 dex; with only image positions and flux ratios, we find log 10 m hm &lt; 10 7.7 M , and log 10 m hm &lt; 10 7.2 M when incorporating imaging data with a log-uniform prior on m hm &#8712; U (4, 10). We can also quantify the improvement gained by incorporating imaging data in terms of relative likelihoods, which do not depend on the prior. First, we define a region of parameter space associated with CDM as having 4.0 &lt; log 10 m hm /M &lt; 4.5, and regions of parameter space associated with WDM as bins in log 10 m hm with a width of 0.5 dex between 10 7 and 10 9 M . We then compute the relative likelihood between CDM and WDM as the volume of the posterior with log 10 m hm &lt; 4.5 to the volume of the posterior with log 10 m hm in each bin.</p><p>Table <ref type="table">1</ref> summarizes the inferred likelihood ratios. In the 'coldest' WDM bin with m hm in the range of 10 7 -10 7.5 M , incorporating constraints from the lensed arcs improves the likelihood ratios punishing WDM models by a factor of 1.3. At scales of m hm &#8712; 10 7.5 -10 8 M , adding imaging data strengthens the likelihood ratios by a factor of 2.5, eventually reaching a factor of 13.1 for m hm &#8712; 10 8.5 -10 9 M . The likelihood function shrinks the volume of the posterior distribution relative to the prior volume by a factor of 4 using only image positions and flux ratios, and by a factor of 7 using the image positions, flux ratios, and imaging data.</p><p>Figs 19 and 20 show the inference on 25 lenses created with a WDM ground truth m hm = 10 7.5 M using the lensed arcs and flux ratios. Fig. <ref type="figure">19</ref> assumes a flux ratio measurement precision of 1 per cent, and Fig. <ref type="figure">20</ref> assumes a flux ratio measurement uncertainty of 3 per cent. The black distribution corresponds to a log-uniform prior on the amplitude of the subhalo mass function, and the magenta results from assuming a prior on the amplitude of the subhalo mass function log 10 sub = -1.4 &#177; 0.2.</p><p>Our inference method recovers the input values for these parameters, even after marginalizing over the main deflector mass profile including third-and fourth-order multipole perturbations, the size of the warm dust region surrounding the lensed quasar, and the lensed quasar host galaxy light. The covariance between sub and m hm manifests more prominently for these inferences than for the CDM ground truth (Fig. <ref type="figure">18</ref>), but incorporating an informative prior for the amplitude of the subhalo mass function can aid in breaking this covariance. In practice, such a prior could come from N-body simulations or semi-analytical models (e.g. <ref type="bibr">Benson 2012;</ref><ref type="bibr">Fiacconi et al. 2016;</ref><ref type="bibr">Jiang et al. 2021;</ref><ref type="bibr">Mansfield et al. 2024;</ref><ref type="bibr">Nadler et al. 2023a;</ref><ref type="bibr">Du et al. 2024)</ref>, which make increasingly robust predictions for the number of main deflector subhaloes that appear in projection near the Einstein radius in typical host haloes of &#8764;10 13 M . Alternatively, a prior on the amplitude of the subhalo mass function could come from measurements of the halo mass function in lenses from gravitational imaging (e.g. <ref type="bibr">Vegetti et al. 2014;</ref><ref type="bibr">Hezaveh et al. 2016;</ref><ref type="bibr">He et al. 2022;</ref><ref type="bibr">Wagner-Carena et al. 2023)</ref>. The marginal likelihood of m hm excludes CDM for the posteriors that assume a prior on sub , with log 10 m hm /M &gt; 6.7 and log 10 m hm /M &gt; 5.2 for flux ratio measurement uncertainties of 1 and 3 per cent, respectively.</p><p>Comparing Figs 19 and 20, the inference on WDM parameters is particularly sensitive to the measurement uncertainty in the flux ratios. The systems observed by JWST <ref type="bibr">(Nierenberg et al. 2024</ref>) have typical uncertainties of 3 per cent, but we have included the inference MNRAS 533, <ref type="bibr">1687-1713 (2024)</ref> 19. The joint posterior on the normalization of the subhalo mass function sub and the half-mode mass m hm for a simulated data set with a WDM ground truth m hm = 10 7.5 M . The posterior results from flux ratio measurement uncertainties of 1 per cent. Black contours show the posterior with a log-uniform prior on sub , and magenta contours show the result of incorporating a Gaussian prior on sub centred on the ground truth value of log 10 sub = -1.4 with a width of 0.2 dex. As in Fig. <ref type="figure">18</ref>, contours correspond to 68 and 95 per cent credible intervals, the red crosshairs mark the input ground truth, and the vertical bars in the m hm marginal likelihood represent 95 per cent exclusion limits. assuming 1 per cent uncertainties to demonstrate that our inference methodology can recover input ground truth with sufficient measurement precision. The constraints obtained assuming 1 per cent precision suggest that a larger sample of lenses with 3 per cent uncertainties could yield a statistically significant constraint on WDM models with a turnover of m hm &#8764; 3 &#215; 10 7 M .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">CONCLUSIONS</head><p>We present a self-consistent formalism to jointly model lensed image positions, flux ratios, and extended lensed arcs in strong lens systems comprised of a multiply imaged quasar and extended emission from a background galaxy. To address the computational challenge that has precluded the joint reconstruction of flux ratios and lensed arcs to date, we develop an approximation scheme for full multiplane ray tracing. To validate the methodology, we test it on 25 simulated strong lens systems to constrain a fiduciary WDM model with simulated data sets prepared assuming CDM. We assume that observations of lensed arcs come from the HST, and flux ratios from the warm dust region observed by JWST with measurement uncertainties of 3 per cent. Our simulations account for finite source size effects in the calculation of image magnifications, and we marginalize over the unknown source size for each system. The simulated lenses include a complex source morphology in the form of a spiral galaxy, and deviations from an elliptical symmetry in the main lens mass profile parametrized by m = 3 and m = 4 multipole terms. As a point of comparison for the new lens modelling techniques we present, we analyse the same set of 25 mock lenses using the lens modelling methods presented by <ref type="bibr">Gilman et al. (2019)</ref>, which use only image positions and flux ratios to constrain the lens mass profile and substructure properties. Our main results are summarized as follows:</p><p>(i) Incorporating lensed arcs leads to stronger constraints on the free-streaming length of WDM than analyses that use only image positions and flux ratios to constrain the lens model. The 95 per cent exclusion limit on the half-model mass m hm improves by 0.5 dex. The relative likelihood of CDM to WDM improves by factors of 1.3, 2.5, 5.6, and 13.1 for WDM models with mass function turnovers of m hm &#8712; 10 7 -10 7.5 M , 10 7.5 -10 8.0 M , 10 8.0 -10 8.5 M , and 10 8.5 -10 9.0 M , respectively, and the posterior volume shrinks by a factor of 1.8. In Section 5.1, we show that this additional constraining power comes from breaking degeneracies between large-scale deformation of the deflection field, which we constrain with the lensed arcs, and small-scale perturbation to image magnifications by dark matter haloes.</p><p>(ii) Our method can recover the free-streaming cut-off in a WDM mass function, although the ability to detect a WDM cut-off near 10 7 M requires measurement precision of 1 per cent, or a larger sample of lenses with both flux ratio measurements and lensed arcs than the 25 considered here. Theoretically motivated priors for the amplitude of the subhalo mass function can aid in breaking covariance between the number of subhaloes and the free-streaming cut-off.</p><p>(iii) The presence of multipole perturbations in the lens mass profile, provided we also include these terms in the lens models used to analyse data, does not incur a detectable source of systematic bias in inferred substructure properties when only image positions and flux ratios are used to constrain the lens model. Thus, we can apply the methods presented by <ref type="bibr">Gilman et al. (2019)</ref> to model quadruply imaged quasars without prominent lensed arcs.</p><p>The methodology we present can be applied to any dark matter model that predicts the form of the halo mass function and halo density profiles. For example, in SIDM theories haloes can undergo core collapse, a process that significantly increases their central density and therefore their lensing efficiency <ref type="bibr">(Gilman et al. 2021</ref><ref type="bibr">(Gilman et al. , 2023;;</ref><ref type="bibr">Minor et al. 2021;</ref><ref type="bibr">Yang &amp; Yu 2021;</ref><ref type="bibr">Nadler et al. 2023b</ref>). In fuzzy dark matter models, wave interference effects produce density fluctuations in the lens mass profile that impact both flux ratios and lensed arcs <ref type="bibr">(Laroche et al. 2022;</ref><ref type="bibr">Powell et al. 2023</ref>). In terms of a direct test of a key prediction of CDM, incorporating constraints from lensed arcs increases sensitivity to perturbation by low-mass substructure, as indicated by the stronger constraints on mass function turnovers on scales below 10 7.5 M . This increased sensitivity will aid in pushing constraints from strong lensing to scales below the threshold of galaxy formation, to scales &#8764;10 7 M and below.</p><p>To test the methods described in this paper, we have made various simplifying assumptions when creating the simulated data sets and in the modelling of dark matter substructure. First, we have assumed perfect knowledge of the PSF when reconstructing the imaging data. In practice, one must simultaneously reconstruct the PSF with the lensed image and source. We can easily incorporate the PSF reconstruction in our analysis when analysing real data. Secondly, we have made several simplifying assumptions regarding the dark matter substructure model, including perfect knowledge of the amplitude of the line-of-sight halo mass function and logarithmic slope of the subhalo mass function. Improved treatments of the substructure models based on the semi-analytical model GALACTICUS are being developed for use in forthcoming analyses, but these models were not developed at the time we created the simulated data used in this work. 10 We expect that an improved treatment of the tidal evolution of subhaloes will lead to stronger constraints on dark matter models, but it does not affect our conclusions regarding the relative improvement from incorporating constraints from lensed arcs.</p><p>The number of mock lenses we have analysed in this work is partially motivated by the number of strong lens systems for which we currently have archival HST imaging data of lensed arcs and flux ratio measurements suitable for a millilensing analysis of dark substructure. Suitable flux ratios for millilensing must come from a region surrounding the background quasar spatially extended by 1 pc such that it becomes immune to contamination from stellar microlensing. Such measurements can come from observations of nuclear narrow-line emission from Keck and the HST <ref type="bibr">(Nierenberg et al. 2014</ref><ref type="bibr">(Nierenberg et al. , 2017</ref><ref type="bibr">(Nierenberg et al. , 2020))</ref>, radio measurements from very long baseline interferometry <ref type="bibr">(Koopmans et al. 2004;</ref><ref type="bibr">McKean et al. 2007;</ref><ref type="bibr">Hsueh et al. 2020)</ref>, or emission from the warm dust region measured with JWST <ref type="bibr">(Nierenberg et al. 2024)</ref>. The of strong lensing flux ratios and extended lensed arcs, in combination with these various data sets from ground-and space-based observatories, advances the observational frontier of cosmic probes of dark matter physics to uncharted territory.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A P P E N D I X A : T H E I M AG I N G DATA L I K E L I H O O D</head><p>As discussed in Section 2.2, our strategy for incorporating the imaging data likelihood is one in which the imaging data alone do not constrain dark matter hyper-parameters. This requirement differs from the likelihood function relevant for gravitational imaging of individual haloes (e.g. <ref type="bibr">Vegetti et al. 2014;</ref><ref type="bibr">Powell et al. 2022</ref><ref type="bibr">Powell et al. , 2023))</ref>, in which one explicitly uses imaging data to characterize the mass and position of a dark substructure. Obtaining a reliable likelihood of substructure properties from the imaging data requires a careful calibration of the sensitivity function of the lensed arc and various systematics associated with the lens and source light models <ref type="bibr">(Vegetti et al. 2014;</ref><ref type="bibr">Cao et al. 2022;</ref><ref type="bibr">Despali et al. 2022;</ref><ref type="bibr">He et al. 2023;</ref><ref type="bibr">O'Riordan &amp; Vegetti 2024)</ref>. The strategies to calibrate the sensitivity function and contend with systematic uncertainties in current gravitational imaging studies with single-halo models do not necessarily carry over to our analysis methods because we perform the lens mass and source light reconstruction with full populations of subhaloes and line-of-sight haloes.</p><p>Fig. <ref type="figure">A1</ref> shows the imaging data likelihoods derived in our analysis. The four panels show the distribution of log-likelihoods derived from fits to the imaging data for the four case study mock lenses. Vertical bars represent varying degrees of knowledge regarding the true population of haloes and the true structure of the lensed source, as indicated by the figure legend. The black and red distributions show the log-likelihoods obtained for WDM realizations (m hm &gt; 10 8 M ) and CDM-like realizations (m hm &lt; 10 6 M ) that match the flux ratios, as indicated by the tolerance threshold for acceptance based on the flux ratio summary statistic S (equation 4).</p><p>Several features apparent in Fig. <ref type="figure">A1</ref> dissuade us from using the imaging data likelihood to directly constrain the properties of substructure. First, we see that randomly generated populations of Downloaded from <ref type="url">https://academic.oup.com/mnras/article/533/2/1687/7721636</ref> by UC -Merced user on 26 December 2025 Figure <ref type="figure">A1</ref>. The log-likelihood of the imaging data inferred for the four mock case study lenses after down-selecting on realizations that fit the observed flux ratios, as indicated by the threshold applied to the S statistic in each panel. The grey and red histograms show values of the log-likelihood for realizations with m hm above 10 8 M and below 10 6 M , respectively. Vertical bars represent the log-likelihoods from fits to the mock data when portions of the lens and source light model are known perfectly. Green vertical bars represent the log-likelihood obtained with perfect knowledge of the source. Black vertical bars represent the log-likelihood computed with imperfect knowledge of the source. Solid lines correspond to the log-likelihood obtained with knowledge of the 'true' population of substructure, while dashed lines correspond to a smooth lens model fitted to the mock lens. haloes, i.e. the 'wrong' substructure models, sometimes result in better fits to the imaging data than the 'correct' population of haloes when we have imperfect knowledge of the source. Secondly, models with fewer haloes (shown in red) systematically improve the imaging data likelihood relative to models with many haloes (black). Both of these features could arise from degeneracies between small-scale structure in the lens mass distribution and small-scale features in the source light. These considerations motivate the inclusion of the importance sampling weights in equation ( <ref type="formula">6</ref>), which one can interpret as an adjustment of the prior volume associated with the source light model such that all dark matter models are equally likely when constrained by imaging data alone.</p><p>We have experimented with re-running the analysis for some mock systems with shapelets having n max = 20. This drives the &#967; 2 DOF to values 1, which implies a certain degree of overfitting. However, the systematic bias in which models with fewer haloes are preferred by the imaging data persists, and we do not obtain significantly tighter constraints on the main deflector mass profile.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A P P E N D I X B : T H E E F F E C T O F M U LT I P O L E S O N S U B S T RU C T U R E C O N S T R A I N T S</head><p>Shortly after this work appeared, <ref type="bibr">Cohen et al. (2024)</ref> (hereafter C24) claimed that the presence of multipole perturbations to galaxy density profiles -in particular, the m = 3 and m = 4 moments that we considered in this work -preclude inferences of substructure properties from quadruply imaged quasars. C24 draw this conclusion from a series of lens modelling experiments in which they fit a model that includes only m = 3 and m = 4 multipole perturbations to the image positions and flux ratios of mock lenses perturbed by substructure. C24 speculate that a minor difference in the modelling of the position angle of the m = 4 term, &#966; 4 , explains the discrepancy between their findings and the constraints on substructure properties we obtain from analysing only the image positions and flux ratios of 25 mock lenses (shown by the black posterior in Fig. <ref type="figure">18</ref>); we fix &#966; 4 to the position angle of the underlying EPL profile, while C24 allow it to vary freely.</p><p>Using the methods discussed in this paper, we can investigate the claims by C24 regarding the effect of multipole perturbations in substructure inferences. To begin, we repeat the inference presented in Section 5 assigning the same degree of model flexibility to the multipole terms as advocated by C24. Specifically, we sample a 3 , a 4 , and &#966; 3 from the priors described in Section 4.2, but now allow &#966; 4 to vary freely between -&#960;/8 and &#960;/8. Fig. <ref type="figure">B1</ref> shows the result of analysing the 25 mock lenses with a CDM ground truth using the more flexible prior on &#966; 4 . We emphasize that the mocks in our sample have non-zero amplitudes of a 3 and a 4 , and thus our simulations do not have priors centred on the ground truth. After marginalizing over a 3 , a 4 , &#966; 3 , and &#966; 4 , we obtain the black posterior distribution shown in Fig. <ref type="figure">B1</ref>. The blue posterior distribution in Fig. <ref type="figure">B1</ref> includes importance sampling weights that enforce alignment between the m = 4 term and the underlying EPL profile to isolate the effect of a freely varying &#966; 4 angle on the constraints. Assigning the same degree of flexibility to the lens model as advocated by C24, we see no evidence for a systematic bias in the inferred model parameters, or a degeneracy between multipoles and haloes that would preclude the constraints shown in Fig. <ref type="figure">B1</ref>.</p><p>To understand these results in the context of the claims by C24, we note that for most problems there exists some other model besides the one under consideration that can fit the data set. C24 consider a model in which only multipoles can resolve flux ratio anomalies, and compute the required properties of the multipole terms in this scenario. However, to conclude that models with substructure are indistinguishable from lens models that include only multipoles, one must actually calculate the likelihood function and demonstrate that the data cannot distinguish the models statistically when both dark matter haloes and multipole terms are present in the lens model. C24 fundamentally cannot make statements regarding relative likelihoods, and therefore the constraining power of the data, because they do not include substructure in the model they use to analyse mock data.</p><p>Models including substructure are strongly preferred from the perspective of Bayesian model selection, in both our sample of mock lenses and the four cases considered by C24. For the 25 mocks in this paper and the 4 cases generated by C24, we generate 600 000 possible lens models that include both dark matter substructure and multipole perturbations, and 600 000 lens models that include only multipole perturbations. We draw samples of a 3 , a 4 , &#966; 3 , and &#966; 4 from the same prior distributions for each calculation, with the amplitudes and orientations of these terms allowed to vary freely, and we assign the same priors for sub and m hm as discussed in Section 4.1. For the 29 systems in consideration, we perform a Bayesian model comparison by evaluating the posterior odds given the image positions and flux ratios:</p><p>Here, M 1 represents the model that includes both substructure and multipoles, and M 2 represents the model that only includes multipoles. The first term on the right represents the ratio of our prior beliefs regarding the probability of M 1 and M 2 , and the second term is the Bayes factor. For this test, we will ignore the multiple lines of evidence pointing towards the existence of dark matter substructure and assume that both models are equally likely. We can approximate the Bayes factor from the number of accepted samples generated under the ABC approach outlined in Section 2. We use a stringent acceptance threshold of &lt; 0.01 for these calculations to match the flux ratios precisely. Fig. <ref type="figure">B2</ref> shows the distribution of the posterior odds for each mock lens, with numbers greater than 1 indicating that a model with substructure and multipoles is preferred relative to a model that only includes multipoles. The 25 mocks we generate with a CDM ground truth are represented by the black histogram, and the odds for the 4 cases considered by C24 are marked with vertical bars. One in four of the mocks considered by C24 exhibits a notable Bayesian preference (odds &gt; 2) for substructure in the lens model, compared with one in five of the mocks we generate. The 4 mocks considered by C24 have a joint Bayes factor (the product of the individual Bayes factors) of 26, and for the 25 mocks we consider with a 3 , a 4 , &#966; 3 , and &#966; 4 allowed to vary freely, we obtain a joint Bayes factor of 1140. From Fig. <ref type="figure">B2</ref>, we conclude that the mock lenses considered by C24, which they use to support the claim that quadruply imaged quasars cannot constrain substructure properties, actually exhibit a Bayesian preference for substructure in the lens model consistent with what one expects in CDM.</p><p>The reason we can constrain substructure properties, even with multipoles included in the lens model with the same degree of flexibility as advocated by C24, is that models including substructure reproduce the observed data more frequently than lens models that include only multipoles. As a result, the 'multipoles-only' explanation for the data is heavily disfavoured from a Bayesian standpoint. Accounting for lens models that include both substructure and multipole terms requires the careful evaluation of the integral in equation ( <ref type="formula">2</ref>), as outlined in this paper and in previous work <ref type="bibr">(Gilman et al. 2019</ref><ref type="bibr">(Gilman et al. , 2020))</ref>. These tests emphasize the importance of a rigorous statistical treatment of the problem in order to validate statements regarding the constraining power of certain data sets over different models, and the importance of validating modelling assumptions through tests on realistic data sets.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_1"><p>https://github.com/lenstronomy/lenstronomy</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_2"><p>https://github.com/dangilman/pyHalo Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_3"><p>https://github.com/dangilman/samana</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="4" xml:id="foot_4"><p>This number assumes that we render haloes in a volume shaped like a double cone that opens towards the lens with an opening angle of 6 arcsec, and closes at the source position.Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_5"><p>MNRAS 533,1687-1713 (2024)   </p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_6"><p>This notebook (https://github.com/lenstronomy/lenstronomy-tutorials/ blob/main/Notebooks/LensModeling/modeling with decoupled multiplane. ipynb) illustrates the functionality in combination with PYHALO. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_7"><p>Convergence refers to a projected mass normalized by the critical surface mass density for lensing.Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_8"><p>In practice, one typically reconstructs the PSF simultaneously with the lensed image and source light. This methodology is possible within our analysis framework, but it was not included in our tests on simulated data. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="9" xml:id="foot_9"><p>https://github.com/dangilman/samana Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_10"><p>MNRAS 533, 1687-1713 (2024) Figure 14. Reconstructed lensed image (left), substructure convergence (centre), and normalized residual map from the reconstructed imaging data of Mock 4 in the CDM ground truth sample. The top two rows depict realizations accepted based on matching the image positions, flux ratios, and imaging data. The bottom rows show examples of systems that match the flux ratios, but which we reject due to a poor fit to the imaging data. The green (black) numbers and curves show the true (model-predicted) flux ratios and critical curves, respectively. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_11"><p>MNRAS 533, 1687-1713 (2024) Figure 15. The same as Fig. 14, but with four example realizations generated for Mock 6 in the CDM ground truth sample. Simultaneously reproducing the flux ratios and imaging data in this system requires dark matter substructure near image A. As shown by the rejected lens model configuration in the third row, incorporating imaging data allows us to rule out lens model configurations that match the flux ratios through large-scale deformation of the lens mass profile, isolating the effects of substructure on these data. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_12"><p>MNRAS 533, 1687-1713 (2024) Figure 16. The same as Fig. 14, but with four example realizations generated for Mock 11 in the CDM ground truth sample. This system has flux ratios consistent with those predicted by a smooth lens model, so accepted realizations are more likely to have fewer haloes. As seen in the bottom row, the information encoded by the imaging data allows us to rule out lens model configurations that match the flux ratios through a combination of substructure and large-scale deformation of the lens mass profile. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_13"><p>MNRAS 533, 1687-1713 (2024) Figure 17. The same as Fig. 14, but with four example realizations generated for Mock 23 in the CDM ground truth sample. Proposed lens models accepted for this system tend to have substructure perturbing image B. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_14"><p>This paper has been typeset from a T E X/L A T E X file prepared by the author.&#169; 2024 The Author(s).Published by Oxford University Press on behalf of Royal Astronomical Society. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted reuse, distribution, and reproduction in any medium, provided the original work is properly cited. Downloaded from https://academic.oup.com/mnras/article/533/2/1687/7721636 by UC -Merced user on 26 December 2025</p></note>
		</body>
		</text>
</TEI>
