Probing the structure of the lensed quasar SDSS J1004+4112 through microlensing analysis of spectroscopic data

Aims. We aim to reveal the sizes of the continuum and broad emission line (BEL) emitting regions in the gravitationally lensed quasar SDSSJ1004 + 4112 by analyzing the unique signatures of microlensing in this system. Through a comprehensive analysis of 20 spectroscopic observations acquired between 2003 and 2018, we studied the striking deformations of various BEL proﬁles and determined the sizes of their respective emitting regions. Methods. Our approach involves a detailed analysis of the magnitude di ﬀ erences in the BEL wings and their adjacent continua, and the implementation of a statistical model to quantify the distribution and impact of microlensing magniﬁcations. To ensure a reliable baseline for no microlensing, we used the emission line cores as a reference. We then applied a Bayesian estimate to derive the size lower limits of the Ly α , SiIV, CIV, CIII], and MgII emitting regions, as well as the sizes of the underlying continuum-emitting sources. Results. We analyzed the outstanding microlensing-induced distortions in the line proﬁles of various BELs in the quasar image A, characterized by a prominent magniﬁcation of the blue part and a strong demagniﬁcation of the red part. From the statistics of microlensing magniﬁcations and using Bayesian methods, we estimate the lower limit to the overall size of the regions emitting the BELs to be a few light-days across, which is signiﬁcantly smaller than in typically lensed quasars. The asymmetric deformations in the BELs indicate that the broad-line region is generally not spherically symmetric, and is likely conﬁned to a plane and following the motions of the accretion disk. Additionally, the inferred continuum-emitting region sizes are larger than predictions based on standard thin-disk theory by a factor of ∼ 3 . 6 on average. The size-wavelength relation is consistent with that of a geometrically thin and optically thick accretion disk.


Introduction
SDSS J1004+4112 is the first known quasar lensed by a foreground cluster of galaxies and was discovered in the Sloan Digital Sky Survey (SDSS) while searching for large separation lenses (Inada et al. 2003).The lensed quasar comprises four bright images (with magnitudes of i ′ = 18.5, 18.9, 19.4, and 20.1; see Inada et al. 2003) at a source redshift of z s = 1.734 and a maximum separation angle of 14 ′′ .62 between components B and C, which are produced by a massive cluster at a lens redshift of z l = 0.68.The four lensed images are located near the cluster center, and are well separated from the central galaxy emission.A fifth faint image (component E), located 0 ′′ .2from the center of the brightest galaxy in the lensing cluster, was detected in deep HST imaging by Inada et al. (2005) and spectroscopi-cally confirmed by Inada et al. (2008).Oguri (2010) estimated the magnifications of the images to be 29.7, 19.6, 11.6, 5.8, and 0.16 for A, B, C, D, and E, respectively.In addition to the quasar images, multiply imaged background galaxies were identified by Sharon et al. (2005), Oguri 2010, andLiesenborgs et al. 2009, and more galaxy members were obtained by Oguri et al. (2004).The system has been extensively monitored photometrically (Fohlmeister et al. 2007(Fohlmeister et al. , 2008;;Fian et al. 2016;Muñoz et al. 2022), and time delays for three of the quasar images (A, B, and C) were measured by Fohlmeister et al. (2007Fohlmeister et al. ( , 2008)).Recently, Muñoz et al. (2022) found a time delay of 2458.47 ± 1.02 days (∼ 6.7 years) between the trailing image D and the leading image C, which is the longest ever measured for a gravitationally lensed quasar.Since its discovery, the lens has been modeled by numerous authors (Inada et al. 2003;Oguri et al.Kawano & Oguri 2006;Fohlmeister et al. 2007;Inada et al. 2008;Liesenborgs et al. 2009;Oguri 2010;Mohammed et al. 2015;Forés-Toribio et al. 2022), using constraints including the multiple time delays, the position and fluxes of the lensed images, spectroscopy of galaxies in the cluster, and Chandra X-ray observations (Ota et al. 2006).In addition, radio, infrared (IR), and ultraviolet (UV) observations have been used to measure the wavelength-dependent flux ratios between the lensed images and to study the cluster and background lensed galaxies (Ross et al. 2009;Jackson 2011;McKean et al. 2021;Hartley et al. 2021).
Optical microlensing, caused by stars in the cluster halo or nearby satellites, is known to exist in the lens system SDSS J1004+4112.This phenomenon has been used to determine the size of the continuum-emitting source in the lensed quasar (Fohlmeister et al. 2008;Fian et al. 2016;Forés-Toribio et al. 2023).In addition to the differential variation of the brightness of the images in the photometric passbands, microlensing has also been detected in the spectral lines (Richards et al. 2004b;Lamer et al. 2006;Gómez-Álvarez et al. 2006b;Motta et al. 2012;Popović et al. 2020;Fian et al. 2018aFian et al. , 2021b)).Spectroscopy of the individual components has revealed significant differences in the emission line profiles, with component A showing a strong enhancement in the blue wings of several high-ionization lines relative to the other components.This blue-wing enhancement was interpreted as an indication of microlensing in image A (alternative interpretations such as outflow have been proposed in Green 2006 andPopović et al. 2020).Recently, Hutsemékers et al. (2023) demonstrated that the deformation of the C IV emission line profile in SDSS J1004+4112 can be reproduced by employing simple broad-line region (BLR) models such as a Keplerian disk or an equatorial wind.For this study, we extensively analyzed spectroscopic observations gathered from the literature, significantly expanding the existing research.We incorporated data from five additional observational epochs compared to the most recent study conducted by Hutsemékers et al. (2023).We broadened the scope to include a wider range of spectral lines instead of only the C IV line, thereby expanding the investigation of the magnitude of microlensing variability in several broad-emission lines (BELs).Additionally, we undertake a comprehensive global analysis that encompasses the line cores, line wings, and the adjacent continuum to enhance our understanding of the diverse light-emitting regions within the quasar.
The paper is organized as follows.In Section 2, we present the spectra collected from the literature.In Section 3, we describe the data analysis, including measurements of core ratios, continuum variability, and the estimation of variability in the BELs.Section 4 is dedicated to microlensing simulations and the inference of source sizes using Bayesian methods.In Section 5, we present our main results and discuss them in the context of the dimensions of the continuum and broad-line emitting regions.Finally, our main conclusions are summarized in Section 6.

