{'fraction_non_alphanumeric': 0.02896183787903533, 'fraction_numerical': 0.0262943001796505, 'mean_word_length': 4.643625192012289, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
AGN mass estimates in large spectroscopic surveys: the effect of host galaxy light

Virial-based methods for estimating active supermassive black hole masses are now commonly used on extremely large spectroscopic quasar catalogues. Most spectral analyses, though, do not pay enough attention to a detailed continuum decomposition. To understand how this affects virial mass estimate results, we test the influence of host galaxy light on them, along with Balmer continuum component. A detailed fit with the new spectroscopic analysis software QSFit demonstrated that the presence or absence of continuum components do not affect significantly the virial-based results for our sample. Taking or not in consideration a host galaxy component, instead, affects the emission line fitting in a more pronounced way at lower redshifts, where in fact we observe dimmer quasars and more visible host galaxies.


Introduction
Massive black holes (MBHs), commonly observed in the centers of massive galaxies, can be fully characterized by only two parameters: their masses and their spins (see e.g., Sesana et al. 2014, and references therein). Since MBH spins affect the dynamics of matter only within their innermost few gravitational radii, spins are usually constrained through observationally challenging X-ray spectroscopy complemented with relativistic modeling of broad iron lines (see Brenneman 2013;Reynolds 2014, for recent reviews on the topic 1 ). On the other hand, MBH masses can dominate the dynamics of gas and stars up to parsec scales (depending on the MBH masses and the host properties; see e.g., Dotti et al. 2012) and are therefore easier to constrain. Direct measurements are possible in a limited number of cases, through orbital fitting of single stars as for the case of our Galaxy (see e.g., Genzel et al. 2010;Meyer et al. 2012;Gillessen et al. 2009a,b), through fitting the dynamics of megamaser emitting disks (Braatz et al. 1997;Greene et al. 2010;Van Den Bosch et al. 2016), or by modeling the dynamics of whole stellar and/or gaseous populations in the immediate vicinities of the MBHs (e.g., Gebhardt et al. 2003;Van Der Marel et al. 1998;Ferrarese & Ford 2005, for a review).
Alternative options for estimating MBH masses are available for the subclass of Type I active MBHs (AGN). A widely used method to perform MBH mass estimates for this class of sources is based on the virial theorem (see Peterson 2014, and references therein). The main assumption in this approach is that the gas in the sub-parsec region emitting the broad lines (BLR) is virialized and its dynamic is dominated by the central MBH. Therefore the 1 But see Davies & Laor (2011);Trakhtenbrot (2014);Capellupo et al. (2016); Campitiello et al. (2018) for alternative techniques.
virial MBH mass is determined by: where V is the virial velocity and R the size of the BLR. Assuming that broad emission lines (BELs) are Doppler broadened due to the virial motion of the BLR, the full width at half maximum (FWHM) of the BELs can be used as a proxy of the emitting gas velocities. Moreover, through an analysis of the time-delayed response of BELs to variations of the continuum, reverberation mapping campaigns allow us to estimate the size of the BLR. Reverberation mapping studies have also revealed the so-called size-luminosity relation between the monochromatic luminosity of the AGN continuum and the BLR size (Kaspi et al. 2000;Bentz et al. 2006). Continuum luminosity can therefore be used as a proxy of the BLR size. Hence, MBH mass can be estimated by means of a fudge factor α that includes uncertainties on BLR shape and dynamics (see e.g., Decarli 2011). α factor can however be constrained self-consistently via reverberation mapping studies in cases where extremely high-quality and high-coverage data are available (Brewer et al. 2011;Pancoast et al. 2012). Shen et al. (2011) presented a systematic study of the SDSS DR7 Quasar Catalogue (Schneider et al. 2010), in which every spectrum is automatically fitted with a power-law continuum, along with broad and narrow emission lines and an iron template. MBH masses were constrained from the FWHM of different BELs (depending on the AGN redshift), and the monochromatic luminosity in the proximity of the BEL used. In this paper we re-examine all the AGN in the SDSS-DR10 catalog by performing an independent fit of each AGN spectrum with the publicly available QSFit code (Calderone et al. 2017) 2 . In addition to the spectral features related to the accreting MBH, the code includes an elliptical galactic template (Polletta et al. 2007). This feature is important for two reasons: (i) it could contribute to the monochromatic luminosity, resulting in the overestimation of single epoch MBH masses, and (ii) depending on its intensity and spectral shape, it could affect the BEL shape and, hence, the FWHM. The contamination from the host galaxy can be drastically reduced in multiple ways, for example, by taking high-angular-resolution nuclear spectra, or by considering only the varying component of the emission from multi-epoch spectral studies of the same AGN (as done in reverberation mapping). We stress however that none of these approaches can be applied to very large AGN samples characterized by broad distributions of AGN luminosities and redshifts, such as the SDSS catalog. Therefore, in order to maximize the payoff of such large surveys, the fitting of the host component is mandatory. Some methods have been proposed in the literature to estimate the contamination due to the host galaxy in continuum luminosity measurements. Shen et al. (2011) compute a statistical analysis on low-redshift sources (in which we expect a higher host-galaxy contamination) and provide an empirical fitting formula. In their work the resulting host galaxy contamination is on average ∼ 15% of the the continuum luminosity at 5100 Å on low-redshift sources (z 0.5). Other authors proposed different approaches such as the use of the equivalent width of the line Ca II K line at 3934Å as a proxy of the degree of host contamination (Greene & Ho 2005).
Different single epoch relations have been proposed to remove the host galaxy contamination (e.g., Eq. 6 and 7 of Greene & Ho 2005;Bongiorno et al. 2014), based on empirical relations observed on large samples of AGNs. Hence these relations are only able to estimate host galaxy contributions on average, not on individual sources. In this work, we analyzed each source individually to isolate the host galaxy contribution and avoid any possible bias introduced by the choice of the sample for the empirical relations.
The paper is organized as follows: in section 2 we discuss how we select the AGN sample used and review the main features of the spectral fitting implemented in QSFit. In section 3 we discuss our results and how they depend on the redshift and on the AGN properties. Finally, in section 4 we draw our conclusions and discuss possible future improvements.

Sample selection and data analysis
Our prime sample was composed of the 10578 sources in the QSFit catalog (version 1.2 Calderone et al. 2017) with z < 0.8 for which a measurement of the AGN continuum luminosity at 5100 Å and of the FWHM Hβ was available in Shen's catalog (Shen et al. 2011). We analyzed the SDSS-DR10 optical spectra using the QSFit software (version 1.2 Calderone et al. 2017). Each spectrum is de-reddened following the prescription by Cardelli et al. (1989) andO'Donnell (1994), then transformed to rest frame and finally analyzed using the QSFit recipe which simultaneously fits all the spectral components visible in the observed wavelength range. QSFit uses a power law to model the AGN broad band, a component to account for the Balmer continuum (following the recipe by Grandi 1982;Dietrich et al. 2002), the Polletta et al. (2007) elliptical galaxy template to account for the host galaxy emission, the iron templates by Vestergaard & Wilkes (2001) and Véron-Cetty et al. (2005) at UV and optical wavelengths respectively, and several Gaussian profiles to account for the most commonly observed emission lines. We collected all the output values and extracted the relevant quantities for the purpose of this work, namely the λL λ continuum luminosity at 5100Å (L 5100 ), the Balmer continuum contribution, and the FWHM of the Hβ emission line.
The inclusion of the Balmer continuum component in the fit procedure affects the slope of the continuum and could, as a consequence, modify the continuum at longer wavelengths. By running the analysis with and without considering the Balmer continuum component (by setting the !QSFIT_OPT.balmer option to 0) we quantify its impact on the MBH mass estimates.
We selected the sources for which the fit quality flag of the continuum at 5100 Å and of the Hβ broad emission line components were good (namely CONT5100_QUALITY and br_Hb_QUALITY simultaneously equal to 0) for both standard and without Balmer component analysis. The final sample consisted of 9107 sources.
In the following, results of the standard analysis will be flagged as L B 5100 and FWHM B Hβ , while the quantities obtained by disabling the Balmer continuum component will be flagged as L nB 5100 and FWHM nB Hβ . Figure 1 shows the results of our full spectral fitting procedure (including the Balmer continuum component; see the discussion above) performed over two AGN-host galaxy systems, exemplifying the different possible degrees of host galaxy contribution to SDSS spectra. The upper panel shows the SDSS image and spectrum of SDSS J032545.70-000820.6, a source with a host galaxy significantly fainter than the AGN, while the lower panel shows SDSS J155053.16+052112.1, an AGN hosted in a brighter galaxy. Other than being clearly different in the SDSS images (host galaxy emission almost unresolved in the upper panel), the two nuclei significantly differ in their spectra. The spectrum of SDSS J032545.70-000820.6 is well fitted without any need for a relevant host galaxy contribution.

Supermassive black hole mass estimates
On the other hand, the analysis performed on the spectrum of SDSS J155053.16+052112.1 reveals a dominant contribution of the host galaxy light in the continuum emission. In this case an analysis performed without considering the host galaxy contribution would lead to an overestimate of at least a factor 1.3 in the 5100 Å continuum 3 . A poor estimate of the continuum could also affect the emission line profile reconstruction: S11 fits BELs with a combination of up to four Gaussian profiles in order to account for asymmetries, while in 82% of cases we require only one component to achieve a good fit 4 . After running the two variants of spectral fitting discussed in Sect. 2 over our entire sample, we proceed to estimating the MBH masses (M) using the two following calibrations: proposed by Vestergaard & Peterson (2006). Neither calibration includes the host galaxy contribution. These relations have been 3 It corresponds to a host galaxy contribution of ∼ 25%, significantly larger than the ∼ 15% estimated by Shen et al. (2011). 4 When multiple Gaussians are needed to achieve a good fit, the FWHM is derived from the total line profile.  Broad emission lines are shown with solid blue lines, while narrow emission lines with solid brown lines. The solid purple line is the sum of all the "unknown" lines. The spatial region from which the SDSS spectra were obtained is shown in the SDSS images with a green circle with a diameter of 3 arcsec. The two sources have significantly different contributions from the host galaxy: this is evident both in the SDSS images and in the spectra. In our fitting procedure we did not fix the FWHM and fluxes ratio of the [OIII] doublet. This affects individual features of the [OIII] doublet, but does not affect the mass estimates. chosen to compare our findings with the estimates presented in S11 in order to quantify the effect of the host galaxy light on the estimate of M. The masses obtained from the full fitting procedure (i.e., the masses obtained using L B 5100 and FWHM B Hβ in Eqs. 2 and 3) are dubbed M B QSFit , while with M nB QSFit we indicate the mass estimates from the fitting that does not include the Balmer contribution. Figure 2 presents an overview of the results of our fitting procedures. In the upper left panel we show a comparison between the distribution of 5100 Å continuum luminosity measured by S11 (L S11 5100 ) and the distributions of L B 5100 and L nB 5100 obtained with the QSFit analysis. While the parameters obtained with and without the Balmer component are consistent (see also the other panels in Figure 2 and the following discussion), the L S11 5100 distribution clearly differs from the others, in that it is completely missing the low-luminosity tail: the less luminous AGNs have more likely a relevant host galaxy component, that contributes significantly to the 5100 Å monochromatic luminosity.
The same comparison between the FWHM Hβ distributions is shown in the lower left panel. Again, the FWHM distributions obtained with or without including the Balmer component in the QSFit analysis are comparable, while S11 estimate systematically narrower FWHM. Given that the QSFit results obtained with or without Balmer continuum component are substantially consistent, the resulting distribution of M B QSFit and M nB QSFit is compatible, as shown in the right panel of Fig. 2. As a consequence, in the following we limit our comparison to the masses presented in S11 and those obtained through the full QSFit analysis (M B QSFit ). Figure 3 shows the main result of our investigation. The twodimensional color-coded histogram indicates the redshift distribution of the M S11 to M B QSFit ratio. The different slope of the continuum luminosity at 5100 Å and the different normalization in the two calibrations affect the ratio M S11 /M distributions shown with two-dimensional histograms in Fig. 3. Indeed in Eq. 2 the L 5100 slope is 0.61 resulting in a M S11 /M ratio generally 1 for McLure & Dunlop (2004) calibration; while in Eq. 3 the L 5100 slope is 0.5 resulting in a M S11 /M distribution 1 for Vestergaard & Peterson (2006) calibration. The two masses are comparable within a factor of ∼ 3 at all redshifts, but a large scatter is present, mostly due to the different FWHM Hβ estimates that enter quadratically in Eqs. 2 and 3. This indicates how much the single epoch virial estimates are affected by the inclusion (or not) of a host galaxy component and by the decision on the number of Gaussian profiles used to fit the BELs. As a second-order correction, on average, S11 estimates a higher mass compared to QSFit at low redshift, as highlighted by the asymmetric distribution of the sources in Fig. 3. To investigate how a correct decomposition of the observed continuum affects the virial mass estimates, we consider a "mixed" virial supermassive black hole mass estimate M mix , calculated using S11 FWHM and our AGN continuum luminosity. The comparison between M S11 and M mix is also shown in Fig. 3 using density contours. Using the same value for the FWHM Hβ drastically reduces the scattering, while the redshift dependence of the host galaxy contamination is emphasized: At lower redshifts, where the host galaxy contribution is likely more relevant, the S11 result overestimates the virial mass calculated in this work. At high redshifts, instead, the two mass estimates are comparable; quasars are likely brighter and the host galaxy contribution is much more diluted in the continuum emission.

Conclusions
We present the results of an automated spectral analysis of a subsample of the SDSS DR10 quasar catalog. Our analysis, performed using the public code QSFit, fits the SDSS spectra including a host galaxy template together with the AGN components (power-law continuum, broad and narrow emission lines, and a Balmer). We used the broad FWHM Hβ and the monochromatic luminosity at 5100 Å to estimate the MBH masses responsible for the nuclear emission.
We demonstrated that the inclusion of the Balmer does not significantly affect the Hβ mass estimates in our sample, while the inclusion of a host galaxy component can significantly change both the BEL shape and the 5100 Å AGN monochromatic luminosity. In order to quantify such an effect, we com-   3. Ratio of virial masses of S11 and this work as a function of redshift. The color-coded two-dimensional histogram refers to ratios in which the MBH virial masses M B QSFit have been obtained directly from the QSFit results from Eq. 2 (left panel) and Eq. 3 (right panel). The redshift is binned with a step of 0.01, while the S11-QSFit mass ratio is binned with a bin step of 0.05. The locus of the ratios obtained using M mix as denominator is mapped with the density contours, which are drawn at 10%, 25%, 50%, 68% and 95% of the distribution; with M mix being the MBH mass calculated using S11 FWHM and our AGN continuum luminosity. For each calibration the blue dashed line shows the equivalence between our mass estimate and M S11 . pared our estimates with those presented by S11. We find a general agreement with S11, with the MBH mass estimates being consistent within a factor of three. The main cause of the observed scattering is due to the quadratic dependence of M on the FWHM Hβ , the latter being dependent on the continuum as-sumed and on the number of Gaussian profiles allowed in the fit. Considering the intrinsic uncertainties associated with the single epoch estimators, which are of the order of ∼ 4, our estimates are consistent with those of S11.
Once the effect of the different FWHM of the broad Hβ is removed (using the same values measured by S11), the effect of including a host galaxy template becomes evident. Depending on the calibrations used, S11 either overestimates M by about a factor of 2, or, when the calibration from Vestergaard & Peterson (2006) is assumed (Eq. 3), a significantly better agreement is reached, with the masses becoming compatible within a factor of 1.5. In this last case, at low redshift, where the host galaxy significantly contributes to the continuum luminosity, our mass estimates are still slightly lower than those of S11. At higher redshift (z 0.6), the estimates instead converge within 0.15 dex, the AGN overwhelming any contribution from the host galaxy.