{'fraction_non_alphanumeric': 0.0376131926559774, 'fraction_numerical': 0.029700091384896567, 'mean_word_length': 4.364193404634581, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Microlensing in H1413+117 : disentangling line profile emission and absorption in a broad absorption line quasar

On the basis of 16 years of spectroscopic observations of the four components of the gravitationally lensed broad absorption line (BAL) quasar H1413+117, covering the ultraviolet to visible rest-frame spectral range, we analyze the spectral differences observed in the P Cygni-type line profiles and have used the microlensing effect to derive new clues to the BAL profile formation. We confirm that the spectral differences observed in component D can be attributed to a microlensing effect lasting at least a decade. We show that microlensing magnifies the continuum source in image D, leaving the emission line region essentially unaffected. We interpret the differences seen in the absorption profiles of component D as the result of an emission line superimposed onto a nearly black absorption profile. We also find that the continuum source and a part of the broad emission line region are likely de-magnified in component C, while components A and B are not affected by microlensing. We show that microlensing of the continuum source in component D has a chromatic dependence compatible with the thermal continuum emission of a standard Shakura-Sunyaev accretion disk. Using a simple decomposition method to separate the part of the line profiles affected by microlensing and coming from a compact region from the part unaffected by this effect and coming from a larger region, we disentangle the true absorption line profiles from the true emission line profiles. The extracted emission line profiles appear double-peaked, suggesting that the emission is occulted by a strong absorber, narrower in velocity than the full absorption profile, and emitting little by itself. We propose that the outflow around H1413+117 is constituted by a high-velocity polar flow and a denser, lower velocity disk seen nearly edge-on.


Introduction
The broad absorption lines (BALs) observed in the spectra of quasars (or QSOs, quasi-stellar objects), blueshifted with respect to the broad emission lines (BELs), reveal massive, highvelocity outflows in active galactic nuclei (AGN). Such powerful winds can strongly affect the formation and evolution of the host galaxy, enrich the intergalactic medium, and regulate the formation of the large-scale structures (e.g. Silk and Rees 1998, Furlanetto and Loeb 2001, Scannapieco and Oh 2004, Scannapieco et al. 2005.
About 15% of optically selected quasars have BALs in their spectra (Reichard et al. 2003). Outflows may be present in all quasars if the wind is confined into a small solid angle so that BALs are only observed when the flow appears along the line of sight (Weymann et al. 1991, Gallagher et al. 2007). On the other hand, BAL QSOs could be quasars in an early evolutionary stage, washing out their cocoons (Voit et al. 1993, Becker et al. 2000. Despite many high-quality observational studies, in particular from spectropolarimetry (Ogle et al. 1999), no clear view of the geometry and kinematics of the BAL phenomenon has emerged yet. While pure spherically symmetric winds appeared too simple to account for the variety of observations (Hamann et al. 1993, Ogle et al. 1999, equatorial disks, rotating winds, polar flows, or combinations thereof have been proposed more or less successfully to interpret the observations of individual objects or small groups of them (e.g. Murray et al. 1995, Schmidt and Hines 1999, Lamy and Hutsemékers 2004, Zhou et al. 2006. Given the large parameter space characterizing non spherically symmetric winds, BAL profile modeling must then be combined with other techniques to determine the outflow properties in individual objects (e.g. Young et al. 2007).
An interesting method that can bring independent information on the quasars' internal regions is the use of gravitational microlensing. Indeed, in a typical gravitationally lensed quasar, a solar mass star belonging to the lensing galaxy has an Einstein radius R E (the microlensing cross section) on the order of 10 −2 pc, which is comparable to the size of the continuum source. The microlens, moving across the quasar core in projection, can successively magnify regions of area ≃ πR 2 E , inducing spectroscopic variations that could be used to extract information on the quasar structure (Schneider et al. 1992, and references therein). Several studies, based on simulations, have demonstrated the interest of microlensing analyses for understanding BAL QSOs (Hutsemékers et al. 1994, Lewis and Belle 1998, Belle and Lewis 2000, Chelouche 2005. H1413+117 is a BAL QSO of redshift z ≃ 2.55 showing typical P Cygni-type profiles, i.e., profiles where the absorption is not detached from the emission. Turnshek et al. (1988) discussed the spectrum of H1413+117 in detail and made the first attempts to disentangle the emission from the absorption assuming an intrinsic blue/red symmetry of the emission lines. H1413+117 is also a gravitationally lensed quasar constituted of four images (Magain et al. 1988; see Fig. 1). The lensing galaxy is faint and its redshift poorly known: indirect estimates give z l ≃ 1.0 (Kneib et al. 1998) or z l ≃ 1.88 (Goicoecha and Shalyapin 2010). Evidence of microlensing in component D has been suggested from both photometry and spectroscopy (Angonin et al. 1990(Angonin et al. , Østensen et al. 1997. In particular, Angonin et al. (1990) found that the equivalent width of the emission lines is systematically smaller in component D than observed in the other components, a result which can be interpreted by microlensing of the continuum source, the larger region at the origin of the emission lines being unaffected. This effect, which appeared to last at least a decade , offers the possibility to separate the microlensed attenuated continuum (i.e. the absorption profile) from the true emission line profile, thus providing new clues to the formation of BAL profiles (Hutsemékers 1993, Hutsemékers et al. 1994).
In the present paper, we homogeneously analyze the spectra of the four components of H1413+117 obtained from 1989 to 2005. The spectra cover the ultraviolet to visible rest-frame spectral range. In Sect. 3, we show that the spectral differences observed between the images can be consistently attributed to microlensing in spite of intrinsic variations. In Sect. 4, using a simple method, we separate the parts of the spectra affected and unaffected by microlensing, which basically correspond to the attenuated continuum and the emission lines. From these results, we derive a consistent view of the macro-and microlensing in H1413+117 (Sect. 5). Finally, with the "pure" absorption and emission profiles in hand, we discuss the formation of the BAL profiles and the implications for the geometry and the kinematics of the outflow (Sect. 6).

Data collection
Spectra of the four components of H1413+117 were gathered from archived and published data. Table 1 summarizes the characteritics of the spectra obtained over a period of 16 years, with the date of observation, the spectral range, the average resolving power R = λ/∆λ, and the instrument used.
The visible spectra secured in 1989 with the bidimensional spectrograph SILFID at the Canada-France-Hawaii Telescope (CFHT) are described in Angonin et al. (1990) and Hutsemékers (1993). These spectra were obtained under optimal seeing conditions (0. ′′ 6 FWHM). They provided the first spectroscopic evidence of microlensing in H1413+117.
A series of spectra were obtained in 1993-1994 with the Hubble Space Telescope (HST) feeding the Faint Object spectrograph (FOS). They cover the UV-visible spectral range (gratings G400H and G570H). These data are described in Monier et al. (1998). A second series of HST spectra, yet unpublished, were obtained in 2000 using the Space Telescope Imaging Spectrograph (STIS) and the G430L grating (principal investigator : E. Monier; proposal # 8127). All HST data were retrieved

Fig. 1.
A deconvolved near-infrared image of the gravitationally lensed quasar H1413+117 with the four images and the lensing galaxy labelled (from Chantry and Magain 2007). The image has been obtained in the F160W filter (λ ≃ 1.6 µm) with the NICMOS camera attached to the Hubble Space Telescope. North is up and East to the left. The angular separation between components A and D is 1. ′′ 1.
from the archive and reduced using standard procedures for long slit spectroscopy and prescriptions by Monier et al. (1998).
In 2005, visible spectra were obtained with the integral field unit of the Visible MultiObject Spectrograph (VIMOS) attached to the European Southern Observatory (ESO) Very Large Telescope (VLT). The data were obtained under medium quality seeing conditions (1. ′′ 2 FWHM). Details on the observations and reductions are given in . For this data set, it was not possible to separate the spectra of images A and B of H1413+117.
The 2005 near-infrared spectra obtained with the integral field spectrograph SINFONI at the VLT were retrieved from the ESO archive (principal investigator : A. Verma ; proposal 075.B-0675(A)). Only the spectra obtained with the best seeing (0. ′′ 5 FWHM on May 22, 2005 in the H and K spectral bands) are considered here. The pixel size was 0. ′′ 125×0. ′′ 250 on the sky. The observations consist of four exposures per spectral band. The object was positionned at different locations on the detector for sky subtraction. The data were reduced using the SINFONI pipeline. Telluric absorptions were corrected using standard star spectra normalized to a blackbody. The individual spectra were extracted by fitting a 4-gaussian function with fixed relative positions and identical widths to each image plane of the data cube using a modified MPFIT package (Markwardt 2009). Astrometric positions were taken from HST observations (Chantry and Magain 2007). The spectra which appeared affected by detector defects and/or important cosmic ray hits were discarded. The good spectra were finally filtered to remove remaining spikes.
In addition, we have observed H1413+117 on May 10, 2008 with the polarimetric mode of the Focal Reducer and low disper- . Linear polarimetry has been performed by inserting in the parallel beam a Wollaston prism, which splits the incoming light rays into two orthogonally polarized beams, and a half-wave plate rotated to four position angles (e.g. Sluse et al. 2005). In order to measure the polarization of the four images, the MCS deconvolution procedure devised by Magain et al. (1998) has been applied. We used a version of the algorithm that allows for a simultaneous fit of different individual frames obtained with the same observational setup (Burud 2001). We constructed the PSF using a bright point-like object located ∼ 15 ′′ from H1413+117. Since this object is close to our target and is similar in brightness to the individual components of H1413+117, it provided a good estimate of the PSF. The Stokes parameters have been calculated from the photometry of the quasar lensed images derived from the deconvolution process.

Evidence for microlensing
In Figs. 2 and 3, we compare the profiles of various spectral lines observed in the different images A, B, C, and D of H1413+117. A scaling factor is applied to superimpose at best the continua, considering in particular the continuum windows 4525-4545 Å and 5165-5220 Å (i.e. 1275-1280 Å and 1450-1470 Å restframe, Kuraszkiewicz et al. 2002). If the four images are only macrolensed, the line profiles observed in the spectra of the four components must be identical up to the scaling factor. On the other hand, line profile differences between some components may be indicative of microlensing, which is expected to magnify the -small-continuum region and not the -larger-broad emission line region. We first note that the line profiles in components A and B are essentially identical up to the scaling factor. This suggests that neither A nor B are strongly affected by microlensing. The small difference observed in the [O iii] lines may be related to the fact that the narrow line region could be partially resolved (Chantry and Magain 2007). The wavelength dependence of the scaling factor reveals higher dust extinction along the B line of sight than along the A one, as discussed in detail in Sect. 3.2. In the following we consider the average spectrum of components A and B, denoted AB, as the reference spectrum unaffected by microlensing effects. As seen in the upper panel of Fig. 2, the spectrum of H1413+117 changes regularly with time, suggesting intrinsic variations in the quasar outflow (this is further discussed in Sect. 3.3). These changes are observed in all components, indicating that the time scale of the intrinsic line profile variation is longer than the time delays between the four images. In fact, the longest time delay is not larger than one month according to the observations of Goicoecha and Shalyapin (2010) and in agreement with models 1 (Kayser et al. 1990, Chae andTurnshek 1999).
The spectrum of component D is clearly different when compared to AB. After scaling the continua, the emission appears less intense in D. This behavior is observed at all epochs and in the different spectral lines, superimposed onto the intrinsic time variations seen in all components. This is a clear signature of a long-term microlensing effect in D with amplification of the continuum with respect to the emission lines. The timescale of the effect is in agreement with previous estimates, i.e. on the order of 10 years (e.g. Hutsemékers 1993). As first pointed out by Angonin et al. (1990), a difference is also observed in the absorption profiles. This difference is especially strong in the 1989 and 1993 spectra. This is a priori not expected since the region at the origin of the observed absorption lines has the same spatial extent as the continuum source. Differential microlensing of absorbing clouds smaller in projection than the continuum source has been proposed (Angonin et al. 1990). However the timescale of such an event is expected to be smaller than 1 year (Hutsemékers 1993), ruling out this interpretation. Instead, we interpret the difference in the absorption profiles as due to the superposition of an emission line onto a nearly black absorption profile (Sect. 6.1).
Although not as strong as in component D, spectral differences are also observed when comparing C to AB. After scaling the continua, the emission lines appear slightly stronger in C at all epochs, with a possible differential effect between the broad Hβ and the narrower [O iii] lines. This suggests that microlensing also affects component C, de-amplifying the continuum with respect to the emission lines.
The scaling factor used to fit the continuum of D to that one of AB clearly depends on wavelength. This can be explained either by chromatic microlensing (the source of UV continuum is less extended than the source of visible continuum and then more magnified), differential extinction (the extinction along the AB line of sight is higher than along the line of sight to D), wavelength-dependent dilution of the quasar continuum by the host galaxy light, or a combination thereof. Such a strong wavelength dependence of the scaling factor is not observed when comparing C to AB. The origin of this effect is further discussed in Sect. 5.2.    1989,1993,1994,2000, and from the near-infrared spectra of 2005 (crosses of different colors). Photometric data point obtained at different epochs are superimposed (black diamonds with error bars). The continuous lines represent SMC-like extinction curves redshifted to z l = 1.0.

The extinction curve from A/B
Since images A and B are not significantly affected by microlensing, the wavelength dependence of their flux ratio can be interpreted in terms of differential extinction in the lensing galaxy. Fig. 4 illustrates the observed flux ratio F A /F B using all available spectroscopic data (slightly filtered and smoothed). Photometric data are superimposed. They were collected from Angonin et al. (1990), Østensen et al. (1997; the ratios F A /F B are averaged per filter), Turnshek et al. (1997), Chae and Turnshek (2001), Kneib et al. (1998), Chantry and Magain (2007), MacLeod et al. (2009).
There is a lot of dispersion in the measured flux ratios which arises not only from inacurracies in the data but also from a possible combined effect of intrinsic photometric variations and time delay (cf. Østensen et al. 1997). A clear trend is nevertheless observed, indicating higher extinction along the line of sight to image B, as suggested by Turnshek et al. (1997). The flux ratio is reasonably well modeled using is the difference of extinction between the A and B line of sights measured in the B filter and ξ(λ) the extinction curve tabulated in Pei (1992), redshifted to the lens redshift z l ≃ 1.0 (Kneib et al. 1998). Since no obvious 2200Å feature typical of the Milky Way extinction is observed at 2.3 µm −1 (Fig. 4), we adopt a SMC-like extinction curve. A reasonably good fit is obtained with F A0 /F B0 = 1.05±0.02 and ∆A B = −0.09±0.02 (Fig. 4). With z l ≃ 1.88 (Goicoecha and Shalyapin 2010) a similar fit is obtained with ∆A B = −0.055±0.015. For z l ≃ 1.0 (1.88), the lines of sight to images A and B sample regions of the lens galaxy located at respectively 4.9 (5.2) kpc and 6.0 (6.4) kpc from the galaxy center, adopting the astrometry of Chantry and Magain (2007) and assuming a flat cosmology with Ω m = 0.27 and H 0 = 70 km s −1 Mpc −1 . The flux ratio F A0 /F B0 = 1.19±0.10 measured by MacLeod et al. (2009) at 11 µm in the mid-infrared, i.e. at wavelengths were both extinction and microlensing are expected to be negligible, is compatible with the extinction corrected flux ratio F A0 /F B0 we derive, although marginally higher.

Intrinsic line profile variations
Time variations in the absorption line profiles of BAL quasars are not uncommon (Barlow et al. 1989, 1992, Gibson et al. 2008. In H1413+117, Turnshek et al. (1988) reported a deepening of the Si iv BAL between 1981 and 1985. On the contrary, between 1989 and 2005 (Fig. 2), variations are observed as a gradual decrease of the depth of the BAL high-velocity part, the deepest component of the profile being essentially unaffected.
Variations appear more complex in Si iv than in C iv, affecting a larger part of the absorption profile (see also Fig. 6). The strongest change occurs between 1989 and 1993 and corresponds to an increase of the luminosity (Remy et al. 1996(Remy et al. , Østensen et al. 1997. Moreover, stronger absorption is accompanied by stronger emission, which is an indication that resonance line scattering can play an important role in the emission line formation. In the C iv line of the AB spectrum, the highvelocity absorption appears ∼15% larger in 1989 than in 2005 while the emission is ∼25% more intense. In the framework of resonance scattering where each absorbed photon is re-emitted, this may suggest that the high-velocity outflow has more scattering material perpendicular to the line of sight than absorbing material along the line of sight. This also requires a large covering factor.

The method
We follow a method similar to that used in Sluse et al. (2007). Assuming that the observed spectra F i of the different images are made of a superposition of a spectrum F M which is only macrolensed and of a spectrum F Mµ which is both macro-and microlensed, it is possible to extract the components F M and F Mµ by using pairs of observed spectra. Indeed, considering a line profile, we can write where M = M 1 /M 2 is the macro-amplification ratio between images 1 and 2 and µ the micro-amplification factor of image 1. We assume image 2 not affected by microlensing. To extract F M and F Mµ when M is not known a priori, these equations can be conveniently rewritten where A = Mµ. Considering the line profiles as the sum of a continuum (absorbed or not in the blue) and an emission profile,

and then
Up to a scaling factor, F M only depends on A, while F Mµ only depends on M (Eqs. 4 and 5). A is the scaling factor between the It can be accurately determined as the value for which F M (A) = 0 in the continuum adjacent to the line profile, where F e = F ′ e = 0 (Eq. 6). Assuming A constant across the line profile, F M then only contains a contribution from the emission profile. Under the assumption that at least a portion of the observed emission profile is only macro-amplified (i.e. not micro-amplified), the macro-amplification factor can be estimated as the value of M such that F Mµ (M) = F c over that part of the line profile (Eq. 7, see also Appendix A). The microamplification factor of the continuum is then estimated at the wavelength of the line profile: µ = A/M. On the other hand, if the emission line is amplified exactly like the continuum, microlensing cannot be distinguished from macrolensing.
Eqs. 6 and 7 show that if the emission profile is only macroamplified (i.e. if F ′ e = M F e ), F Mµ only contains the underlying continuum F c , while F M contains the full emission profile F e . If the emission profile is micro-amplified to some extent, parts of it will appear in both F Mµ and F M (see Appendix A). More specifically, (F Mµ − F c ) can be seen as the part of the emission profile which is not only macro-amplified, and F M as the part of the emission profile which is not amplified like the continuum.
The micro-amplification factor µ and the macroamplification factor M possess some specific chromatic behaviors. While µ is assumed constant over the small wavelength range spanned by a line profile, it can be different at the wavelengths corresponding to different line profiles. Indeed, the micro-amplification of the continuum is related to the effective size of the continuum source which can be wavelength-dependent. The macro-amplification factor M may also contain a wavelength-dependent contribution due to differential extinction in the lensing galaxy, since extinction, like macrolensing, acts on the line profile as a whole. Finally, concerning the time dependence properties, M is expected to remain identical at different epochs of observation while µ can be time-dependent.

Line profile decomposition from the (D,AB) pair
We extract F M and F Mµ from the spectra of H1413+117 using F 1 = F D and F 2 = F AB in Eqs. 4 and 5. We have M < 1 and µ > 1 since D is fainter than AB and its continuum amplified (Sect. 3.1). A is computed as the value for which F M (A) = 0 in the continuum windows adjacent to the line profiles (cf. Sect. 3.1). Within the uncertainties, A is the inverse of the scaling factor determined in Figs. 2 and 3. M is computed as the largest value for which F Mµ (M) ≥ F c over the whole line profile. For the resonance line profiles, the continuum may be completely absorbed at some wavelengths such that F Mµ (M) must also be larger than zero. Measurements of A and M are given in Table 2 with µ = A/M. Taking into account the noise and possible contaminating features in the observed spectra, a range of acceptable values is obtained which provides a rough estimate of the uncertainties. These are typically 2-3% for A and 4-10% for M. As expected, the macro-amplification factor M is independent of the epoch of observation, the dispersion of the values being in agreement with the uncertainties. The temporal variation of A then essentially comes from the variation of the micro-amplification of the continuum. This is shown in Fig. 5. This figure also suggests that, within the uncertainties, there is no significant wavelength dependence of M due to a differential reddening between AB and D (see also Sect. 5.1).
With the measured A and M, we then compute F M and F Mµ from Eqs. 4 and 5. The results of the line profile decompositions are given in Figs. 6 to 8. Over large parts of the emission profile (mainly in the wings), F Mµ = F c . This indicates that at least a part of the observed emission line profile is unaffected by microlensing and that M actually represents the macroamplification factor. We emphasize that the derived F M and F Mµ profiles are robust against small changes of A or M. Fig. 6 illustrates the spectral decomposition for the Si iv -C iv region. Although different values of A (or µ) are found at different epochs, the extracted spectra are remarkably consistent. The microlensed part of the spectrum, F Mµ , contains the continuum with the full absorption profiles as well as a small contribution from the core (not the wings) of the emission profiles. The bulk of the emission lines appears in the macrolensed-only part of the spectrum F M , clearly showing a two-peak structure in C iv (at 5350 Å and 5500 Å). Recall that F M shows the flux emitted from a large region of the quasar (much larger than the Einstein radius of the microlens) whereas F Mµ shows the flux emitted from a smaller region (comparable to and smaller than the Einstein radius). Interestingly enough, the small part of the emission profile observed in F Mµ is the core, i.e. the low-velocity part. The temporal variations of the absorption are particularly well seen in the F Mµ spectrum of Si iv.
The rest-frame UV spectra, and more particularly the Lyα + N v region, are similarly analyzed (Fig. 7). Although the decomposition is less accurate due to structures in the continuum blueward of Lyα (possibly due to narrow absorption features and  inaccuracies in the wavelength calibration), the extracted spectra F Mµ and F M show the same qualitative behavior as observed in the C iv and Si iv line profiles.

Line profile decomposition from the (C,AB) pair
The same kind of analysis can be done using the pair (C,AB). However the line profile differences are more subtle (cf. Figs. 2 and 3) so that the value of M is closer to the value of A (i.e. µ closer to 1) in Eqs. 4 and 5, making the extracted spectra noisier. Only the spectra obtained in 2000, which show the most conspicuous profile differences, are considered here. A de-magnification of the continuum explains the observations (Sect. 3.1) and the resulting F M and F Mµ are illustrated in Fig. 9. They are roughly similar to those derived from the pair (D,AB) but the part of the emission profile which is micro-amplified is different. While only a small part of the core of the emission is seen in the F Mµ profile derived from the (D,AB) pair, the red wing of the emis-sion profile is also observed in F Mµ computed from (C,AB). This red wing and the blue emission peak are not seen in F M , suggesting that the high-velocity component of the C iv resonance line is micro-deamplified like the continuum. This is not unexpected since, for a given Einstein radius, demagnification regions with relatively smooth µ variations can extend on larger scales than amplification regions (e.g. Lewis and Ibata 2004). The emission line core, which appears in both F Mµ and F M , should originate, at least in part, from a region more extended than the highvelocity component. This means that they are also micro-deamplified although not as much as the continuum.

The macro-amplification factors
In principle, the variation of M with the wavelength can be attributed to differential extinction. Unfortunately, for the (D,AB) pair, the wavelength dependence is not clear enough to extract an extinction curve, given the uncertainties on the determination of M (Fig. 5 and Table 2). The results nevertheless suggest that the differential extinction between AB and D is lower than between A and B for which the extinction at Lyα is ∼ 1.2 times the extinction at Hα (Fig. 4). As a consequence, the value M(D,AB) = 0.395±0.015 determined at the wavelength of Hα, i.e. in the reddest part of our spectra, should not differ from the true macroamplification factor by more than 2%.
For the (C,AB) pair, we conservatively adopt M(C,AB) = 0.95 ± 0.08 at the wavelength of Hα. Comparing with M(C,AB) = 1.15 ± 0.05 and M(C,AB) = 1.05 ± 0.05 at the wavelengths of Lyα and C iv, respectively (Fig. 9), M(C,AB) might be slightly wavelength dependent, providing marginal evidence that extinction is lower for C than for AB. Since the differential extinction remains low, we also assume that it does not affect the macroamplification factor determined at the wavelength of Hα by more than 2%.
The flux ratios with respect to component A are then F B0 /F A0 = 0.95±0.02 (Fig. 4), F C0 /F A0 = 0.93±0.10 and F D0 /F A0 = 0.39±0.04. The fact that F C0 /F A0 and F D0 /F A0 are different from the values estimated from photometry is due to a significant de-amplification of the C continuum and to a significant amplification of the D continuum, as derived from the analysis of the spectral lines. This emphasizes the need to properly correct for microlensing before interpreting the flux ratios. MacLeod et al. (2009) determined F B0 /F A0 = 0.84±0.07, F C0 /F A0 = 0.72±0.07 and F D0 /F A0 = 0.40±0.06 at 11 µm in the mid-infrared, i.e., where microlensing and extinction are thought to be negligible. Although only marginally different, the flux ratios of the B and C components relative to A seem slightly smaller than ours. If real, the origin of such a discrepancy is not clear but could be related to the intense starburst activity detected in the host galaxy of H1413+117 (Lutz et al. 2007, Bradford et al. 2009), which possibly contaminates with PAH emission the 11.2 µm (3.2 µm rest-frame) flux measurements.

Microlensing of the continuum source
The micro-amplification factor µ determined in component D depends on both the date and the wavelength (Table 2).
Considering the Si iv-C iv spectral region, the strongest variation of µ occurs between 1989 and 1993 (see also Figs. 2 and 6). It roughly corresponds to a relative photometric variation between A and D which can be observed in the V light curves of H1413+117 presented by Remy et al. (1996) and Østensen et al. (1997), superimposed onto the common intrinsic variation of the 4 components. Between 1993 and 2000, the variation of µ is weaker, in agreement with the HST photometry in the F555W filter reported by Turnshek et al. (1997) and Chae et al. (2001).
At a given epoch, µ decreases with increasing wavelength, suggesting chromatic magnification of the continuum source. This is best seen in the 2005 data (obtained within a 2 month interval) which span the largest wavelength range. We emphasize that µ, when determined from the line profiles, is not contaminated by differential extinction (Sect. 4.1). In Fig. 10, we plot the values of µ as a function of the wavelength of observation in the quasar rest-frame.
The magnification µ of an extended source close to a caustic can be written where R S is the source radius, R E the Einstein radius of the microlens projected onto the source plane, g is a constant on the order of unity, ζ(d) a function which depends on the distance to the caustic and µ 0 a constant "background" magnification (e.g. Schneider et al. 1992, Witt et al. 1993. In the framework a simple model where the continuum is emitted by a Shakura-Sunyaev (1973) thin accretion disk thermally radiating, R S (λ) ∝ λ 4/3 (e.g. Poindexter et al. 2008) such that we may expect As seen in Fig. 10, this model nicely reproduces the data using C = −0.55 and assuming for simplicity µ 0 = 1 (i.e. no background (de-)magnification), supporting the idea of chromatic magnification of a continuum emitted by a Shakura-Sunyaev accretion disk.
In principle, we could have used the Lyα+N v and the C iii] λ1909 emission lines, also present in the 2005 visible spectra, to measure µ at other wavelengths. Although tentative estimates do agree with the observed trend, the quality of the data is not sufficient to derive reliable values of µ at these wavelengths, due to the insufficient spectral resolution in the complex Lyα+N v region and to the fact that the C iii] line is truncated. Clearly, with better quality data, it could be possible to separate M and µ at other wavelengths using additional line profiles and thus derive the temperature profile of the accretion disk.
From the value of the constant C, we can derive a rough estimate of the size of the continuum source : R S (λ)/R E λ 4/3 10 −2C . The Einstein radius is computed to be R E ≃ 0.01 √ M/M ⊙ pc using z l = 1.0, a flat cosmology, Ω m = 0.27 and H 0 = 70 km s −1 Mpc −1 . M is the mass of the microlens. Then, R S (λ) The polarization degree p is given in percent and the polarization position angle θ in degree, East of North. The data obtained in 1999 are from Chae et al. (2001). 0.012 √ M/M ⊙ pc at the rest-frame UV wavelength λ = 0.15 µm. This limits tightens to R S (λ) 0.007 √ M/M ⊙ pc with z l = 1.88. These values agree with the radii obtained for the lensed quasars HE1104−1805 and Q2237+0305 on the basis of their photometric variability due to microlensing (e.g. Poindexter et al. 2008, Eigenbrod et al. 2008, Anguita et al. 2008b. Dilution of the quasar continuum -microlensed-by the host galaxy light -not microlensed-can affect the interpretation of the wavelength dependence of µ. Denoting α = F c (host)/F c (qso) the ratio of the host and quasar continua at a given wavelength, we find that the micro-amplification factor of the quasar continuum µ q is related to the measured µ by if the host galaxy is unresolved and macrolensed as the quasar if the host galaxy is resolved and not macrolensed (i.e. if F ′ c = M µ q F c (qso) + F c (host) assuming the host contained in the measurement aperture). Dilution by the host galaxy is expected to be stronger in the rest-frame visible-infrared than in the ultraviolet. In the rest-frame visible of a luminous high-redshift object, α 0.15 (e.g. Schramm et al. 2008) so that µ q does not differ from µ by more than 5% (even less if the host is partially resolved). This is negligible and within the uncertainties. Chae et al. (2001) have obtained the first polarization mesurements of the four images of H1413+117 using the HST. The F555W filter was used. They noted that, in March 1999, the polarization degree of component D might be higher that the polarization degree of the other components (Table 3). From this result, they suggested that microlensing also affects the scattering region. The measurements obtained in June 1999 possibly indicate an intrinsic variation of the polarization observed in all components. Similar variations have been reported by Goodrich and Miller (1995).

Microlensing of a scattering region ?
Taking advantage of an excellent seeing, we were able to measure the polarization of the 4 components of H1413+117 in the V filter, from the ground. Our measurements are also reported in Table 3. Within the uncertainties, the polarization degree of components A, B and C do agree with the March 1999 values of Chae et al. (2001), while the polarization degree of component D does not. Instead, we find that the difference between the polarization degrees measured in A and C and those ones measured in B and D is significant. The difference between A and B is especially intriguing since we found no significant microlensing effect neither in A nor in B (at least before 2005). Possible interpretations could involve the polarization due to an extended scattering region resolved by the macrolens (possibly in the host galaxy, see Borguet et al. 2008), or a differential polarization induced by aligned dust grains in the lens galaxy. More data are clearly needed to correctly understand the meaning of these measurements.

Consequences for the BAL formation
In the previous sections we derived a consistent picture of microlensing in H1413+117, showing that the continuum of component D (or more precisely all the regions of the quasar located in a cylinder of diameter ∼ 2 R E oriented along the line of sight and containing the continuum source) is magnified with respect to the more extended regions at the origin of the emission lines. This allowed us to disentangle the absorption part of the BAL profiles, essentially F Mµ , from the emission part, essentially F M (Figs. 6 to 8). The observed profiles are equal to the sum of the F Mµ and F M spectra (Eq. 3). The separation is robust against the uncertainties of the amplification factors. It is however not perfect since emission which originates from regions close to the continuum source in projection appears in F Mµ . Selected spectra are illustrated in Fig. 11 on a velocity scale.
The absorption profile of the C iv BAL appears nearly black extending from v ≃ −2000 km s −1 to v ≃ −10000 km s −1 . It is especially interesting to note that the flow does not start at v = 0 in the rest-frame defined by the [O iii] emission lines. The part of the profile between −8000 and −10000 km s −1 is clearly variable between 1993 and 2000, showing a smaller depth in 2000. At a given epoch (1993)(1994), the absorption appears stronger in N v and weaker in Si iv; this is best seen in the velocity range −2000 to −4000 km s −1 and indicates an ionization dependence of the optical depth. The extracted emission profiles show a double-peaked structure which extends to the blue as far as the absorption profile does. The blue peak at −8000 km s −1 appears much fainter than the red peak at −1000 km s −1 . The full emission profile (represented by the green line in Fig. 11) is roughly centered on the onset velocity of the flow (−2000 km s −1 ), thus blueshifted with respect to the [O iii] rest-frame. In fact, the full absorption + emission line profile appears in a restframe blueshifted by −2000 km s −1 with respect to the rest-frame defined by the [O iii] emission lines. Hα, on the other hand, appears redshifted (Fig. 3). Although not clearly understood, these line shifts are common in quasars (e.g. Corbin 1990, McIntosh et al. 1999) and particularly strong in BAL QSOs (Richards et al. 2002), in agreement with our observations. Interestingly enough, Nestor et al. (2008) found a deficit of intrinsic C iv Narrow Absorption Line (NAL) systems at outflowing velocities lower than 2000 km s −1 , possibly due to overionization close to the accretion disk.
The shape of the emission suggests that it is occulted by a strong absorber, narrower in velocity than the full absorption profile, and emitting little by itself. Very similar absorption and emission profiles are produced in the outflow model of Bjorkman et al. (1994) proposed for early-type stars. We build on this model to interpret our observations. A toy model, detailed in Appendix B, is used for illustrative purposes (a full radiative transfer modeling is beyond the scope of the present paper; it is presented in Borguet and Hutsemékers, 2010, where details on the flow geometry are also given). We assume that the outflow in H1413+117 is constituted of two components: a quasi- spherically symmetric "polar" outflow, and a denser disk seen nearly edge-on. The equatorial disk expands slower than the polar wind and partly covers it. The polar outflow produces typical P Cygni line profiles constituted of the superposition of a deep absorption extending from −2000 to roughly −10000 km s −1 and a symmetric emission due to resonantly scattered photons (e.g. Lamers and Cassinelli 1999). This emission (assumed gaussian shaped for simplicity) is centered on v ≃ −2000 km s −1 and extends from −10000 to +6000 km s −1 . Both the remaining continuum and the emission from the polar wind are absorbed in the equatorial disk. A double-peaked emission line is then produced (Fig. 11), little emission being expected from the edgeon disk. As we can see from Fig. 11, this simple model is able to reproduce the main characteristics of the intrinsic emission line profiles extracted from the microlensing analysis. Since the disk is expected to also absorb the continuum, its absorption profile must be contained within the total polar+equatorial absorption profile, as illustrated. Variability of the polar outflow optical depth will generate variations at the high velocity end of the absorption accompanied by a change in the resonantly scattered emission, as observed (Sect. 3.3; see also Bjorkman et al., 1994, for simulations). Note that two-component winds have good the-oretical grounds (e.g. Murray et al. 1995, Proga andKallman 2004) and are supported by many observations interpreted with either disks or polar flows (cf. Sect. 1).
Spectropolarimetric observations of H1413+117 (e.g. Goodrich andMiller 1995, Lamy andHutsemékers 2004) provide additional evidence favoring this kind of scenario. First, the polarization angle rotates within the absorption line profiles, suggesting the existence of at least two sources and/or mechanisms of polarization. The polar outflow and the disk, expected to produce perpendicular polarizations, can play this role, especially in the case of BAL QSOs with P Cygni-type profiles (Goodrich 1997, Hutsemékers et al. 1998, Lamy and Hutsemékers 2004. Furthermore, the absorption in the polarized spectrum is clearly narrower than the absorption in the direct spectrum (this is best observed in Fig. 3 of Goodrich and Miller, 1995), supporting the existence of a slowly expanding equatorial disk which absorbs the polar-scattered flux.

Microlensing in the BAL
The difference observed in the BAL profiles of images AB and D (best seen in C iv, Fig. 2) can also be interpreted in the frame-work of this outflow model. In 1989 and 1993, the intrinsic absorption at 5330 Å (−9000 km s −1 ) due to the high-velocity "polar" outflow is nearly black (Fig. 6 and 11). In classical P Cygni line profile formation (e.g. Lamers andCassinelli 1999, Hutsemékers and, this absorption is partially filled in with emission resonantly scattered at the same velocity (the blueward peak of the intrinsic emission, not absorbed by the slower disk, and seen in Figs. 6 and 11). Since the emission line and the absorbed continuum react differently to the magnification by the microlens, a spectral difference is observed in the high-velocity part of the BALs seen in AB andD. Later, in 2000 and2005, the high-velocity part of the BAL profile is less optically thick: the absorption is not as deep as in the nineties and the blue wing of the resonantly scattered emission which fills in the absorption is accordingly weaker (the blue emission peak appears narrower or less intense in 2000 and 2005, Figs. 6 and 11). As a consequence, the microlens-induced spectral difference observed in the high-velocity part of the BALs appears smaller at these epochs.

Conclusions
Using 16 years of spectroscopic observations of the 4 components of the gravitationally lensed BAL quasar H1413+117, we derived the following results. − The strength of the BAL profiles gradually decreases with time in all components. This intrinsic variation is accompanied by a decrease of the intensity of the emission. − The spectral differences observed in component D can be attributed to a long-term microlensing effect, in agreement with previous studies. This effect consistently magnifies the continuum source of image D, leaving the broad emission line region essentially unaffected. We also find that the continuum of component C is most likely de-magnified, while components A and B are not affected by microlensing. Differential extinction is found between A and B. − Using a simple decomposition method to separate the part of the line profiles affected by microlensing from the part unaffected by this effect, we were able to disentangle the intrinsic absorption (affected) from the emission line profile (unaffected). Consistent results are obtained for the different epochs of observation. − Considering the macro-and micro-amplification factors estimated with this method, we obtain a coherent view of lensing in H1413+117. In particular, we show that microlensing of the D continuum source has a chromatic dependence which is compatible with a continuum emitted by a standard Shakura-Sunyaev accretion disk. − To interpret the extracted absorption and emission line profiles, we propose that the outflow from H1413+117 is constituted of a high-velocity polar flow (at the origin of the intrinsic variations) and a dense disk expanding at lower velocity and seen nearly edge-on. This is in agreement with spectropolarimetric data and supports the idea that BAL outflows can have large covering factors.
In our analysis, we focused on the most robust results. Several interesting questions nevertheless remain opened, requiring more observations or a full radiative transfer modeling. In particular, why does the polarization of the different components apparently differ? Is the scattering region actually magnified? High-quality spectropolarimetry of the four images of H1413+117 may solve this issue and bring more informations on the nature of the ouflow. As seen in Figs. 6 to 9, different parts of the emission line profiles appear micro-(de)amplified in components C and D. Detailed line profile calculations are needed to understand the origin of this micro-amplified emission and shed light on the outflow kinematics. With excellent signal-to-noise spectra, it would also be possible to better use the microlensing effect observed in component C.
We consider a line profile constituted of an underlying continuum F c (λ) (absorbed or not at some wavelengths) and an emission profile F e (λ) = E a (λ) + E b (λ). We assume the continuum F c micro-amplified by a constant factor µ c , the component E a of the emission micro-amplified by a constant factor µ e , and the component E b unaffected by microlensing 2 . We consider a typical case with µ c > µ e > 1. If M is the relative macro-amplification factor between images 1 and 2, we have Using these expressions with A = Mµ c and µ = µ c in Eqs. 4 and 5, we find With µ c > µ e > 1, F M > 0 and F Mµ > 0. As expected, F M contains the emission profile E b unaffected by microlensing, F Mµ contains the continuum, and both F M and F Mµ contain a part of the micro-amplified emission profile E a . Up to a scaling factor, the micro-amplified profile E a is given by F Mµ − F c . To effectively compute Eqs. 4 and 5 and to determine the profile of F Mµ , we need to know M 3 (or µ c ). Practically, we consider M as a free parameter in Eq. 5 and, by varying it, we adopt the value of M closest to A such that F Mµ (M) ≥ F c at all wavelengths (Eq. 7). This is equivalent to adopt a value of µ c as close as possible to 1, thus ensuring that the macro-and microamplifications are best separated (see also Sluse et al. 2007).
2 It is always possible to write µ ′ e (λ) F e = µ e E a + E b where µ e = max(µ ′ e (λ)). 3 As discussed in Sect. 4.1, the factor A and then the profile of F M are more easily determined.
Unless M ≃ A, this method provides a reasonably accurate estimate of M, and then of µ c . Indeed, denoting the free parameter M ′ and using expressions A.1 and A.2 in Eq. 5, we write If E a = 0 and E b 0 at some wavelengths, then µ min = 1 and M = M ′ . This means that M can be derived empirically when at least a portion of the observed emission line profile F e is not micro-amplified. In fact this is formally always true. Indeed, if µ min 1, the whole profile would be micro-amplified by µ min i.e. macro-amplified by Mµ min instead of M, which is inconsistent with an optimal separation of macro-and micro-lensing 4 . It should nevertheless be kept in mind that if the emission line is amplified just like the continuum, microlensing cannot be distinguished from macrolensing. Fortunately, it is realistic to assume that a portion -even a very small one-of the observed emission line profile F e is not micro-amplified given the large size of the emission line region compared to the source of the continuum and to a typical Einstein radius. This hypothesis can be verified as follows: if we notice that F Mµ = F c and F M 0 over a certain wavelength range, then we must have M ′ = M and µ min = 1. Indeed, combining Eqs. A.5 and A.6, we find that when F Mµ = F c then either E a must be proportional to E b over that wavelength range -which is unlikely since E a and E b are meant to originate from different emission regions-or µ min = 1.