Data and observations
We have compiled a collection of rest-frame UV spectra of the images A, B, C, and D of the gravitationally lensed quasar SDSS J1004+4112 from the literature.Our dataset includes 20 published spectra, spanning a period of 15 years (from February 2003 to February 2018).These spectra cover a range of typical high-and low-ionization lines found in quasars, including Lyα λ1216, Si IV λ1397, C IV λ1549, C III] λ1909, and Mg II λ2798.The data from the literature have already been fully reduced, and information about the observations and references can be found in Table 1.In Figures 1-2, we present superpositions of the Lyα, Si IV, C IV, and C III] emission line profiles, respectively, corresponding to different images and epochs.In Figure 3, we show the average of these line profiles for each lensed image, alongside the sole epoch for which we possess reliable data for the Mg II line.Individual epochs with noisy data in the range of the emission lines were excluded before obtaining the average spectra.All wavelengths are given   (green).Observations reveal significant deformations and differences between the images in the blue wings of all emission lines, with image A showing the most pronounced enhancements.In addition, image A appears to be de-magnified in the red wings.The x-axis is represented on a velocity scale, and the y-axis is in arbitrary units of flux.We note that only one epoch of observation (epoch 2) is available for the Mg II line. in the quasar rest-frame.
Upon visually examining the data, it is immediately apparent from Figures 1 to 3 that the emission line wings exhibit significant (time-variable) deformations and asymmetrical enhancements.Image A displays the most pronounced differences in comparison to the other images, featuring much stronger blue emission line wings in the high-ionization lines.Image B, on the other hand, appears to have an enhanced red wing as compared to the other images.It is important to note that in Figures 1 to 3, we have highlighted the differences in the emission line profiles by subtracting a linear fit of the continuum and normalizing the spectra to the peak of the corresponding emission line.In general, there is a good match between the C III] red wings of different images, indicating that the red part of this line is only weakly affected by either microlensing or intrinsic variability.However, we find changes in the red wing of C IV and/or in the shelf-like feature blueward of He II (at ∼ λ1610) in all the images, which appear with different intensities in different epochs.The origin of this feature is uncertain, with possible explanations including an extreme C IV red wing or He II blue wing, or an as-yet-unidentified species (e.g., Fine et al. 2010 and references therein).In the case of images A and B (with a time delay of 44 days), the observed anomalies are likely caused by microlensing, whereas in the case of images C and D (with a time delay of −2458 days), the differences may be explained by intrinsic variability combined with the large time delay between the images, and a possible contribution from microlensing.

