Gas-phase Metallicity of Local Active Galactic Nuclei in the GASP and MaNGA Surveys: The Role of Ram Pressure Stripping

Growing evidence in support of a connection between active galactic nuclei (AGN) activity and the ram pressure stripping (RPS) phenomenon has been found both observationally and theoretically in the past decades. In this work, we further explore the impact of RPS on the AGN activity by estimating the gas-phase metallicity of nuclear regions and the mass–metallicity relation of galaxies at z ≤ 0.07 and with stellar masses logM*/M⊙≥9.0 , either experiencing RPS or not. To measure oxygen abundances, we exploit Integral Field Spectroscopy data from the GASP and MaNGA surveys, photoionization models generated with the code Cloudy and the code Nebulabayes to compare models and observations. In particular, we build Cloudy models to reproduce line ratios induced by photoionization from stars, AGN, or a contribution of both. We find that the distributions of metallicity and [O iii] λ5007 luminosity of galaxies undergoing RPS are similar to the ones of undisturbed galaxies. Independently of the RPS, we do not find a correlation between stellar mass and AGN metallicity in the mass range logM*/M⊙≥10.4 , while for the star-forming galaxies we observe the well-known mass–metallicity relation between 9.0≤logM*/M⊙≤10.8 with a scatter mainly driven by the star formation rate and a plateau around logM*/M⊙∼10.5 . The gas-phase metallicity in the nuclei of AGN hosts is enhanced with respect to those of star-forming galaxies by a factor of ∼ 0.05 dex regardless of the RPS.