Core ratio measurements
Emission line cores originate from large, spatially extended regions that are not significantly affected by microlensing and intrinsic variability (Guerras et al. 2013;Fian et al. 2018a).Measuring the core flux ratios between lensed images is an effective way to establish a baseline that is free of microlensing effects, which is crucial for determining the microlensing-based sizes of different emitting regions in quasars.In this study, we focus on the high-ionization lines Lyα, Si IV, and C IV, and the lowionization lines C III] and Mg II.The continuum for each image and each emission line is removed by fitting a straight line to the continuum on both sides of the emission line and subtracting it from the spectrum.To account for the varying widths of the emission lines, we use windows of varying widths for the continuum estimate for each line and each quasar image, avoiding regions of known emission features.The core fluxes are then defined by a narrow interval (8Å for Lyα, 10Å for Si IV and C IV, 12Å for C III], and 20Å for Mg II) centered on the peak of the line.In Table 2, we list the average core flux ratios (±1σ standard deviation) between images A and B, C and B, and D and B. Although extinction may affect the emission lines, we found no discernible wavelength dependence in the core flux ratios, which suggests that extinction is unlikely to have played a significant role in our estimates.Our inferred core flux ratios match well with IR flux ratios obtained by Ross et al. (2009) and are consistent (within uncertainties) with radio flux ratios observed by Jackson (2020), Hartley et al. (2021), andMcKean et al. (2021) (see Table 3).

Continuum variability measurements
Microlensing, which is sensitive to the size of the source region (with smaller regions showing larger magnifications), can provide important constraints on the structure and kinematics of quasar accretion disks.To quantify the effect of microlensing on the continuum, it is necessary to separate it from the effects of macro-lensing magnification (due to the smooth lensing potential) and extinction.Each lensed quasar image has the same intrinsic spectrum but experiences different extinction as light associated with each image follows a different path through the lens galaxy, encountering varying amounts of dust and gas (Falco et al. 1999;Motta et al. 2002;Muñoz et al. 2004Muñoz et al. , 2011)).The macro-magnification produced by the lens galaxy and the differential extinction between the components of the lensed quasar are independent of the source size and affect not only the continuum flux ratios but also the emission line fluxes (Motta et al. 2002;Mediavilla et al. 2005Mediavilla et al. , 2009Mediavilla et al. , 2011b)).We attempt to correct for these effects by estimating the offsets between the continuum adjacent to the emission lines, (m x − m B ) cont , and the magnitude differences of the emission line cores, (m x − m B ) core , between the images x (where x = A, C, D) and image B, The cores of the emission lines are produced by material spread over a wide region (narrow-line region and outer regions of the BLR) which is typically large enough to be insensitive to microlensing by solar mass objects and can be used as a baseline for no microlensing (Guerras et al. 2013;Fian et al. 2018a).Recently, Hutsemékers et al. (2023) reported a small-to-negligible de-magnification of the core of the C IV line in the lensed system SDSS J1004+4112.This finding further supports the reliability of using the BEL cores as a reference for no microlensing.We selected image B as the reference image as it is less affected by microlensing variability than image A (see Hutsemékers et al. 2023), and also has a larger number of observation epochs compared to images C and D. Since the wavelength differences between the line cores and the chosen wavelength intervals for the continuum (see Table 4) are relatively small, this estimator certainly removes the effects of the macro-magnification and extinction (see, e.g., Guerras et al. 2013).Apart from these effects, other phenomena such as intrinsic variability and contamination by the lens galaxy can also produce chromatic variations in the flux of lensed quasars, mimicking microlensing.In the case of the lensing cluster SDSS J1004+4112, the components A, B, C, and D pass far from the main galaxy cluster members and contamination from the continuum of these galaxies is negligible.The magnitude differences between images C-B and D-B may be contaminated by intrinsic variability modulated by the long lens time delays between those image pairs, making it difficult to distinguish between extrinsic and intrinsic variations.When estimating the size of the continuum-emitting region, these (wavelength-dependent) changes should, if possible, be avoided or at least estimated.In Table 4, we list the central values used to fit the continuum together with the average magnitude difference (±1σ standard deviation) at that wavelength.

BLR variability measurements
To estimate the minimal dimension of the BEL emitting regions, we normalize the continuum-subtracted spectra for all images and all epochs to match the core of the emission line defined by the flux within a narrow interval centered on the peak of the line.Under the assumption that the line cores can be used as a reference that is little affected by microlensing and intrinsic vari-    ability, the comparison of the line wing fluxes between pairs of images at the same epoch allows for an estimation of the size lower limit of the emitting region.We estimate the microlensing in the line wings (∆µ wing = (m x − m B ) wing − (m x − m B ) core , where x = A, C, D) on either side of the emission line peak, corresponding to a velocity range of 3000 − 10000 km s −1 (see Table 5).
Completely distinguishing microlensing from intrinsic variability is not possible without observations separated by the exact time delay between images.As a result, intrinsic variability, in combination with the substantial time delays between the image pairs C-B (∼ 2 years) and D-B (∼ 4.5 years), may mimic microlensing.However, we assume that the effect of intrinsic variability on the magnitude differences observed between images A and B is negligible since the time delay between this image pair is small (∼ 40 days), making it plausible that most of the observed A-B magnitude differences in the continuum and BEL wings are caused by microlensing.
We observe significant changes in the blue wings of Si IV, C IV, and C III] in image A, as well as in the red wing of Lyα and the shelf-like feature at ∼ λ1610 (blueward of He II).Im-age B appears to vary less, except in the red wing of C IV and both wings of C III].It is worth noting that the results regarding C III] should be interpreted with caution as (i) the S/N of this emission line is lower than for the high-ionization lines studied in this work, (ii) the blue wing of C III] is blended by Si III], Al III, and Ne III/Si II, (iii) the extreme blue wing of C III] is contaminated by Fe III, and (iv) the presence of (highly variable) Fe II and Fe III lines might influence the continuum adjacent to this line.In the case of images C and D, we detect variability in the (extreme) red wing of C IV, whereas the blue wing of C IV and both wings of C III] do not show significant variability.
In Figure 4, the continuum, the emission line wings, and the emission line core magnitude differences between the A-B, C-B, and D-B image pairs are presented as a function of wavelength.The magnitude differences in the line cores of all image pairs show no significant trend with wavelength and are distributed around ⟨A−B⟩ = −0.46±0.10mag, ⟨C−B⟩ = 0.32±0.15mag, and ⟨D − B⟩ = 0.90 ± 0.41 mag.This supports the assumption that the line cores are relatively insensitive to microlensing, intrinsic variability, and extinction, thereby serving as a reli-Article number, page 6 of 12    2, 4, and 5. Black triangles show the magnitude differences in the line cores, while the black horizontal lines represent the average magnitude differences.The gray-shaded intervals denote the standard deviation.Notably, no discernible wavelength trend is observed in the magnitude differences of line cores among all image pairs.The green-colored data points represent the differential microlensing estimates in the continuum at various wavelengths for the A-B, C-B, and D-B image pairs, respectively.One intriguing observation is the substantial offset of around 0.9 mag in the A-B microlensing measurements between the blue and red wings (shown as blueand red-colored data points, respectively) of multiple emission lines.This offset suggests that image A experiences magnification in the blue wing and de-magnification in the red wing.
able baseline for no microlensing magnification.The global offset between the adjacent continua on either side of the emission lines and the line cores of the A-B image pair can be attributed to microlensing.The A-B magnitude differences corresponding to the continuum and the red wing (from Si IV toward C III]) show a decreasing trend with wavelength, indicating evidence of chromatic microlensing.Observations reveal an opposite trend at wavelengths shorter than Si IV, which could be potentially attributed to the substantial influence of the Rayleigh scattering wings of the Lyα line contributing to the signal.The modest amplitudes of microlensing observed in the A-B continuum, which were previously viewed as a challenge for interpreting the blue wing enhancements in terms of microlensing (Gómez-Álvarez et al. 2006a), are now supported by additional evidence, such as the lack of dust extinction, the presence of chromatic magnification changes in the A-B continuum, and the variability detected in the emission line wings.These findings lend strong support to the hypothesis that microlensing is responsible for the enhancements seen in the A-B blue wings.The C-B magnitude differences corresponding to the emission line wings also depict a decreasing trend with wavelength, while neither the C-B magnitude differences in the continuum nor the D-B magnitude differences in the continuum and BEL wings show chromatic changes.However, it is worth noting that intrinsic variability combined with the large time delay between those image pairs could affect the observed magnitude differences, making it difficult to inter-pret the results.An interesting finding is the large offset (∼ 0.9 mag) between the A-B magnitude differences in the blue and red wings of several emission lines, while for the C-B and D-B image pairs the observed offset is relatively small (∼ 0.1 mag and ∼ 0.3 mag, respectively).

Magnification maps
To simulate the microlensing of extended sources, we utilized the Fast Multipole Method -Inverse Polygon Mapping1 (FMM-IPM) algorithm described in Jiménez-Vicente & Mediavilla (2022) to create microlensing maps for images A and B. This novel technique combines the FMM algorithm of Greengard & Rokhlin (1987) for ray deflection calculations with the IPM algorithm of Mediavilla et al. (2006Mediavilla et al. ( , 2011a) ) for the calculation of the magnification map.Our simulations are based on 3000 × 3000 pixel 2 maps, spanning 100 × 100 Einstein radii 2 on the source plane.The value of the Einstein radius for this system is R E = 2.35×10 16 √ M/0.3M ⊙ cm = 9.1 √ M/0.3M ⊙ lt-days at the lens plane (see Mosquera & Kochanek 2011).The maps have a resolution of 0.3 lt-days per pixel, which effectively samples the optical accretion disk of the quasar.The magnification maps for each quasar image are characterized by the local shear γ and the local convergence κ, with the latter being proportional to the surface mass density.The local convergence can be broken down into two components: κ = κ c + κ ⋆ , where κ c represents the convergence due to continuously distributed matter (e.g., dark matter) and κ ⋆ represents the convergence due to stellar-mass point lenses (e.g., microlens stars in the galaxy).The values of κ and γ for images A and B were obtained from the study of Forés-Toribio et al. ( 2022) and are presented in Table 6 for reference.The value of α ≡ κ ⋆ /κ, also known as the fraction of mass in compact objects, is a measure of the relative contribution of stars to the total mass in the lens galaxy.In this study, we used a relatively small value of α = 0.05 for the surface mass density of stars.This value was chosen as the lensed images are located in peripheral regions that are farther away from the center of the lensing galaxy cluster.In these regions, the lensing effect is primarily determined by the distribution of dark matter and hot gas, rather than stars (see also Forés-Toribio et al. 2023).We randomly distributed stars of a mass of M = 0.3M ⊙ across the microlensing patterns to create a convergence of 5%.