Introduction
The chemical evolution of a galaxy is regulated by a plethora of processes, from stellar winds and supernovae explosions within the galaxy body (e.g., Larson 1974;Larson & Dinerstein 1975;Maiolino & Mannucci 2019, for a review) to the exchange of material with its environment (e.g., Ellison et al. 2009;Peng & Maiolino 2014).The global gas-phase metallicity is well-known to be strongly correlated with the assembled stellar mass of a galaxy (e.g., Lequeux et al. 1979) through the so-called mass-metallicity relation (MZR), which has been shown to hold from low z (e.g., Tremonti et al. 2004;Pérez-Montero et al. 2013) to high z (up to z ∼ 6.5 based on recent JWST measurements, Curti et al. 2023aCurti et al. , 2023b;;Shapley et al. 2023).At a given stellar mass, Mannucci et al. (2010) found for the first time an anticorrelation between the star formation rate (SFR) and the metallicity, which is the so-called fundamental MZR (FMZR), while Peng & Maiolino (2014) find that satellite galaxies in denser environments, in terms of local density, are more metal-rich than galaxies in lowerdensity environments.
In addition to stellar evolution and environmental effects, the presence of a central active galactic nucleus (AGN) can also potentially have an impact on the galaxy metallicity (e.g., Groves et al. 2006), and a relation between the narrow-line region (NLR) metallicity and the (host galaxy) stellar mass has been investigated to test this hypothesis (e.g., Coil et al. 2015;Thomas et al. 2019;Dors et al. 2020a;Pérez-Díaz et al. 2021;Armah et al. 2023).While some studies do not find a correlation between these two quantities (Dors et al. 2020b;Pérez-Díaz et al. 2021), others do find a relation both in the local universe (e.g., Thomas et al. 2019;Armah et al. 2023) and at higher redshifts (e.g., Matsuoka et al. 2018, at z ∼ 3).
The effect of the AGN on the metal content of the galaxy's central regions is also highly debated: regardless of the stellar mass of the host galaxy, some works find that the AGN leads to an enrichment of metals, with AGN host galaxies showing higher central metallicity than that of star-forming (SF) galaxies of similar mass (e.g., Coil et al. 2015;Thomas et al. 2019;Pérez-Díaz et al. 2021), while other works measure lower metallicity in AGN than in SF regions (e.g., Do Nascimento et al. 2022; Armah et al. 2023).
The origin of the metal enrichment may be explained by dust destruction in the broad line region (BLR), which releases metals into the interstellar medium (ISM; Maiolino & Mannucci 2019) or in-situ top-heavy initial mass function (IMF) star formation in the accretion disk around the supermassive black hole (e.g., Nayakshin & Sunyaev 2005;Wang et al. 2011).In the latter scenario, the AGN would foster rapid star formation and quick enrichment of the ISM, which in fact has commonly been observed to be very metal-rich (Maiolino & Mannucci 2019).AGN-driven outflows of high metallicity gas, observed to be expelled on kiloparsec scales from the BLR (e.g., D' Odorico et al. 2004;Arav et al. 2007), would then enrich also the NLR.Another contribution to the metal enrichment of the gas surrounding the BLR may also come from in-situ star formation inside the AGN-driven outflows, Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence.Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
On the other side, a possible way to explain the low AGN metallicities measured by some other works is that AGN-driven winds halt the production of metals by quenching star formation in the circumnuclear regions around the galaxy center (Choi et al. 2022).In support of this hypothesis, Armah et al. (2023) find that the AGN X-ray luminosity-NLR metallicity relation anticorrelates with the Eddington ratio, which indicates that the low-luminous AGN (and therefore likely with the weakest feedback) are more actively undergoing ISM enrichment through star formation, as opposed to the most luminous X-ray AGN.Similarly, EAGLE simulations predict that the scatter from the MZR at M * > 10 10.4 M e depends on the mass of the central black hole, and in particular that black hole mass and gas-phase metallicity are anticorrelated (Van Loon et al. 2021).AGN feedback can also play a role by removing both gas and metals from the nucleus of the galaxy and dispersing this material to larger radii (Choi et al. 2022).
In this context, a dedicated study of the gas-phase metallicity in the nuclear regions of galaxies hosting an AGN (AGN metallicity hereafter) and its scaling relation with the host galaxy stellar mass in different environments is still missing.A possible link between the AGN metallicity and the environment may have roots in the fact that environmental processes such as the ram pressure stripping (RPS) phenomenon have been proven to quench rapidly star formation in galaxies falling into clusters (Boselli & Gavazzi 2006), and that AGN feedback may aid in the quenching of star formation together with ram pressure (Ricarte et al. 2020).The ROMULUS C cosmological simulations of a high-resolution galaxy cluster by Ricarte et al. (2020) find that RPS triggers enhanced gas accretion onto the black hole, which then produces heating and outflows due to AGN feedback.Growing evidence has been found, both observationally (Poggianti et al. 2017a;Peluso et al. 2022, hereafter P22) and theoretically (Tonnesen et al. 2009;Akerman et al. 2023), in support of the hypothesis that RPS is able to trigger or enhance the AGN activity in cluster galaxies.Recent studies have clearly identified AGN-driven outflows (Radovich et al. 2019) and AGN feedback in action (George et al. 2019) in strongly stripped galaxies.
Another debated topic regards the choice of the more suitable method to derive the NLR metallicity (e.g., Dors et al. 2015).
Similarly to what is typically adopted for the H II regions, the direct T e -method (e.g., Dors et al. 2020a), the strong emissionline (SEL) calibrators (e.g., Storchi-Bergmann et al. 1998, hereafter SB98;Carvalho et al. 2020, hereafter C20), and photoionization models (e.g., Thomas et al. 2018aThomas et al. , 2018b;;Pérez-Díaz et al. 2021) have been exploited in the literature to measure the NLR metallicity.However, although AGN have high ionization degree, their high (e.g., Groves et al. 2006) metallicity leads to faint auroral lines (such as the [O III] λ4363), hampering the use of the T e -method.
Many SEL calibrations for the NLR have been computed in the last decades in the literature, derived either with photoionization models (e.g., SB98; C20) or with the direct method (Flury & Moran 2020;Dors 2021).However, calibrators obtained from the same set of measurements (either direct or indirect) in the case of ionization from star formation and AGN are still not available in the literature.
Some works (e.g., Thomas et al. 2019;Pérez-Díaz et al. 2021) have developed consistent AGN and stellar photoionization models and used them to determine the metallicity in both SF and AGN-ionized regions.Observed and predicted line ratios are compared making use of the Bayesian inference with codes such as NEBULABAYES (Thomas et al. 2018a) or H II-CHI-MISTRY (HCM; Pérez-Montero 2014;Pérez-Montero et al. 2019).
In this paper, we adopt an approach similar to Thomas et al. (2018a) to compute for the first time the gas-phase metallicity of the central regions of a sample of active galaxies affected by RPS.The aim is to look for signs of metal enrichment or decrement in the NLR, with respect to the case of ionization from star formation.To do so, we draw galaxies from the gas stripping phenomena (GASP; Poggianti et al. 2017b) in galaxies survey and from the Mapping Nearby Galaxies at Apache Point Observatory (MaNGA; Bundy et al. 2015) survey.GASP is an ESO large program carried out with the spectrograph MUSE to study galaxies in the local universe affected by RP in clusters.The use of Integral Field Spectroscopy (IFS) allows us to derive the global metallicity by exploiting different extraction apertures and to spatially separate regions photoionized by stars or by the AGN.
The paper is divided into the following sections.Section 2 presents the data sample, and Section 3 presents the photoionization models that are used to compute the metallicity using the SEL method by comparing observed and predicted line ratios with the code NEBULABAYES, as described in details in Section 4. Our results are presented in Section 5: we investigate the effect of the aperture on our AGN metallicity measurements, and study how AGN metallicity correlates with different galaxy properties (stellar mass, AGN luminosity) using both RP-stripped galaxies and a control sample of field galaxies that are not disturbed by the environment.In Section 6, we sum up and discuss the results.

Datasets and Galaxy Samples
The goal of this Section is to build four different samples to study the gas-phase metallicity of galaxies in different physical conditions, exploiting ancillary data from the GASP and MaNGA surveys.To do so, we use the samples already presented in P22 and Vulcani et al. (2018).In particular, we build an RPS sample of galaxies either hosting an AGN (AGN-RPS) or not (SF-RPS) and a control sample of galaxies located in the field (AGN-field sample, hereafter AGN-FS, and SF-field sample, hereafter SF-FS), thus undisturbed by the RPS.All the galaxies are late-type and have ongoing star formation in the galactic disk.To classify the ionization mechanism acting on the gas, we make use of the so-called BPT diagnostics (Baldwin et al. 1981;Veilleux & Osterbrock 1987;Kewley et al. 2001;Kauffmann et al. 2003;Kewley et al. 2006).Specifically, we use the BPT diagram involving the line ratios [N II]λ6584/Hα over [O III]λ5007/Hβ (e.g., [N II]-BPT). 4In this case, the Kewley et al. (2001) relation based on photoionization models is used to delimit the region where Seyfert/LINER spaxels are located, and the empirical Kauffmann et al. (2003) relation is used to isolate SF spaxels.The region in between the two demarcation lines is populated by spaxels with line ratios usually classified as composite (SF +AGN).We finally use the Sharp et al. (2010) relation to further distinguish Seyfert from LINER line ratios.

GASP Sample
The GASP survey is a program focused on the study of gas removal processes due to the interaction between the intracluster medium and the ISM.The survey observed 114 galaxies at 0.04 < z < 0.07 located in clusters, groups, and the field, with the integral-field spectrograph MUSE, mounted at the Very Large Telescope, which has a field of view of ¢ ´¢ 1 1 and covers a spectral range from 4800 to 9300 Å (rest frame) with a median resolution FWHM ∼2.6 Å. GASP observations were taken in wide-field mode (WFM) with natural seeing (WFM-noAO) with an average seeing of ∼1″.More details on the sample selection and data analysis can be found in Poggianti et al. (2017b).
Stellar masses range from 10 9 to 3.2 × 10 11 M e and have been computed with the code SINOPSIS (Fritz et al. 2017) assuming a Chabrier et al. (2003) IMF.In brief, the code SINOPSIS uses a stellar population synthesis technique that reproduces the observed optical spectra of galaxies performing a spectral fitting of the stellar content and extinction, to derive the spatially resolved properties of the stellar populations.As in Vulcani et al. (2018), stellar masses are obtained by summing the stellar mass computed with SINOPSIS inside each spaxel within the galaxy.The emission lines are fitted with the code KUBEVIZ (Fossati et al. 2016), from the continuum subtracted and extinction-corrected MUSE spectrum, as described in Poggianti et al. (2017b).
Integrated galaxy global properties such as inclination, position angle, and effective radius (R e ) are measured from Iband MUSE photometry, as described in detail in Franchetto et al. (2020).In particular, the effective radius R e was computed from the luminosity growth curve L(R) of the galaxies, obtained by trapezoidal integration of their surface brightness profiles.
For our analysis, we select the MUSE spaxels in which the following emission lines have signal-to-noise ratio (S/N) > 3: Hβ, [O III] λ5007, Hα, [N II] λ6584, [S II] λ6716, and [S II] λ6731.We exclude the [O I] λ6300 emission line because the flux is often faint (i.e., S/N < 3 in most of the spaxels of the galaxies), and the photoionization models struggle to predict the emission of this line in agreement with the observations (see, e.g., Dopita 1997;Dopita et al. 2013;Law et al. 2021).Another reason to exclude the [O I] line is given by the [O I] excess (Poggianti et al. 2019), typically observed in regions located in the tails of RP-stripped galaxies.Although the mechanism driving the [O I] excess is not yet fully understood, it should mainly affect the outer regions of the emitting clouds, where [O I] is formed.
From the GASP-RPS sample in P22, we select the 11 RPstripped galaxies with Seyfert or LINER-like nuclei (AGN-RPS) according to the spatially resolved BPT diagnostics and 39 SF RP-stripped galaxies without AGN activity (SF-RPS).We excluded four SF galaxies (JO95, JO156, JO153, and JO149) from the RPS sample in P22 as their irregular I-band morphology prevented a good estimate of their structural parameters (Franchetto et al. 2020), which were necessary to extrapolate the nuclear metallicities as described in details in Section 5.
Moreover, from the GASP control sample in Vulcani et al. (2018), we consider 15 galaxies located in the field and undisturbed by RP (i.e., SF-FS).We exclude only one galaxy (P19482) from the original sample in Vulcani et al. (2018), which was found to be located in a filament in a subsequent work (Vulcani et al. 2021).

MaNGA Sample
Mapping Nearby Galaxies at Apache Point Observatory (MaNGA; Bundy et al. 2015) is an integral-field spectroscopic survey using the BOSS Spectrograph (Smee et al. 2013) mounted at the 2.5 m Sloan Digital Sky Survey (SDSS) telescope (Gunn et al. 2006), covering a spectral range from 3600 to 10300 Å at R ∼ 2000.Briefly (we refer the reader to P22 for more details), we exploit the MaNGA Data Release 15 (DR15; Bundy et al. 2015), and in particular, we use the Pipe3D-v2_4_35 (Sánchez et al. 2016a(Sánchez et al. , 2016b(Sánchez et al. , 2018) catalog to select SF (i.e., with specific star formation rate, sSFR, >10 −11 yr −1 ) galaxies and the visual morphological classification from the MaNGA Value Added Catalogs6 (Hernández-Toledo et al. 2010) to select late-type galaxies with 0 < TType < 12.To ensure that galaxies are not affected by RPS, we consider only galaxies located in halo masses lower than , according to the Tempel et al. (2014) environmental catalog, that will be referred to as filed galaxies.In this way, we obtain the MaNGA control sample of 782 galaxies presented in P22 with similar properties (such as morphology and sSFR) to the GASP-RPS sample but most likely undisturbed by environmental processes.
The P22 sample covers a redshift range 0.0024 < z < 0.1439, within which the MaNGA spatial resolution corresponds to a physical size that goes from 0.13 to 6.31 kpc.In fact, the integral-field unit (IFU) fiber size is 2″, and the reconstructed point-spread function (PSF) inside the IFU has an FWHM of 2 5, which corresponds to the spatial resolution of the observations (Law et al. 2016).
To have approximately a similar spatial resolution in MaNGA and GASP (i.e., ∼ 1 kpc), we select the 530 MaNGA galaxies with redshift z 0.04.In this way, 30% of the galaxies are at z ∼ 0.025, where the spatial resolution corresponds to ∼1 kpc, reaching at most 1.98 kpc of resolution (z = 0.04), which is still within a factor of 2 with respect to the resolution of GASP.
Among the 530 galaxies, we include in our sample only those (444/530) belonging to the Primary+Color-Enhanced sample (Bundy et al. 2015), in order to have a smooth distribution in redshift, while ensuring complete coverage of the i-band magnitudes.The Primary+Color-Enhanced sample covers uniformly the galaxy up to 1.5 times the effective radius (1.5 R e ), which perfectly suits our purposes, as we aim at characterizing the galaxy's central regions.
Finally, our sample is further reduced to the 429 galaxies for which we were able to extract the aperture-corrected stellar mass from the Principal Component Analysis catalog (Pace et al. 2019a(Pace et al. , 2019b)).In particular, the aperture correction needed to take into account the galaxy mass residing in the region extending outwards with respect to the 1.5 R e aperture is recovered with the color-mass-to-light relations method, which employs relations (as the one in Pace et al. 2019a) between the mass-to-light ratio and the photometric colors of the galaxy's light outside the MaNGA IFU.
The final sample spans the stellar mass range 9.0 ( ) 3. Among the 429 galaxies, 52 are Seyfert/LINER (i.e., AGN-FS) according to the spatially resolved BPT classification with the [N II]/Hα versus [O III]/ Hβ diagnostic (NII-BPT; Baldwin et al. 1981).377 galaxies are instead classified as SF and were added to the SF-FS.As galaxies part of the SF-FS are observed either by the GASP or MaNGA surveys, we are able to check the consistency of our estimates of metallicity or stellar masses ensuring that our measurements are not affected by systematic effects (e.g., different data reduction and instruments) caused by the use of two surveys.
We use the online tool MARVIN 7 (Cherinka et al. 2019) to download both the deprojected coordinates of our targets (spx_ellcoo) and the emission line fluxes (gflux).The deprojected coordinates are computed using the ellipticity (ò = 1-b/a) and position angle (θ) measured from the r-band surface brightness.The same emission line fluxes listed in Section 2.1 are drawn from the drpall-v2_4_3 and have S/N > 1.5, which is the value typically adopted in MaNGA (Belfiore et al. 2019).The emission lines are fitted with a Gaussian function and are corrected for stellar absorption, since the Data Analysis Pipeline (Belfiore et al. 2019;Westfall et al. 2019) simultaneously fits the continuum and emission lines with the latest version of the pPXF software package (Cappellari 2017).All lines are also corrected for Galactic extinction, using the Schlegel et al.  (1994).Following the same approach used in GASP, we correct the emission lines for host galaxy dust attenuation using the Cardelli et al. (1989) law and assuming an intrinsic Balmer decrement I(Hα)/I(Hβ) = 2.86, appropriate for an electron density n e = 100 cm −3 , and electron temperature T e = 10 4 K (Osterbrock & Ferland 2006).

Photoionization Models
The models are generated with CLOUDY v17.02 (Ferland et al. 2017) in the case of ionization from stars (H II models hereafter) and AGN (AGN models hereafter), so that the metallicity is measured in a homogeneous way from the central AGN region to the star formation-dominated outskirts of galaxies with AGN activity.To compute the metallicity in composite (AGN+SF) regions, we mix the H II and AGN models as described in detail in Section 4.
The files used as input by CLOUDY are built using the CLOUDYFSPS library (Byler 2018), modified to handle both H II and AGN models.All models span the following parameter space: 1 with a step of 0.5 dex. 2. Gas-phase abundances are those in CLOUDYFSPS   Dopita et al. (2000) to take into account the effects of nonprimary nucleosynthesis.The effects of abundance depletion by grains is also taken into account in CLOUDYFSPS, following Dopita et al. (2000).
We run our grids of CLOUDY models, iterating until the temperature is above 100 K or until convergence: since in the outer regions the ionization rate may fall below the galactic background rate, cosmic ray background emission (Ferland 1984) was added as a secondary ionization source.We explored the effect of dust on the line ratios studied here by comparing models with and without dust grains.To this end, we assumed for the grains the default size distribution and abundances in the diffuse ISM of our galaxy (van Hoof et al. 2001;Van Hoof et al. 2004;Ferland et al. 2013), described by the GRAINS ISM command in CLOUDY.Consistently with Byler et al. (2017), we find that its effect is minimal, with dusty models producing slightly higher [O III] /Hβ (i.e., ∼0.19 dex, on average) at fixed [N II] /Hα for high metallicities and ionization parameters.
We also explored the effect of varying the dust-to-metal abundance, without observing any significant effect.
Finally, we select models with a gas density of n H = 10 2 cm −3 since they fully recover the observed line ratios in our GASP and MaNGA samples, as shown in Figure 1.In particular, in Figure 1, we show the line ratios [O III] /[S II] and [N II] /[S II] of the SF (top left), composite (top right), and AGN (bottom) models and the observed line ratios inside the spaxels in MaNGA and GASP classified by the BPT correspondingly.The purple-shaded curves outline the density distribution of the observations, which is fully covered by the model grid.

H II Models
H II models are generated following the same prescription as in Byler et al. (2017).The Python library PYTHON-FSPS is used to generate the ionizing continuum produced by a single stellar population (SSP).To this end, we use the SSPs produced by the flexible stellar population synthesis (FSPS; Conroy et al. 2009) code and the MESA isochrones and stellar tracks (MIST; Choi et al. 2016;Dotter 2016).In CLOUDY, the stellar continuum models produced by FSPS are read by the TABLE STAR command, which also takes as input the stellar age and metallicity 8 to be used.For each CLOUDY model, the gas-phase metallicity equals to the stellar metallicity.
Unlike the Byler et al. (2017) models, we use the version CLOUDY v17.02 due to several improvements in the atomic database introduced with respect to CLOUDY v13 (Ferland et al. 2013), in particular concerning the rate coefficient for the S 2+ − S + dielectronic recombination (Badnell et al. 2015;Ferland et al. 2017;Belfiore et al. 2022). We

AGN Models
For AGN photoionization models, we adopt as ionizing source a simple power-law continuum (command where hν 1 = 9.12 × 10 −3 Ryd, and hν 2 = 3676 Ryd define the spectral breaks at 10μm and 50 keV respectively.The slope of the continuum, from the infrared to X-ray wavelength ranges, is set equal to α = −2.0,as in this way the models were able to perfectly reproduce the observations.According to the literature, the NLR density is relatively high (i.e., n e ≈ 300-500 cm −3 , SB98; Feltre et al. 2016;Armah et al. 2023) with respect to the H II regions in the galaxy disk (10 cm −3 , e.g., Dopita et al. 2013).However, we note that the regions classified as AGN by the BPT can extend well-beyond the subkiloparsec scale of the NLR (i.e., the so-called extended narrow line regions; see, e.g., Congiu et al. 2017;Chen et al. 2019); thus, we consider n H = 10 2 cm −3 as an average value between the high-density (i.e., 500 cm −3 ) and the low-density (i.e., 10 cm −3 ) regime.

Composite Models
We combine the H II and the AGN models following a similar approach as in Thomas et al. (2018b).The mixed emission is parameterized by f AGN , defined as follows: where R is the flux of the reference line (i.e., Hβ); thus, R AGN is the Hβ flux that arises from the AGN, and R HII is the the Hβ flux that arises from the HII regions.In other words, f AGN is the fraction of the Hβ flux from the AGN with respect to the total Hβ flux (i.e., R HII + R AGN ) of a mixed spectrum, where the emission comes from both stars and AGN.
We obtain the composite grids with the following steps: 1. we mix the H II and AGN models with the same metallicity and gas density; 2. the mixed emission line ratios are computed as where L is the flux of a generic line.
The f AGN is a parameter of the composite models, which ranges between 0.2 (i.e., 80% of ionization due to the stars) to 1 (i.e., 100% of ionizing photons coming from the AGN), with a step of 0.2.
In the composite models, ( ) U log indicates the ionization parameter of the AGN emission, while the ionization parameter of the stars U log HII is fixed to −3.0 (i.e., median value observed in pure SF regions), similarly to that in Thomas et al. (2018b).

Methods
In this section, we show how we set our NEBULABAYES (Thomas et al. 2018a) analysis and derive the gas-phase metallicity and the ionization parameter.In brief, the code takes as the input a set of emission lines from photoionization models and a set of observed emission lines with their relative errors.The line fluxes are then divided for a reference line, specified by the user.By comparing observations and predictions using the Bayes theorem, the code finds the best model to fit the observable.NEBULABAYES is provided with models, generated with the code MAPPINGS 5.1 (Sutherland & Dopita 2017), for both the H II and AGN-ionized regions.However, in Appendix A, we discuss in detail the reason that lead us to generate and use our own CLOUDY models (presented in Section 3).
To obtain the metallicity and ionization parameter computed spaxel-by-spaxel, we use our SF, composite, and AGN models inside the spaxels within the galaxy classified by the BPT diagrams correspondingly and compare the predicted and observed emission lines Particular care is necessary when selecting the emission lines to use in a NEBULABAYES analysis (see Thomas et al. 2018a, for details).Among all the emission lines covered by our observational samples, we notice that some widely used combinations are particularly affected by the degeneracy between the ionization parameter and the metallicity (Dopita et al. 2013, and diagnostics therein).In particular, Figure 2 shows the [N II] /Hα versus [O III] /Hβ for our observational sample with overlaid our own photoionization models, showing that the models are correctly reproducing the observations.However, we also note the well-known folding in the [N II] -BPT and [S II] -BPT, which in our models happens around 12 + log (O/H) = 8.6.It follows that, by using the line ratios [O III] /Hα, [N II] /Hα, and [S II] /Hα to constrain the parameters, we obtain that NEBULABAYES does not converge to a solution for metallicities around 12 + log (O/H) = 8.59 (similarly to Mingozzi et al. 2020), as it is clear from the blue histogram in Figure 3, where we show the results for the MaNGA galaxies.Instead, the choice of using the line ratios [O III] /[S II] and [N II] /[S II] produces the smooth metallicity distribution shown in Figure 3 as a black histogram.We stress that in the latter case the Balmer lines (Hα, Hβ) are not used to constrain the parameter space, but only to estimate the extinction correction as described in detail in Section 2.
As already emphasized by previous studies that used a modeling technique similar to ours (Thomas et al. 2019;Mingozzi et al. 2020;Pérez-Díaz et al. 2021), we conclude that the degeneracy could have been broken with the fundamental addition of the [O III] λ4363 auroral line and/or a constrain on the ionization parameter through known relations (e.g., Díaz et al. 1991;Pérez-Montero 2014)  using the H II, AGN, and composite models described in Section 3.

Results and Discussion
We estimate the metallicity of the galaxyʼs central regions, from spatially resolved maps of the oxygen abundance, inside an aperture that scales with the galaxyʼs mass (or mass-scaled aperture), in order to address the following question: (i) Does a relation between the (host galaxy) stellar mass and metallicity of galaxies with AGN activity exist in RPS galaxies?
To draw the mass-scaled aperture, we compute the projected distances from the galaxy center, using its structural parameters such as the inclination and position angle, and select the spaxels within a projected distance of 0.5 R e .
In the case of AGN host galaxies, we compute the median value of all the 12 + log O/H inside the AGN, composite, and SF spaxels contained by the aperture, using the corresponding models (see Section 3).In the case of SF galaxies without AGN activity, we discard the emission classified as composite, which in general is present inside a low fraction of spaxels (i.e., ∼5% in the SF GASP sample and ∼13% in the SF MaNGA sample), since in this case we cannot assume that its origin is the mixed AGN+SF contribution implied to generate our composite models.Then, we compute the metallicities inside the SF spaxels using the H II models.
By using the same approach, we also estimate the median metallicity inside a fixed aperture of radius r ∼ 1 kpc (always dominated by AGN emission in the case of AGN hosts) to address another open question: (ii) Does the AGN in RPS galaxies show signs of metal enrichment or metal decrement with respect to the same physical region at the center of SF galaxies of similar masses?
To understand if the results depend on the RPS, we answer the same questions for the galaxies part of the control samples (SF-FS, AGN-FS), which are located in the field and are undisturbed by RP.The results in the field galaxies are interesting on their own as it is still highly debated in the literature whether an NLR metallicity-stellar mass relation exists (e.g., Thomas et al. 2019;Dors et al. 2020a;Pérez-Díaz et al. 2021) and if AGN are more or less metal-enriched than SF regions (e.g., Pérez- Díaz et al. 2021;Armah et al. 2023), since discrepant results have been found even without making a distinction based on the galaxy's environments, as discussed in the Introduction.

The Effect of Different Extraction Apertures on Spatially Resolved Metallicity Maps
To illustrate how the choice of the aperture affects the AGN metallicity, we selected two galaxies from the GASP and MANGA samples, shown in Figure 4: both galaxies host Seyfert2-like nuclei according to the BPT and have similar stellar masses.The top panel of Figure 4  = 10.79), which is experiencing strong RPS as discussed in Poggianti et al. (2017a).The other panels of the same figure show the galaxy maps colorcoded according to the NII-BPT classification, the metallicity, and ionization parameter.On the NII-BPT color-coded map, we overlay the yellow projected aperture extending up to 0.5 R e and the green on-sky aperture extending up to 1 kpc from the galaxy center.The 1 kpc aperture includes a higher or lower fraction of the galaxy's total light depending on the stellar mass, as opposed to the r ∼ 0.5 R e aperture.However, the 1 kpc aperture has the advantage to include predominantly AGN spaxels, while the 0.5R e aperture in some galaxies includes a nonnegligible fraction of SF and composite spaxels.In this sense, the 1 kpc aperture is a better-suited choice to reduce the dependence of the AGN metallicity estimates on processes that are not linked to the presence of the AGN, as shown at the end of Section 5.3.
To show the range of ionization parameter and metallicity spanned by the emission in the nuclear regions of our galaxy samples, in Appendix C, we show the [N II]-BPT diagrams obtained with the emission line ratios within the extraction apertures r < 0.5 R e and r < 1 kpc color-coded according to the corresponding values of ( ) U log and 12 + log (O/H), for all the GASP and MaNGA galaxies.
Finally, we briefly comment on the metallicity and ionization parameter maps of the two galaxies shown in Figures 4(c) and (d).Further details on the metallicity profiles of our AGN sample will be discussed in a separate paper.
The galaxy 8993-12705 shows a strong inward increase in metallicity, which rapidly increases from 12 + log (O/H) ∼ 8.8 in the outer SF regions to 12 + log (O/H) ∼ 9.2 in the galaxy center.The transition from lower to higher metallicities is cospatial with the increase of the AGN ionization parameter, which jumps from ( ) Ũ log −2.5 to ( ) Ũ log −1.3.SF regions show an average value of ( ) Ũ log −3.2 (see also Thomas et al. 2019).On the other side, the metallicity in JO201 peaks around 12 + log (O/H) ∼ 9.0 in the galaxy center in correspondence to the AGN, and we note that also the gas in the right lower side of the stripped tail shows similar values as well.We also observe two high-metallicity and high-ionization parameter elongated regions symmetrically oriented with respect to the galaxy center.The peak of the AGN ionization parameter ( ( ) ~- U log 1.6) and of the metallicity (12 + log (O/H) ∼ 9.0) is presumably tracing the actual position of the AGN, more precisely than the NII-BPT classification map in which the AGN-like region is extending well beyond the NLR.

Gas-phase Metallicity of the AGN in RP-stripped and Undisturbed Galaxies
Figure 5 shows the metallicity as a function of the host galaxy stellar mass of the AGN-RPS (squares) and AGN-FS (circles) samples.To compute the metallicities, we consider the median value of 12 + log (O/H) in all the spaxels within r ∼ 0.5 R e from the galaxy center as a representative value for each galaxy.We have verified that the mass-scaled aperture was always larger than the PSF (e.g., on-sky aperture with diameter d ∼ 2 5 in MaNGA, and d ∼ 1″ in GASP), and therefore includes a well-resolved galactic region.In support of the robustness of our results to a different choice of the extraction aperture, Figure 3 in Franchetto et al. (2020) clearly shows that the mean (or median) value inside 0.5 R e is consistent with the median values computed inside smaller apertures or at fixed galactocentric radii in our galaxies (see also Moustakas & Kennicutt 2006).
Next, we study the relationship between the stellar mass and the AGN metallicity in the AGN-RPS and AGN-FS samples, joined together.The Spearman correlation coefficient is R ∼ 0.27 with a p-value of 0.034; thus, the test is not able to conclude that the two quantities are correlated.We argue that this can partially depend on the fact that the galaxies span a very limited range in stellar mass, as AGN are known to be located only in the most massive systems (e.g., Sánchez et al. 2018;P22).We also do not see a clear relationship between the stellar mass and L[O III] from Figure 5, and accordingly to that, the Spearman test gives a correlation coefficient of R ∼ 0.25 with a p-value of 0.07.

Comparison between Metallicities of the Nuclear Regions in AGN and SF Galaxies
To test previous literature findings (Thomas et al. 2019;Armah et al. 2023), we investigate the difference between the metallicity in the nuclear regions of AGN and SF galaxies.
Even though the AGN-RPS and AGN-FS show the same MZ distributions (see Section 5.2), in the first part of this section, we still present the results separately for the two samples.
Figure 6 shows the MZR of the SF and AGN galaxies, with different symbols for RP-stripped (squares) and non-RPstripped (circles) galaxies.The metallicity is computed as the median of all the values of 12 + log (O/H) within r < 0.5 R e .The AGN galaxies are shown as gray symbols, while the SF galaxies are color-coded according to their SFR (H ) a Re 1.5 , which is the SFR within 1.5 R e computed with the Kennicutt (1998) relation, SFR (M e yr −1 ) = 4.6 ×10 −42 L Hα (erg s −1 ), using the reddening-corrected Hα-flux.This is the field of view of the MaNGA SF galaxies (see Section 2.2), while for the GASP SF galaxies we computed the SFR (H ) a R 1.5 e by excluding the spaxels beyond 1.5R e To fit the MZR of SF galaxies (SF MZR), shown in Figure 6 as the blue dotted line, we join the SF-RPS and SF-FS, and we exploit the SF-FS galaxies to obtain the fit also at high stellar masses where the AGN are located.In fact, the SF-RPS sample has only 3/37 galaxies with  > * M M log 10.5, since (as seen in P22) the GASP-RPS AGN fraction is 51% in the mass bin ( )  > * M M log 10, while the SF-FS has 33/391 galaxies (i.e., 9%) with ( )  > * M M log 10.8.It is worth noticing, though, that the SF-RPS show on average lower metallicities than those from the SF-FS, but the lowest metallicities of the SF-RPS are consistent with the scatter expected from the FMZR (Mannucci et al. 2010) as discussed in detail in Appendix D.
To fit the SF MZR, we use the parameterized function from Curti et al. (2020; see also Mingozzi et al. 2020): where Z 0 is the asymptotic value of metallicity at which the relation saturates, M 0 is the characteristic turnover mass above which the metallicity asymptotically approaches the upper metallicity limit (Z 0 ), and β quantifies how rapidly the curve approaches its saturation value.For M * < M 0 , the SF-MZR is a power law of index γ.We fix the turnover mass M 0 = 10 10.1 M e .
To obtain the best-fit parameters, we use the nonlinear least squares method, which minimizes the residuals, weighted for the uncertainty on the data points (σ y ).σ y is the lowest value between σ − and σ + , where σ − and σ + are the average values of the 16th and 84th percentiles of the metallicity probability density function among all the spaxels within 0.5R e .
We obtain the following best-fit parameters: Z 0 = 9.045 ± 0.001, γ = 0.754 ± 0.008, and β = 1.121 ± 0.064.The one standard deviation error on the parameter estimates is the squared variance (i.e., the diagonal) of the covariance matrix.We observe a plateau in the SF MZR at ( )  > * M M log 10.5 (similarly to Tremonti et al. 2004) where the metallicity is <12 + log (O/H)> R 0.5 e ∼ 9.0 independently of the stellar mass.Figure 7 shows the residuals of the AGN metallicities from the SF MZR, Δ (O/H) < r R 0.5 e , which is the difference between the metallicity of the AGN and the one computed with Equation (2).AGN hosts predominantly lie above the SF-MZR, suggesting that the presence of the AGN is enhancing the oxygen abundance in the galactic nuclei.As expected from the results presented in Section 5.3, this result is independent of the presence of RPS, since the AGN-RPS sample shows a similar enhancement in metallicity as the AGN-FS sample.Overall, we find that the median offset of the combined AGN sample (RPS and FS) from the SF MZR is Δ (O/H) < r R 0.5 e = 0.047 dex, which is consistent with previous findings (e.g., Thomas et al. 2019).
Interestingly, two galaxies (JO206 and JO171) from the AGN-RPS show a metallicity that is lower than that found in SF galaxies, which are the outliers in Figure 7.The AGN with the lowest metallicity, JO171, is a very peculiar object as it is a Hoag-like post-merger whose central metallicity is not directly linked with the total mass (Moretti et al. 2018).While for the galaxy JO206 the interpretation is less clear and would require further analysis, for example by exploring the possible presence Figure 6.Mass-metallicity relation of the SF (colored points) and AGN (gray points) galaxies, with different symbols for the RPS (squares) and non-RPS (circles) samples.Metallicity is computed as the median value in all the spaxels (AGN, SF and composite) within 0.5 R e .The blue dotted curve is the best fit for the SF galaxies.SF galaxies are color-coded according to their SFR within 1.5 R e , a proxy for the total SFR.Overall, AGN galaxies have higher metallicities than SF galaxies. of metal-poor inflows of gas (as recently seen in, e.g., Pérez-Díaz et al. 2023, in the IR regime) or a particularly strong AGN feedback (Armah et al. 2023).
To have an estimate of the AGN metallicity without a significant contribution from gas ionized by stars, we also computed the metallicities inside the fixed aperture of radius r ∼ 1 kpc from the galaxy center, which is always dominated by the emission from Seyfert/LINER-classified spaxels in the case of AGN hosts.
Figure 8 (left panel) shows the metallicities within 1 kpc for galaxies with ( )  > * M M log 10.4.We consider separately galaxies in stellar mass bins of 0.2 dex width (i.e., stripes of different colors), since we want to avoid the dependence of the metallicity estimates on the portion of the galaxy covered by the fixed aperture, which changes with the stellar mass.
We compute the median 12 + log (O/H) of AGN metallicities inside each mass bin (12+log O/H AGN,1 kpc , filled-colored circles) only when there are more than five AGN galaxies inside that bin.
Qualitatively, results do not change depending on the chosen aperture, and as for the mass-scaled aperture, the AGN galaxies show higher metallicities than SF galaxies.Figure 8 (right panel) shows Δ(O/H) 1 kpc , which is the difference between the metallicities of the AGN (12+log (O/H) AGN,1 kpc ) and SF (12 +log (O/H) SF,1 kpc ) galaxies with similar stellar masses, which basically quantifies how much the NLR is enriched in metals with respect to a region with the same physical extension but at the center of SF galaxies.The red dotted line remarks the level at which Δ(O/H) 1 kpc = 0.In Table 1, we list the central mass of the bin, (12+log O/H) SF,1 kpc , (12+log O/H) AGN,1 kpc and Δ(O/H) r<1 kpc in each mass bin.The errors on Δ(O/H) r<1 kpc are calculated considering the errors on (12+log O/H) AGN,1 kpc and (12+log O/H) SF,1 kpc .The offset Δ(O/H) r<1 kpc is positive in each bin of mass and ranges between 0.044 and 0.065 dex depending on the stellar mass, which is consistent within the errors with the offset of 0.06 dex measured by Thomas et al. (2019).The aperture used by Thomas et al. (2019) to integrate the metallicity is comparable in extension with the fixed aperture of 1 kpc at our targets' redshift, as discussed in detail in the following sections.

Comparison with the Literature
By using a similar approach to ours, Pérez- Díaz et al. (2021) find that AGN (both Seyferts and LINERs) galaxies do not follow an MZR and that Seyfert 2 have slightly higher chemical abundances than those from SF galaxies, in the mass range ( ) 12.However, they also find that LINER galaxies have lower abundances than those from SF galaxies.) in which there are more than 5 AGN galaxies; sample of 143 SF, LINER, and Seyfert galaxies observed with the Palomar Spectroscopic Survey.One of the main differences with our analysis is that Pérez-Díaz et al. (2021) consider galaxies independently from their environments.On the contrary, we consider here the effects of AGN in determining the metallicity of their host galaxy in the dense cluster environment, even if our sample is biased toward those showing optical signatures of RPS.The field sample of galaxies is, instead, complete.Being aware of that, we find a consistent offset between SF and AGN metallicities to that found in Thomas et al. (2019), which uses the code NEBULABAYES and SDSS data to compute the MZR in a sample of 7,669 Seyfert 2 galaxies and 231,429 SF galaxies.They also find that the active galaxies follow an MZR in the mass range    * M M 10.1 log 11.3 since the nuclear metallicity in Sy2s increases ∼0.1 dex over a stellar mass range of 1.3 dex.It is worth noticing, though, that the value 0.1 dex is of the same order as the errors on the metallicity estimates derived with NEBULABAYES (see, e.g., Table 1 of this paper).The offset of the oxygen abundance in Sy2s with respect to the MZR of the SF galaxies is ∼0.09 dex, but reduces to ∼0.06 dex when considering the contribution to the offset coming from the fact that the metallicity in the Seyfert 2 and SF samples was constrained using different emission lines.The scatter of 0.06 dex is consistent (within the error bars) with the scatter measured in this work using the r ∼ 1 kpc aperture (i.e., 2 kpc in diameter), which indeed ranges between 0.04 and 0.07 dex.Our fixed aperture has a diameter of ∼2 5 at our target's redshifts, which is fairly similar to the Sloan fiber's diameter of 3″ used by Thomas et al. (2019).
Nonetheless, other works find opposite results.Armah et al. (2023) find lower values of 12 + log (O/H) abundances (with a mean difference of 0.2-0.5 dex) in AGN hosts than in SF galaxies, using an unbiased sample of Seyfert nuclei in the local universe (z 0.31) from the BAT AGN Spectroscopic Survey (BASS; Oh et al. 2022), which select AGN from their hard X-ray band emission (14-195 keV).These authors compute the AGN metallicities using the C20, SB98 calibrators, based on photoionization models.By using a similar approach, Do Nascimento et al. (2022) study the metallicity profiles of a sample of 107 Seyfert galaxies using the spatially resolved data from the SDSS-IV MaNGA and the C20, SB98 calibrators.They compute the integrated AGN metallicity within the central 2 5 and compare it with the value extrapolated from the radial oxygen abundance profile of H II regions in the galaxy disk.The oxygen abundance in the H II regions is obtained with the calibrator from Pérez- Montero & Contini (2009).We find 9 AGN galaxies in common with the Do Nascimento et al. ( 2022) sample (which is indeed the number of Seyfert galaxies in our AGN-FS drawn from the MaNGA survey; see also Section 5.2).We measure the integrated metallicity inside an on-sky aperture of 2 5 centered on the galaxy, as in Do Nascimento et al. (2022), but using the metallicity maps obtained in this work.We find that the median difference between the 12 + log (O/H) measured in Do Nascimento et al. (2022), and ours is −0.4 dex when considering their estimates with the C20 calibrator, and −0.43 dex when considering their oxygen abundances computed with SB98.This is larger than the average difference between the NLR metallicity and the extrapolated value found by the authors, which ranges between 0.16 to 0.30 dex.By estimating the metallicities with the SB98, C20 calibrators inside all the AGN spaxels in our MaNGA and GASP samples, we find that the values of 12 + log(O/H) computed with our method and with these other calibrators are well-correlated with each other (i.e., r = 0.48 in the case of the 12 + log(O/H) SB98 , and r = 0.57 in the case of the 12 + log (O/H) C20 ).However, following the approach of Pérez- Díaz et al. (2021), we find an offset of 0.387 dex with RMSE=0.12dex between the 12 + log (O/H) C20 and 12 + log (O/H) Nebulabayes , while we find an offset of 0.391 dex with RMSE=0.11dex between the 12 + log (O/H) SB98 and 12 + log (O/H) Nebulabayes .Therefore, we conclude that the C20, SB98 calibrators give systematically lower values of metallicity than those from the method applied throughout this work, and this is the reason for the discrepancy between our findings and those in Do Nascimento et al. (2022).We stress that even higher offsets are found in the literature when comparing different methods: for example, the offset found by Pérez- Díaz et al. (2021) when comparing their method with the code NEBULABAYES (but coupled with the MAPPINGS models, instead of the CLOUDY models adopted by us) is 0.8 dex.Pérez- Díaz et al. (2021) attributed this offset to the different power-law slope adopted in the MAPPINGS and their models (α = −2.0,and α = −0.8respectively).However, in our case, α = −2.0produces a significantly lower offset.We therefore conclude that a detailed treatment of the possible effects that lead to these discrepancies involves a complex combination of the assumptions underlying each model, whose discussion is beyond the scope of this paper.

Summary
In this paper, we have investigated the effect of RPS on the AGN metallicity of 11 Seyfert/LINER galaxies, by comparing their mass-metallicity distribution with that of 52 Seyfert/ LINER galaxies undisturbed by RP.We also studied the impact of the presence of a central AGN on the metal content of galactic nuclei, both in the case of RPS and not, by exploring the difference between the metallicity at the center of AGN and SF galaxies.To do so, we exploit IFU data from the GASP and MaNGA surveys, and we measure their metallicities using the NEBULABAYES code and a set of AGN, composite, and H II photoionization models generated with the version of the code CLOUDY v17.02.
Our main findings are summarized as follows: 1. AGN galaxies either experiencing RPS or not generally have the same distribution in the mass-metallicity diagram and span the same range of L[O III] luminosity.This result suggests that the stripping is not impacting significantly the integrated metallicity and [O III] luminosity of the central AGN, at least when looking at a relatively large sample of galaxies.2. The AGN-RPS and AGN-FS galaxies do not seem to follow an MZR, as shown in Figure 5, within the short range of stellar masses they cover.3. Thanks to the use of IFU data, we were able to test our results by integrating the metallicities inside different extraction apertures.Independently from the extraction aperture and the RPS, AGN galaxies show on average enhanced metallicity with respect to SF galaxies at fixed stellar mass.The difference between the metallicity at the centers of AGN and SF galaxies reaches values up to 0.2 dex when using the aperture with r ∼ 0.5 R e , while the median difference between metallicities computed with the 1 kpc aperture ranges from 0.04 to 0.07 dex, depending on the host galaxy's stellar mass.
In summary, our results show that the presence of the AGN implies higher metallicities in the nuclei of galaxies but that the RPS is not playing a role in changing either the AGN metallicity or [O III] luminosity.
(1998) maps (Westfall et al. 2019) and the reddening law of O'Donnell & O'Donnell Dopita 1997), while models with t * 4 Myr generate line ratios (such as [O III]/Hβ and [N II]/Hα) too weak to reproduce the entire range of the observed MaNGA and GASP line ratios of our sample.

Figure 1 .
Figure 1.[O III] /[S II] vs. [N II] /[S II] line ratios in the case of ionization from SF (top left), AGN+SF (top right), and AGN (bottom).The gray points are the observed line ratios inside the spaxels of the MaNGA and GASP samples together.The distribution of the observed points is outlined by density curves filled with different shades of purple and shown by the gray histograms in the top and right insets.Darker colors indicate regions where the density of data is higher.The black solid lines are the CLOUDY models.The H II models have stellar ages t * = 4 Myr; composite models have the ionization parameter of the stars U log Hii fixed to −3.0, and f AGN is 0.2; AGN models have α = −2.0(see text for details).
[O III] and [N II] normalized for the reference line [S II].By using the plane [O III] /[S II] (sensitive to U log ) versus [N II] /[S II] (sensitive to Z log ), we are able to distinguish very well models with different values of ionization parameter and metallicity, as shown in Figure 1.In this figure, we plot the H II, AGN, and composite models on the plane [O III] /[S II] versus [N II] /[S II] demonstrating the ability of such lines to unfold the grids.The [O III] /[S II] ratio is sensitive to the variation in ( ) U log because of the different ionization potentials (IP) needed to create the O++ and S+ ions (35.12 and 10.36 eV, respectively).Instead, the ions emitting the [N II] and [S II] lines have similar IP, and thus, the ratio [N II] /[S II] has little dependence on ( ) U log .However, the [N II] /[S II] is a good indicator for Z as the growth of N/H scales with Z 2 (Hamann et al. 1993) while S/H is ∼Z (e.g., Dors et al. 2023).

Figure 2 .
Figure 2. H II models (black lines) in the NII-BPT (top panel) and in the SII-BPT diagram (bottom panel).The H II models, generated with CLOUDY, have n H = 100 cm −3 , and stellar ages t * = 4 Myr.Density curves, filled with different shades of purple, are drawn to show the distribution of the observed line ratios of the SF spaxels in the MaNGA and GASP samples together.Red lines are the Kauffmann et al. (2003), Kewley et al. (2001) relations defining the SF regions in the NII-BPT and in the SII-BPT respectively.The black line in the NII-BPT is the Kewley et al. (2001) relationship, which distinguishes composite and Seyfert/LINER.The H II grids fold, due to the degeneracy between the metallicity and the ionization parameter, around 12 + log (O/H) = 8.6-8.7.

Figure 3 .
Figure 3. Histograms of the 12 + log (O/H) values inside all the spaxels classified as SF by the NII-BPT, in the MaNGA sample.The black histogram shows a uniform distribution in metallicity, obtained when using the [O III] and [N II] lines, normalized for [S II].The blue histogram shows a strong bimodality, with a gap around 12 + log (O/H) ∼ 8.6, and is obtained when normalizing with Hβ the set of lines: Hβ, [N II], [O III], Hα, [S II].The bimodality is caused by the ( ) U log -Z log degeneracy of the models observed in the NII-BPT shown in Figure 2 (see Section 4).

.
are color-coded according to the integrated luminosity of the emission line [O III] λ5007 (i.e., L [O III] hereafter) inside the fixed aperture of r ∼ 1 kpc, which is a proxy of the bolometric luminosity of the central AGN (e.g.,Berton et al. 2015).We calculated L[O III] only for galaxies with at least 10 spaxels within r ∼ 1 kpc powered by the AGN according to the BPT diagram, with S/N >3 in GASP or S/N >1.5 in MaNGA for the lines listed in Section 2. This selection restricts our sample to 9/11 AGN in GASP and 48/52 AGN in MaNGA.AGN with no reliable L[O III] are shown as dashed white-colored symbols.The + 12 log(O/H) and stellar mass distributions of the AGN-RPS and AGN-FS are shown as gray and white histograms, respectively, in the subpanels.The two samples span the same range of L[O III] and 12 + log (O/H), where the minimum values are 2.5 × 10 38 L e and 8.77, respectively, and the maximum values are 1.2 × 10 42 L e and 9.22.A 2D Kolmogorov-Smirnov test could not exclude that the AGN-FS and AGN-RPS samples are drawn from the same parent distribution.This result suggests that the RPS is not playing a crucial role in shaping the metallicity within r < 0.5 R e and the [O III] luminosity of the AGN (r < 1 kpc) in AGN hosts.Galaxies of the AGN-RPS sample have slightly higher median L[O III] However, the values are consistent within the 16th and 84th percentiles of the L [O III] and 12 + log (O/H) distributions.The higher L [O III] luminosities of the AGN-RPS sample are presumably due to the preponderance of Seyfert-like nuclei in this sample.

Figure 4 .
Figure 4. NII-BPT diagram and maps of the galaxy 8993-12705 (part of the AGN-FS, on the left) and JO201 (part of the AGN-RPS, on the right).Top panel: NII-BPT diagram for all the spaxels in the galaxies, where in the case of JO201 we also include the spaxels of the stripped tail.SF spaxels are in red, composite spaxels are in orange, LINER spaxels are in light blue, and Seyfert spaxels are in green.Darker color shades indicate more intense line ratios, and vice versa.The black line is the Kauffmann et al. (2003) relation, and the dotted black line is the Kewley et al. (2001) relation.Middle panel: Galaxy map color-coded according to the NII-BPT classification on which we draw the r ∼ 1 kpc (bright green circle) and r ∼ 0.5R e (yellow circle) apertures.The r ∼ 1 kpc aperture is clearly dominated by AGN-only spaxels, while the r ∼ 0.5R e includes a small fraction of SF and/or composite spaxels.The typical PSF size is shown in the top left corner, with a gray circle.Bottom panels: Galaxy map color-coded to the values of 12 + log (O/H) and ( ) U log .The black contours, overlaid on the maps, divide regions classified as AGN, composite and SF by the NII-BPT.The oxygen abundance 12 + log (O/H) varies between 8.4 and 9.2; the ionization parameter ranges between −4.0 and −1.0.

Figure 5 .
Figure 5. MZR of the AGN-RPS (squares) and AGN-FS (circles) color-coded according to their L[O III].We show as dashed white symbols those AGN for which we could not estimate L[O III] (see text for details).The 12 + log (O/H) is computed within the mass-scaled aperture (r ∼ 0.5 R e ), and L[O III] is computed within the fixed aperture (r ∼ 1 kpc).The error bars are the average values of the 16th and 84th percentiles of the PDF among all the spaxels within 0.5R e .The white and gray histograms (in the top and left insets) show the mass and metallicity distributions of the AGN-FS and the AGN-RPS.The two samples have similar ranges of oxygen abundances and L[O III].

Figure 7 .
Figure 7. Residuals of the AGN-RPS (squares) and AGN-FS (circles) metallicity from the SF MZR, as a function of the galaxy stellar mass, color-coded according to L[O III] as in Figure 5.To compute the error bars on Δ (O/H), we consider the errors on the AGN metallicity and the errors on the SF MZR, computed as described in Section 5.3.The horizontal black solid line remarks the level of Δ(O/H) = 0. AGN hosts show Δ(O/H)>0 on average, except for 2/11 galaxies in the AGN-RPS sample that have lower metallicity than SF galaxies.

Figure 8 .
Figure 8. Left panel: Mass-metallicity relation of the AGN-RPS galaxies (edge-colored squares), AGN-FS galaxies (edge-colored circles), SF-RPS galaxies (edgeblack squares), and SF-FS galaxies (edge-black circles) with stellar masses ( )   * M M log 10.4,where the metallicities are the median values of 12 + log (O/H) within 1 kpc from the galaxy centers.The filled-colored circles are the median metallicity (12 + log (O/H) AGN,1 kpc ) of the AGN inside the mass bin (i.e., strips of different colors) with the errors given by the 16th/84th percentile of the distribution.The filled-colored stars are the median metallicities (12 + log (O/H) SF,1 kpc ) of the SF galaxies inside the mass bin.Right panel: Difference between (12 + log (O/H) AGN,1kpc ) and (12 + log (O/H) SF,1kpc ) as a function of stellar mass.Within the same physical region, galaxies hosting AGN are more enriched in metals than those without AGN activity.

Figure 11 .
Figure 11.[N II]-diagrams of the nuclear regions r < 0.5 R e (left panels) and r < 1 kpc (right panels) centered on the SF and AGN host galaxies in the MaNGA sample.The points are color-coded according to the metallicity in the bottom panels, and according to the ionization parameter in the top panels.The red line is the Kauffmann et al. (2003) relation, and the black line is the Kewley et al. (2001) relation.

Figure 10 .
Figure 10.[N II]-diagrams of the nuclear regions r < 0.5 R e (left panels) and r < 1 kpc (right panels) centered on the SF and AGN host galaxies in the GASP sample.The points are color-coded according to the metallicity in the bottom panels, and according to the ionization parameter in the top panels.The red line is the Kauffmann et al. (2003) relation, and the black line is the Kewley et al. (2001) relation.

TABLE POWER LAW
in CLOUDY): Appendix B).However, we remind the reader that in this work it was not possible to include the auroral line[O III] λ4363,because it is too faint for MaNGA and outside the MUSE spectral range for GASP targets, and other lines used in relations to constrain ( ) U log , such as the [O II] λ3727, [S III] λ9069, and [S III] λ9532 lines, that are outside the MUSE wavelength range at the target's redshift.

Table 1
Mass-binned Nuclear Metallicities Extracted from an Aperture of r < 1 kpc Centered on the Galaxy