Source profile
To model the structure of the unresolved quasar, we use circular Gaussian profiles (I(R) ∝ exp(−R 2 /2r 2 s )) to represent the luminosity of the emitting regions.The magnifications experienced by a finite source of size r s are then found by convolving the magnification maps with Gaussian profiles with sigma of r s .It is widely believed that the specific shape of the source's emission profile is not important for microlensing flux variability studies, as the results are mainly controlled by the half-light radius rather than by the detailed intensity profile (Mortonson et al. 2005).For Gaussian profiles, the characteristic size r s is related to the half-light radius by R 1/2 = 1.18r s .We convolve the maps with Gaussians of 18 different sizes, logarithmically spanning an interval between 0.3 and 15 lt-days for a mean stellar mass ⟨M⟩ = 0.3M ⊙ .As lengths are measured in Einstein radii, all estimated sizes can be rescaled accordingly for a different mean stellar mass using r s ∝ √ ⟨M⟩.The displacement of an extended source across the magnification patterns is equivalent to a point source moving across a map that has been smoothed by convolution with the source's intensity profile.Strong microlensing anomalies are indication of a compact source, whereas low magnifications could be due to a large source size or due to the location of the source in a relatively calm region of the magnification map.After convolution, we normalize each magnification map by its mean value, and histograms of the normalized maps represent the expected microlensing variability.Finally, by cross-correlating the histograms of image B from the histograms of image A (see Fian et al. 2016), we construct the microlensing difference histograms A-B for different values of r s .These simulated microlensing difference histograms can be compared with the experimental values as described in Section 3.

Bayesian source size estimation
Given the estimates of differential microlensing in the wings and adjacent continua of different emission lines between lensed images, we can infer the size of their emission region.To accomplish this, a statistical method was utilized where each microlensing measurement was treated as a single epoch event.We then use all available epochs of observation to compute the joint microlensing probability, P(r s ), and obtain an average estimate of the size, following the procedures outlined in Guerras et al. (2013) and Fian et al. (2018aFian et al. ( , 2021b)).It is important to mention that the separation of the line emission into two parts is consistent with the hypothesis that the BLR comprises a flat inner region giving rise to the line wings, surrounded by a larger three-dimensional structure that produces the line core (refer, for instance, to Popović et al. 2004).As such, microlensing-based size measurements for the region emitting the line wings should be considered as approximate lower limits rather than an exact size measurement of the BEL region.

Results and discussion
Taking into account that microlensing is sensitive to the size of the source, we will utilize our determinations of microlensing magnification amplitudes to estimate the size of the continuumemitting region at different wavelengths, as well as the minimal size of the emission region for various BELs in the SDSS J1004+4112 lensed quasar.The process of inferring differential microlensing from the analysis of spectroscopic data in lensed quasars can be challenging due to the presence of intrinsic variability and the fact that intrinsic flux variations are timedelayed between images.The deformations of the BELs caused by intrinsic variability could mimic microlensing, thereby leading to inaccurate measurements of the source sizes.In the case of the lensed quasar SDSS J1004+4112, this issue is particularly pronounced for images C and D, which have long time delays (∼ 6.7 years) compared to the other images in the system.To avoid misinterpretation of the measured signal, we will only use the magnitude differences between images A and B, as they have a short time lag (∼ 44 days) and the differences can likely be attributed to microlensing.Additionally, we will only consider observations that are separated in time by more than the source crossing time, which is approximately three months (see Mosquera & Kochanek 2011) in the SDSS J1004+4112 lens system due to the high effective transverse velocity of the source.

Continuum-emitting region size
Utilizing the estimates of differential microlensing between images A and B in the continuum adjacent to the BELs, we are able to constrain the size of the continuum-emitting region at different wavelengths.By applying Bayesian methods, outlined in Section 4.3, we use a uniform logarithmic prior on r s to estimate the probability of r s given the measured microlensing magnification.The resulting probability density functions (PDFs) can be observed in Figure 5.These distributions allow us to determine the 68% confidence size estimates for the continuum sources at various wavelengths.The sizes of the continuum-emitting regions are summarized in Table 7.
To validate the accuracy of our results, we have compared the size of the region emitting the r-band continuum inferred from the spectroscopic data presented in this work with the size derived using 14.5 years of photometric monitoring data (see Muñoz et al. 2022).The results obtained from the two different datasets are in good agreement with each other, with R 1/2 = 7.1 +7.4  −3.7 lt-days for the spectroscopic data and R 1/2 = 5.3 +1.3 −0.7 ltdays for the photometric data (see also Forés-Toribio et al. 2023).We would like to highlight the exceptional overlap of the microlensing light curves of the r-band emitting region obtained from spectroscopic data with the photometric monitoring data, as demonstrated in Figure 6.

Theoretical disk size
In current standard models, the accretion disk is considered to be a geometrically thin and optically thick disk (Shakura & Sunyaev 1973), radiating thermally with a temperature profile of T ∼ R −3/4 (Shields 1978).This scenario predicts that the hotter, UV-emitting region (≤ 3000Å) is located closer to the center, while the cooler, optically and near-IR emitting regions (∼ 3000−10000Å) are located farther out.Variations in the energetic, short-wavelength emission from the X-ray emitting corona and the inner edge of the disk can irradiate the outer annuli and drive variations at longer wavelengths, delayed by the light travel time across the disk (e.g., Krolik et al. 1991).For a temperature profile of a standard disk (since the delay τ ∼ R/c and, from Wien's law, λ ∝ 1/T ), the disk sizes scale as R λ ∝ λ β , where β = 4/3.This model provides definite predictions about the theoretical time lags between short-wavelength and longwavelength variations according to a given temperature-radius relation, based on the object's SMBH mass and mass accretion rate.We compare the microlensing-based size estimates of the continuum-emitting regions with model predictions for thermal reprocessing following the method described by Fausnaugh et al. (2016) and Edelson et al. (2017).Since SMBH mass estimates for lensed quasars are highly uncertain, we substitute the product of SMBH mass and mass accretion rate with the target's optical luminosity L opt (see Eq. ( 7) in Davis & Laor 2011; for a detailed derivation see Fian et al. 2022).This allows us to use the Shakura-Sunyaev model self-consistently and without assuming radiative efficiencies.The predicted theoretical sizes r th relative to a reference size r 0 (which is set to r 0 = 0 lt-days) at a reference wavelength λ 0 can be written as: For a Shakura-Sunyaev profile, the characteristic size r s is related to the half-light radius by R 1/2 = 2.44 r s .Ross et al. (2009) estimated a magnification-corrected luminosity at restframe at 1350Å of 2.0 × 10 45 erg s −1 based on power-law fits to the B, V, and I HST images.Popović et al. (2020) measured the fluxes of all four components from observations performed in 2018 (epoch 20) and obtained an average non-lensed quasar luminosity of λL(1350Å) = (6.9± 0.9) × 10 44 erg s −1 .By inserting the latest value for L opt in Eq. 1, and adopting a reference wavelength of λ 0 = 500Å (extreme UV; corresponding to the inner edge of the accretion disk), we find that the microlensing-based sizes are larger by a factor of ∼ 2.5 − 4.3 than the theoretical size estimates (see Table 7).Even after adding an external UV/X-ray term to Eq. 1 (as in Fausnaugh et al. 2016), assuming a local ratio of external to internal heating of 1 (i.e., the X-rays and viscous heating contribute equal amounts of energy to the disk), the sizes are only ∼ 10% larger, still unable to explain the discrepancy between the observed and the theoretical accretion disk sizes.This result is consistent with previous works, which have reported lensed quasar continuum emission regions larger than predicted by standard accretion disk theory (Morgan et al. 2010;Blackburne et al. 2011;Jiménez-Vicente et al. 2014).This is also similar to the findings of optical continuum reverberation mapping campaigns of low-luminosity active galactic nuclei, which typically find that continuum emission region sizes are ∼ 2 − 3 times larger than expected from disk reprocessing models (Cackett et al. 2022).One possible explanation for these larger-thanexpected continuum sizes is a non-negligible contribution of diffuse continuum emission from the BLR to the observed continuum signals (e.g., Cackett et al. 2018;Chelouche et al. 2019;Korista & Goad 2019;Netzer 2022).It should be noted that our assumption is based on the signal (L opt ) lying within the wavelength range emitted by the self-similar parts of the disk.Although this assumption is justified for the rest-optical, it may not hold true for the rest-UV, particularly in cases where the SMBH mass is large or the mass accretion rate is small.In such scenarios, the turnover at shorter wavelengths, caused by the inner disk edge, shifts towards longer wavelengths.Consequently, our esti-mations of r th − r 0 might only represent lower limits, implying that our disk over-estimations are conservative.

Size-wavelength relation
Figure 7 displays the microlensing-based continuum sizes as a function of wavelength.By fitting the estimated continuumemitting sizes at different wavelengths with a disk model, we can infer the accretion disk size at a given wavelength (see Table 7).We fit our size spectrum with the power-law index β (which quantifies the temperature profile of the disk) as a free parameter, obtaining the best fit with β ∼ 1.9.From Figure 7 we can see that the estimated sizes, as well as the physical model, are roughly consistent with the slope predicted for an optically thick and geometrically thin accretion disk model (β = 4/3).While several microlensing campaigns have found significantly larger sizes than predicted by the prevailing accretion disk theory (in agreement with the findings of this work), they frequently report flatter size-wavelength relations (Morgan et al. 2010;Blackburne et al. 2011;Jiménez-Vicente et al. 2014;Muñoz et al. 2016).

BLR size
We repeat the same procedures described in Section 5.1 to infer the size of the continuum-emitting regions, but this time focusing on the wings of the BELs.In Figure 8, we present the PDFs corresponding to the regions emitting the broad wings of Lyα, Si IV, C IV, C III], and Mg II.In Table 8, we list the (minimal) size estimates along with their 68% confidence intervals obtained for each of the BELs.Interestingly, we derive very small sizes for the regions emitting the BELs, sometimes even smaller than the sizes obtained for the region emitting the optical continuum.These findings are in disagreement (by an order of magnitude) with the BLR size estimates by Guerras et al. (2013), as well as with the average BLR size obtained for a sample of lensed quasars in previous works (Fian et al. 2018a(Fian et al. , 2021b)).However, our estimated half-light radius of the continuum sizes r-band best fit, R 1/2 1.9 R 1/2 4/3 Fig. 7. Microlensing-based continuum-emitting sizes as a function of wavelength.The dashed black line shows the best fit to the data, with a power-law index of β ∼ 1.9.The red dotted line is a fit with a fixed theoretical power-law index of β = 4/3, as expected for an optically thick and geometrically thin accretion disk.
C IV BLR aligns with the recent measurement reported by Hutsemékers et al. ( 2023) (R 1/2 = 2.8 +2.0 −1.7 lt-days), indicating that our results are reliable.Typically, the BELs are expected to be less affected by microlensing than the continuum as they are emitted from a more extended region that is located further away from the central SMBH.One possible explanation for the uncommon observations could be a specific location on the magnification map.If the BLR, or part of the BLR, is located on or close to a caustic and the accretion disk is located away from it, the BLR will be highly magnified, while the accretion disk will be less magnified.This scenario is expected to be rare, as it depends on a very specific position and trajectory of the extended source on the caustic pattern, but could in principle explain the microlensing anomalies detected in this lensed system.An in-depth analysis of the BLR model, including the examination of specific source trajectories through the magnification pattern and their effect on microlensing of BEL wings and continuum-emitting sources, is beyond the scope of this current study and will be addressed in a future work.

Conclusions
SDSS J1004+4112 is one of the most well-studied lensed quasars, with a wealth of photometric monitoring data and spectroscopic observations available.Despite its early identification as a lensed quasar displaying BEL deformation, a comprehensive understanding of the observed line distortions and differences between the lensed components remained elusive.In this work, we have made use of a recently published macro-model of the lens system (Forés-Toribio et al. 2022)   their adjacent continua.The properties of BELs and their underlying continua provide crucial information on the nature of the BLR and accretion disk.Our results reveal various signatures of microlensing in the wings of the BELs, and through measurement of their strength, we can constrain the sizes of their emitting regions.The main conclusions of our study are the following: 1.This work has revealed consistency between the estimates of line core ratios between the lensed quasar images, which were used as a baseline for no microlensing, and the mid-IR and radio ratios reported in the literature (Ross et al. 2009;Jackson 2020;Hartley et al. 2021;McKean et al. 2021).2. We have found chromatic changes in the continuum adjacent to the BELs, providing insight into the structure of the accretion disk.The inferred continuum-emitting region sizes increase with wavelength, supporting the idea of disk reprocessing.The trend of size versus wavelength agrees with the prediction of a standard geometrically thin disk to some extent, however, the derived continuum-emitting sizes are larger than predicted by the Shakura-Sunyaev accretion disk model by a factor of ∼ 3.6 on average.This discrepancy is consistent with recent findings (Jiménez-Vicente et al. 2014;Motta et al. 2017;Fian et al. 2016Fian et al. , 2018bFian et al. , 2021a;;Cornachione et al. 2020;Rojas et al. 2020) and may be due to a substantial contribution of diffuse continuum emission from the BLR to the observed continuum signals (e.g., Cackett et al. 2018;Chelouche et al. 2019;Korista & Goad 2019;Netzer 2022;Fian et al. 2023).Furthermore, we want to emphasize that our inferred size for the region emitting the rband continuum, as determined through spectroscopic data (7.1 +7.4 −3.7 lt-days), is in excellent agreement with the size inferred from 14.5 years of photometric monitoring data, with a half-light radius of 5.3 +1.3  −0.7 lt-days (see also Forés-Toribio et al. 2023).3. Through a Bayesian analysis, we have determined the lower limits to the overall sizes of the regions emitting the BELs Lyα, Si IV, C IV, C III], and Mg II.Our results indicate that the minimal sizes of these regions are on the order of a few light-days, which is notably smaller compared to the BEL emitting regions of an average quasar reported in the literature, as documented in previous studies (e.g., Guerras et al. 2013;Fian et al. 2018aFian et al. , 2021b)).These studies typically reveal sizes in the range of tens of light-days.The C IV BLR half-light radius estimated in our study is in line with that reported by Hutsemékers et al. (2023) (R 1/2 = 2.8 +2.0 −1.7 ltdays), corroborating the validity of our measurements.Interestingly, for some of the emission lines, the inferred sizes are even smaller than the optical continuum-emitting size.One possible explanation for these unexpected results is that the BEL emitting regions are located near a caustic, while the accretion disk is farther away from it.Recently, Hutsemékers et al. (2023) demonstrated that the observed magnification profile of the C IV emission line in SDSS J1004+4112 can be reproduced using simple BLR models (i.e., a Keplerian disk or an equatorial wind).This suggests that the specific position and trajectory of the source through the magnification map plays a crucial role in determining the microlensingbased sizes of emitting regions in this system.

Fian
et al.: Dimensions of the accretion disk and BLR in SDSS J1004+4112 Notes. (* ) Only a single epoch of observation is available, resulting in the absence of error bars that represent the variability between multiple observations. (* * ) Weighted arithmetic mean (weight is based on the number of spectroscopic observations for each line).
Notes.Col. (1): Average central wavelength of the continuum.Col. (2): Average wavelength window used for computing the magnitude differences in the continuum.Cols.(3)-(5): Average ± 1σ differential microlensing measurements between the images A and B, C and B, and D and B, respectively.

Fian
et al.: Dimensions of the accretion disk and BLR in SDSS J1004+4112

Notes.Fig. 4 .
Fig.4.Average magnitude differences in the line cores (upper panels), and differential microlensing estimates in the continuum and emission line wings (lower panels) for the image pairs A-B (left), C-B (middle), and D-B (right).Calculations are detailed in Sections 3.1-3.3,and the corresponding results are presented in Tables2, 4, and 5. Black triangles show the magnitude differences in the line cores, while the black horizontal lines represent the average magnitude differences.The gray-shaded intervals denote the standard deviation.Notably, no discernible wavelength trend is observed in the magnitude differences of line cores among all image pairs.The green-colored data points represent the differential microlensing estimates in the continuum at various wavelengths for the A-B, C-B, and D-B image pairs, respectively.One intriguing observation is the substantial offset of around 0.9 mag in the A-B microlensing measurements between the blue and red wings (shown as blueand red-colored data points, respectively) of multiple emission lines.This offset suggests that image A experiences magnification in the blue wing and de-magnification in the red wing.

Fig. 5 .
Fig. 5. PDFs of the half-light radius (R 1/2 ) emitting the continuum at different wavelengths.The vertical dashed lines indicate the expected size of the emission region using a uniform logarithmic prior, while the gray-shaded regions represent the one-sigma intervals.A visible trend with wavelength is apparent, with larger sizes observed at longer wavelengths.

Fig. 6 .
Fig.6.Comparison of the microlensing light curves.The optical r-band light curves are shown for the photometric data (gray) and the spectroscopic data (black).The continuum adjacent to the emission line is displayed in green color, and the BEL wings of C IV (top) and C III] (bottom) in blue and red colors, respectively.We want to emphasize the remarkable consistency between the microlensing light curves obtained from spectroscopic data for the r-band emitting region and the results obtained from photometric monitoring data.We note that all observations are presented in the time frame of the leading image C.

Fig. 8 .
Fig. 8. PDFs of the half-light radius R 1/2 emitting the blue and red wings of Lyα, Si IV, C IV, C III], and Mg II.The vertical dashed lines indicate the expected size of the emission region using a uniform logarithmic prior.The emitting regions of high-ionization lines are smaller compared to those of low-ionization lines.

Table 2 .
Line core flux ratios.

Table 3 .
Comparison of the estimated core flux ratios with previously reported values from the literature.

Table 4 .
Differential microlensing measurements in the continuum.

Table 5 .
Differential microlensing measurements in the BEL wings.
and advanced techniques to quantitatively model the statistics of microlensing (see Jiménez-Vicente & Mediavilla 2022).By compiling a sample of 20 spectroscopic observations, we have conducted a detailed analysis of the Lyα, Si IV, C IV, C III], and Mg II lines, as well as