The MUSE Hubble Ultra Deep Field Survey: XII. MgII emission and absorption in star-forming galaxies

The physical origin of the near-ultraviolet MgII emission remains an under-explored domain, contrary to more typical emission lines detected in the spectra of star-forming galaxies. We explore the nebular and physical properties for a sample of 381 galaxies between 0.70<z<2.34 drawn from the MUSE Hubble Ultra Deep Survey. The spectra of these galaxies show a wide variety of profiles of the MgII 2796,2803 resonant doublet, from absorption to emission. We present a study on the main drivers for the detection of MgII emission in galaxy spectra. By exploiting photoionization models we verified that the emission-line ratios observed in galaxies with MgII in emission are consistent with nebular emission from HII regions. From a simultaneous analysis of MUSE spectra and ancillary HST information via spectral energy distribution (SED) fitting, we find that galaxies with MgII in emission have lower stellar masses, smaller sizes, bluer spectral slopes and lower optical depth than those with absorption. This leads us to suggest that MgII emission is a potential tracer of physical conditions not merely related to those of the ionized gas. We show that these differences in MgII emission/absorption can be explained in terms of a higher dust and neutral gas content in the interstellar medium (ISM) of galaxies showing MgII in absorption, confirming the extreme sensitivity of MgII to the presence of the neutral ISM. We conclude with an analogy between the MgII doublet and the Ly-alpha line, due to their resonant nature. Further investigations with current and future facilities, including JWST, are promising as the detection of MgII emission and its potential connection with Ly-alpha could provide new insights on the ISM content in the early Universe.


Introduction
Interpreting the physical nature of the spectral features observed in galaxy spectra is a non trivial path to understand the physical processes at work within galaxies and, through that, the galaxy population evolution through cosmic time.While optical lines have been extensively studied, ultraviolet (UV) lines are recently under scrutiny (see Stark 2016 for an exhaustive review).The most explored ones are the Lyman-α λ1215.67 (hereafter Lyα) line, along with the [C iii]λ1907+C iii]λ1909 (hereafter C iii]) emission doublet, detected in the redshifted spectra of distant an extremely sensitive tracer of some specific physical conditions of the gaseous nebulae themselves (Gurzadyan 1997).
The first detection of Mg ii emission in a starbursting galaxy comes from the IUE (International Ultraviolet Explorer) spectrum of Tol1924-416 (Kinney et al. 1993).In the last decade, the redshifted Mg ii emission has been detected in several studies of galactic winds (Weiner et al. 2009;Rubin et al. 2010Rubin et al. , 2011;;Giavalisco et al. 2011;Martin et al. 2012;Erb et al. 2012;Kornei et al. 2013;Finley et al. 2017b) and in the spectra of gravitationally-lensed galaxies (Rigby et al. 2014;Karman et al. 2016;Bordoloi et al. 2016).This feature is often accompanied by blueshifted absorption, yielding a profile similar to a P-Cygni feature.Several explanations have been proposed for the origin of the Mg ii emission, including the presence of an active galactic nucleus, AGN (Weiner et al. 2009), and resonant scattering in expanding winds (Rubin et al. 2010;Erb et al. 2012).Erb et al. (2012) studied large-scale outflows in a sample of 96 star-forming galaxies at 1 z 2 with the Mg ii doublet ranging from emission to absorption.They found Mg ii emission to be more common both at lower stellar masses and in galaxies with bluer UV slopes.Kornei et al. (2013) detected Mg ii emission in ∼15% of a sample of 212 star-forming galaxies at z ∼ 1, selected from the DEEP2 survey (Newman et al. 2013).They found that these sources had higher specific star formation, lower dust attenuation and lower stellar masses compared to the whole sample.Guseva et al. (2013) detected the Mg ii doublet emission in 45 low-metallicity star-forming galaxies within 0.36 < z < 0.7 from a sample of 62 from the Sloan Digital Sky Survey, SDSS (York et al. 2000) and determined a Magnesium over Oxygen abundance ratio a factor ∼ 2 lower than the solar one.These studies showed that the detection of the Mg ii emission feature is not limited to rare peculiar sources, as thought after its first detections, but concerns a significant fraction of objects within different galaxy samples (e.g.Erb et al. 2012;Guseva et al. 2013).Indeed, Mg ii emission, either in pure emission or P-cygni profiles, has also been detected with the Multi-Unit Spectroscopic Explorer (MUSE Bacon et al. 2015) in 50 star-forming galaxies from a sample of 271 [O ii]λλ3726, 3729 emitters (Finley et al. 2017b).The different profiles observed in these galaxies contain valuable clues on the physical origin of Mg ii emission.Once AGN are excluded, Mg ii emission might originate from nebular emission in Hii regions, with subsequent resonant scattering in neutral (or low ionization) gas, and/or resonant scattering of continuum photons in outflowing gas.Which of these is the dominant physical process for a given Mg ii profile is still unclear.Rigby et al. (2014) examined the Mg ii P-Cygni profiles observed in the spectra of five gravitationally-lensed bright starforming galaxies (1.66 < z < 1.91), along with other spectral features, including Lyα.Given that Mg ii and Lyα are both resonantly scattered lines, their physics is analogous.Provided that the lines are produced by the same mechanism and observed through the same gas, one would expect their observed properties to be correlated.However, Rigby et al. (2014) found a lack of correlation between Mg ii (in P-cygni profile) and Lyα, suggesting reprocessed stellar continuum, as responsible for the bulk of Mg ii emission.Very recently, Henry et al. (2018) found a close relation between the Lyα and Mg ii profiles in a sample 10 Green Pea galaxies at z ∼ 0.2 − 0.3.They also found Mg ii emission to be associated to low, if not null, dust absorption.
No less important is the study of the asymmetric, blueshifted Mg ii absorption profile, commonly used to identify outflowing gas within galaxies up to z∼2 (e.g.Veilleux et al. 2005;Tremonti et al. 2007;Steidel et al. 2010;Harikane et al. 2014;Zhu et al. 2015;Finley et al. 2017a, in addition to those men-tioned above).Indeed, both models and observations support the importance of galactic winds in regulating the metal enrichment of the intergalactic medium and the chemical evolution of galaxies (e.g.Aguirre et al. 2001;Tremonti et al. 2004;Finlator & Davé 2008;Mannucci et al. 2009;Lilly et al. 2013).
MUSE enabled the detection of a large number of Mg ii emitters, along with absorbers and P-Cygni, for a relatively large redshift range (0.70 ≤ z ≤ 2.34).These spectra provide valuable clues on the excitation properties of these sources, thanks to the additional emission lines detected in their spectra, such as [O ii]λλ3726, 3729, [Ne iii]λ3869 (hereafter [O ii]and [Ne iii]) and C iii]λ1908.The additional availability of broad-band photometry from HST allows a multi-band coverage from UV to near-infrared continuum.
Here, we assemble 381 galaxies from the MUSE Hubble Ultra Deep Survey (Bacon et al. 2017) in the redshift range 0.70 ≤ z ≤ 2.34, covering the peak of the star formation rate density (SFRD, Madau & Dickinson 2014).Our aim is to further explore the variety of profiles shown by the Mg ii doublet (emission, P-Cygni, absorption) and to understand what is the main driver for this variety.The main goal is to investigate whether the galaxy properties differ in terms of metallicity, ionization parameter, stellar mass, star formation rate (SFR) and dust attenuation.We focus on the differences between galaxies showing Mg ii in emission and those with Mg ii in absorption, leaving a detailed study of the sources showing Mg ii P-Cygni profile to future works.We infer the physical properties of our galaxies by exploiting the synergy between MUSE and HST, through the combined use of newly developed photoionization models (Gutkin et al. 2016) and the Bayesian statistics fitting tool BEA-GLE (Chevallard & Charlot 2016).
The paper is structured as follows: Sect.2.2 describes the sample selection and classification, along with the observed properties from HST photometry and MUSE spectra.Sect. 3 investigates how the Mg ii emission features compare with predictions from photoionization models.The description of the spectral fitting technique and the main results from the analysis are described in Sect. 4 and are followed by discussions and conclusions in Sect. 5 and 6, respectively.Throughout the paper, we use the AB flux normalisation, we follow a convention where negative/positive equivalent widths (EW) correspond to emission/absorption and we adopt the cosmological parameters from Planck Collaboration et al. (2016), (Ω M , Ω λ , H 0 ) = (0.308, 0.692, 67.81).

MUSE Observations and Spectral Measurements
We assembled a sample of galaxies drawn from the MUSE Hubble Ultra Deep Field Survey (Bacon et al. 2017).This twolayered spectroscopic survey covers 90% of the total Hubble Ultra Deep Field (HUDF) and comprises a (3 × 3 ) mosaic of nine MUSE fields (hereafter mosaic) with an exposure time of 10hours, in addition to a deeper exposure of 31-hours in a single field (hereafter udf10) of 1.15 arcmin 2 .The 50% spectroscopic completeness in the HST/F775W wide-band is reached at 26.5 mag for udf10 and 25.5 mag for the mosaic (Inami et al. 2017).Redshifts and line flux measurements from the first Data Release (DR1) of the HUDF survey are described in Inami et al. (2017).The DR1 catalogue includes 1338 sources with a MUSE-based redshift confidence level above or equal to 2 (Sec 3.2 of Inami et al. 2017), of which 253 lie in the udf10 field.
The line intensities in the DR1 catalogue are computed on unweighted summed spectral extractions of the data cube (sections 3.1.3and 3.3 of Inami et al. 2017) using the PLATEFIT software (Brinchmann et al. 2004;Tremonti et al. 2004).PLATEFIT fits the continuum of the observed spectrum, where strong emission lines have been masked out, with a set of theoretical templates from Bruzual & Charlot (2003) computed using the MILES (Sánchez-Blázquez et al. 2006) stellar spectra.After the continuum subtraction, the procedure simultaneously fits a single Gaussian profile to each expected emission line.The line fluxes and EW used in Sec. 3, 4.3 and 5.4 have been computed with the same procedure as for the MUSE HUDF DR1 catalogue but using weighted optimal spectral extractions, namely whitelight weighted and PSF weighted, accordingly to the weighted spectra used to measure the systemic redshfit (identified with REF_SPEC in the HUDF DR1 catalogue).The advantages of using weighted extractions are an higher signal-to-noise ratio (S/N) and a reduced contamination from neighbouring sources.We have, however, checked that using unweighted summed spectral extractions does not change the conclusions of this analysis.
We note that the line fluxes and EW of Mg ii have been recomputed with a different PLATEFIT setup allowing for a potential velocity difference between the Mg ii resonant transition and the systemic redshift.This is necessary because, as described later in Sect.2.5, the DR1 catalogue assumes that all emission lines have the same intrinsic velocity shift relative to the systemic redshift (see section 3.3 of Inami et al. 2017, for details).However, since Mg ii is a resonant line, it might have a different velocity shift and width, leading us to underestimate its intensity.

Sample selection
From the combined catalogue of the udf10 and mosaic fields (excluding duplicates) we selected sources with a spectroscopic redshift 0.70 ≤ z ≤ 2.34, to ensure MUSE spectral coverage of the Mg ii λλ2796, 2803 doublet wavelengths.We additionally required the redshift to be measured with a confidence level CONFID > 1 (see section 3.2. of Inami et al. 2017), finding 403 sources satisfying the above requirements.As the process for the systemic redshift determination of the DR1 does not include the resonant Mg ii doublet, this cut secures at least one spectral feature in the MUSE spectra, regardless of the detection of an Mg ii spectral feature.
The above selection criteria include the mosaic source ID 872, which is an AGN showing a prominent and broad Mg ii emission feature (see also Inami et al. 2017) and has been excluded from the following analysis.In addition, as explained in Sect.3.3, we discarded 10 sources classified as AGN on the basis of their X-ray spectra from the 7 Ms Source Catalogs of the Chandra Deep Field-South Survey (Luo et al. 2017, see their section 4.5.for source classification).Moreover, we removed 11 sources that do not have HST broad-band photometry available (Sec.2.4), because of the ambiguity in associating the HST counterpart.The final parent sample has 381 galaxies, 63 in the udf10 and 318 in the mosaic-only fields.

Sample classification
The Mg ii doublet in our spectra shows a wide variety of profiles, ranging from clear emission, to blueshifted absorption with redshifted emission (P-Cygni-like profiles), to strong deep absorption, as illustrated in Fig. 1.We classified the sources in four spectral types, namely emitter, P-Cygni, absorber and non-detection, on the basis of both the intensity of the Mg ii profile and quality of the spectrum, as follows: -Mg ii emitters both components of the doublet showing emission EW Mg ii < −1; good S/N (> 3) from PLATEFIT in either both components of the Mg ii doublet or the strongest (see Sec. 3.2) Mg iiλ2796 component; -Mg ii P-Cygni profiles have been visually inspected; -Mg ii absorbers -EW Mg ii > +1; -MUSE spectrum with a S/N > 3, averaged in a window of 30 Å centred at 2800 Å; -Mg ii non-detection i.e. all the remaining sources in the Mg ii parent sample.
As summarised in Table 1, the Mg ii parent sample consists of 63/19/41/258 Mg ii emitters/P-Cygni/absorbers/nondetections, respectively.If the S/N criteria to detect Mg ii emitters were reduced to 2 we would have obtained 33 additional sources.In 12 of these 33 galaxies, the Mg ii line fall in spectral region redward 7500 Å where the flux uncertainties are larger because of the strong skyline contamination.Instead, relaxing the EW threshold to EW < −0.5 would have given us 3 additional sources with S/N > 3. We adopt a S /N > 3 and EW < −1.0 to avoid including possible contaminants in the sample.Note that, we further validated and refined this classification with a thorough visual inspection.The Mg ii parent sample has 261 galaxies in common with the sample of [O ii] emitters from Finley et al. (2017b), selected with the aim of studying non-resonant Fe ii*(λ2365, λ2396, λ2612, λ2626) transitions as potential tracer of galactic outflows.Finley et al. (2017b) have visually inspected the spectra of their galaxies and flagged the Mg ii profile of their sources in pure emission, P-Cygni and pure absorption.We verified that the classifications of the galaxies in common between the two samples are in good overall agreement.The classification of a galaxy as Mg ii P-Cygni depends on our ability to detect the blueshifted absorption and, hence, both on spectral noise and resolution.Our Mg ii P-Cygni have a spectrum with S/N > 3 in a window of 30 Å centred at 2800 Å and their faintest HST flux in the F606W passband filter is 25.5 mag (see also Fig. 2).More quantitative measurements on the amount of absorption and emission in Mg ii P-Cygni sources, and corresponding EW measurements, will be provided in Finley et al., in prep.17% of the galaxies in the Mg ii parent sample are classified as Mg ii emitters, similar to the ∼15% of Kornei et al. (2013).This fraction differs from ∼1/3 of Mg ii emitters detected in the sample of Erb et al. (2012) at z∼2 and from the ∼ 2/3 of the low redshift SDSS galaxy sample of Guseva et al. (2013).However, the different fractions of Mg ii emitters among the samples may be related to the different selection and classification criteria.The Erb et al. (2012) sample was photometrically preselected in the rest-UV, while the galaxies of Guseva et al. (2013) were selected to have low-metallicity Hii regions with strong emission lines.In our work, we do not apply any pre-selection but simply explore the Mg ii profiles in all the galaxies for which we had MUSE spectral coverage of the Mg ii λλ2796, 2803 wavelengths (upon selecting sources with good redshift measurement and minimizing the AGN contribution, see Sect.2.2).Moreover, a blueshifted absorption, tracer of stellar winds, accompanying the Mg ii redshifted emission, was detected in many spectra of The redshift distribution of the Mg ii parent sample (0.7 ≤ z ≤ 2.34) is shown in Fig. 2 (top panel).We found no particular redshift preference for the occurrence of Mg ii emitters and absorbers compared to the whole sample.The p-value of 0.3 from a two-sample Kolmogorov-Smirnov (KS) test supports a similar redshift distribution for the two spectral types of galaxies (Mg ii emitters and absorbers).The same is true for the sources with Mg ii P-Cygni profile.

Observational properties from HST photometry and imaging
HST broad-band photometry from UVUDF (11 HST/WFC3 and ACS photometric bands, Rafelski et al. 2015) is available for the whole parent sample and probes the Mg ii λλ2796, 2803 wavelengths with the F606W, F775W and F850LP passband filters for sources within the redshift intervals of 0.65 z 1.56, 1.43 z 2.0 and 1.86 z 2.34 , respectively.The observed luminosities of the Mg ii sample range from 22.08 (21.59, 20.73) to 29.87 (29.81, 30.16) mag in the F606W (F775W, F850LP) HST filters, respectively.Fig. 2 (right panel) shows the F606W passband filter distribution for the whole Mg ii parent sample.We note that 20% of the Mg ii non-detections are among the faintest (F606W flux 27 mag) galaxies in the sample, while all but one of the Mg ii emitters have F606W flux brighter than 27 mag.By inspecting the HST-band flux distributions, we found Mg ii absorbers to be, on average, more luminous than Mg ii emitters.One reason for this could be that the ability to detect absorption lines depends on the strength of the continuum.A discussion on how this could bias our results can be found in Sect. 4.3. van der Wel et al. (2012) performed Sérsic model fits to galaxy images selected from the CANDELS HST Multi-Cycle Treasury program with the GALFIT1 (Peng et al. 2010) algorithm in the available near-infrared filters (H-F160W, J-F125W and Y-F105W).We performed a positional cross-matching (within a 1 arcsec radius) between the Mg ii sample and the van der Wel et al. ( 2012) catalogue.We found that measurements of the global structural parameters were available for the majority (369/381) of our sample.We considered only GALFIT fits with good quality flag (good fit has quality flag equal to 0 as explained in section 4.3 of van der Wel et al. 2012).We made use of the measurements computed in the Y-band, as it covers the optical rest-frame wavelength regime for our sample and typically presents higher S/N.As already mentioned in Sect. 1 we focus our discussion on the properties of Mg ii emitters and absorbers.We found that the two types of sources do not strongly differ in terms of b/a axis ratio, Sérsic index and position angle, with p-values from a two sample KS test of 0.16, 0.65 and 0.73, respectively.In contrast we found Mg ii emitters to have smaller intrinsic sizes than Mg ii absorbers, with a median value of the half-light radius of 1.49 compared to 3.95 kpc of the absorbers and p-value, from a two sample KS, lower than 10 −4 suggesting that the two types of galaxies have different size distributions (see also Finley et al. 2017b).It is worth noting that this is not ascribable to a difference in mean redshift (1.26 and 1.24 for Mg ii absorbers and emitters, respectively).The difference in sizes suggests that there may be some physical properties that differ between the Mg ii absorbers and emitters.We will discuss this further in Sect. 4 and 5.

Emission lines detected in MUSE spectra
The emission lines detected in the MUSE spectra contain valuable information about the physical conditions of the excited gas.The Mg ii emitters show, on average, a well-centred (i.e.consistent with the systemic redshift) Mg ii doublet in emission that can, in principle, be associated with purely nebular emission.However, out of the Mg ii emitters, 9 sources show an emission doublet which is redshifted from the systemic redshift of more than 50 km/s (note that the accuracy in the velocity estimate is ≈40 km/s, section 4 of Inami et al. 2017).
As already mentioned in Sect.2.1, the line intensities in the DR1 catalogue have been computed by assuming the same velocity shift relative to the systemic redshift.We found this setup to underestimate the Mg ii line fluxes of Mg ii emitters on average by 12%.We recomputed these quantities for our Mg ii emitters by fitting the Mg ii line with PLATEFIT accounting for the potential velocity shift.These values have been recomputed only for the Mg ii emitters for comparison purposes with theoretical predictions from photoionization models (Sect.3).We do not study in this work the Mg ii P-Cygni profile which would require a more complex fit than the gaussian profile used in PLATEFIT.
In addition to the Mg ii feature, the galaxies in the our parent sample show, depending on their redshift, collisionally excited lines, such as [O ii], [Ne iii] and C iii], as well as some Balmer lines Hβ λ4861, Hγ λ4340 and Hδ λ4101 (hereafter Hβ, Hγ, Hδ).Table 2 summarizes the number of galaxies where these emission lines have been detected with a line S/N > 3, from PLATEFIT.
The most frequent other emission lines detected in the MUSE spectra of our sample are [Ne iii] and [O ii] at z ≤ 1.4 and 1.5, respectively, and [C iii]λ1907+C iii]λ1909 at higher redshifts (z 1.44).The lack of a significant number of Mg ii emitters and absorbers with both [O iii]λ5007 (hereafter [O iii]) and Hβ (< 10) prevents us from exploiting their ratio, which is sensitive to both the ionization parameter and the hardness of the ionizing spectrum, to study the excitation properties of our galaxies.We note that the observations of the UDF from the 3D-HST program (Brammer et al. 2012;Momcheva et al. 2016) probe [O iii]λ5007 for our z > 1.1 sources.We focus in this work on the exploitation of the MUSE spectral information and we leave the combination of MUSE-UDF and 3D-HST grism spectroscopy to future works.
The low fraction of sources with at least two Balmer lines in their spectra makes it difficult to use their ratios to compare dust attenuation in Mg ii emitters and absorbers.Indeed, Hβ and Hγ lines are detected with S/N > 3 in the same spectra only for 10 and 7 Mg ii emitters and absorbers, respectively.Moreover, out of the 26/24 Mg ii emitters/absorbers with both detections of Hγ and Hδ, 15/12 (i.e.∼ 50%) have a ratio Hγ/Hδ lower than the caseB hydrogen recombination values (i.e.1.82, for an electronic temperature and density of T = 10000 K and n e = 10 3 cm −3 , from Hummer & Storey 1987).This also prevents a reliable esti-  Notes.Number of galaxies with an emission line S/N > 3, from PLATEFIT.The last column report the total number of galaxies of the Mg ii parent sample with MUSE spectrum covering the rest-frame wavelength of the line.
mate of the dust-correction from these higher order Balmer lines.
The next section will therefore focus on a deeper exploration of the [O ii], [Ne iii] and C iii] spectral features observed in the spectra of our galaxies.

Nebular emission features in Mg ii emitters
In this section, we focus on exploring the main emission features measured from the MUSE spectra of the sources classified as Mg ii emitters to verify whether their emission is consistent with ionization by photons produced in H ii regions.We rely on predictions from photoionization models of star-forming galaxies, described in Sect.3.1.In the following subsections we then show how these calculations compare with the observed emission line ratios and, for completeness, inspect model predictions of ionizing sources of different origins, such as AGN and radiative shocks.

Photoionization models of star-forming galaxies
Gutkin et al. ( 2016) recently built a comprehensive set of synthetic models of stellar and nebular emission from a whole galaxy by combining the spectral evolution of typical, ionization-bounded, H ii regions with a star formation history.
To obtain the emission of different H ii regions, powered by newly-born star clusters, these calculations combine the latest version of the stellar population evolutionary synthesis models of Bruzual & Charlot (2003), Charlot & Bruzual, in prep., with the photoionization code CLOUDY c13.03 (Ferland et al. 2013), following the approach first outlined in Charlot & Longhetti (2001).The new update to the Bruzual & Charlot (2003) synthesis models incorporates new stellar evolutionary tracks from Bressan et al. (2012), including the evolution of massive Wolf-Rayet stars and new stellar spectral libraries (see section 2.1 of Gutkin et al. 2016 for more details on the stellar emission and Wofford et al. 2016 for a comparison with other spectral synthesis models).
The Gutkin et al. (2016) models relate the gas-phase metallicity measured from nebular emission lines to the total (both gas-and dust-phase) interstellar metallicity of the ionized medium through a self-consistent treatment of element abundances and depletion onto dust grains.The interstellar abundances and depletion factors are listed in Table 1 of Gutkin et al. (2016).The models are parametrized in terms of the following physical quantities (see also Table 3 of Gutkin et al. 2016 for a summary of the full-grid parametric sampling): the volume-averaged ionization parameter, log U , defined as the dimensionless ratio of the number density of H- ionizing photons to that of hydrogen, ranges between -3.65 and -0.65 in logarithmically spaced bins of 0.5 dex; the hydrogen gas density, n H = 10, 10 2 , 10 3 and 10 4 cm −3 ; the interstellar (i.e.gas+dust-phase) metallicity Z (assumed to be the same as the stellar component), ranges from 0.0001 to 0.04 (the total present-day solar metallicity adopted is Z = 0.01524); the dust-to-metal mass ratio, ξ d = 0.1, 0.3 and 0.5, sets the fraction of heavy elements depleted onto dust grains; the carbon-to-oxygen ratio, C/O, from 0.1 to 1.4 times the solar values (C/O) = 0.44; the upper mass cut-off, M up = 100 and 300 M , of the initial mass function (IMF), assumed to be a Galactic-disc IMF from Chabrier (2003).
We note that, following the definition in Eq.B.6 of Panuzzo et al. (2003), the volume-averaged ionization parameter is a factor of 9/4 larger than the ionization parameter U S listed in Table 3 of Gutkin et al. (2016, see footnote of Hirschmann et al. 2017).
In the next subsection we compare a sub-grid of these models with the spectral measurements of Mg ii emitters.These models have also recently been incorporated in the spectro-photometric fitting tool beagle (BayEsian Analysis of GaLaxy sEds), whose main features are summarized in Sect.4.1.

Comparison with observations in Mg ii emitters
The five panels of Fig. 3 show how predictions of the Gutkin et al. (2016)  ii] and C iii]/Mg iiλ2796.Note that, for our comparison, we considered here the blue component of the Mg ii doublet, Mg iiλ2796, as the red component Mg iiλ2803 is detected with S/N > 3 only on 31/63 Mg ii emitters.Indeed its theoretical value is, depending on the optical depth, one to two times the intensity of the red component, Mg iiλ2803 (Laor et al. 1997, e.g.).
The median ratio of the Mg ii emitters with both components of the doublet detected with S/N > 3 is 1.64.
The right and left panels of Fig. 3 show data measurements and model predictions, respectively.Data measurements comprise both our MUSE Mg ii emitters (black empty circles) and lower redshift 0.36 < z < 0.7 galaxies (gray empty diamonds) from the sample of Guseva et al. (2013), described in Sect. 1 and 2.3.As the line ratios of MUSE Mg ii emitters are not corrected for dust attenuation, the red arrows in each right panel show the effect of dust reddening for attenuation in the V-band of A V = 1 and 3 mag and a Calzetti et al. (2000) attenuation curve.
The models of Gutkin et al. (2016) are shown for dust-tometal mass ratio ξ d = 0.3 (average value of the Gutkin et al. 2016, model grid), hydrogen density n H = 10 2 cm −3 , solar C/O ratio, upper mass cut-off M up = 100M and for a variety of volume-averaged ionization parameters (x-axis of left panels) and metallicities Z (color-coded as labeled in the third panel).The gray dashed lines indicate the minimum and maximum value of the ratios observed in our Mg ii emitters.We found that the set of models predict line ratios similar to the observed ones.
We do not aim here at an in-depth comparison between the ratios measured for our sources and those at lower redshift, but we note that the observed [Ne iii]/[O ii] ratios of our Mg ii emitters are similar, within the measurements uncertainties, to those of lower redshift galaxies from Guseva et al. (2013).On the contrary, the mean [O iii]/Mg iiλ2796 and [Ne iii]/Mg iiλ2796 ratios appear to be larger for the MUSE Mg ii emitters.
At the same time, we also note that data measurements, including those from Guseva et al. (2013), are not corrected for absorption from the ISM which could strongly affect the intensity of the Mg ii doublet (see e.g.Table 1 of Vidal-García et al. 2017), leading to an underestimate of the nebular flux.
For illustrative purposes, Fig. 3 shows only a sub-grid of the Gutkin et al. ( 2016) models.It is worth noting, however, that our full suite of models allows for a better coverage of the parameter space.We did not find the ratios considered here to strongly depend on variations of hydrogen gas density and upper mass cutoff.Also, no dependence has been found for the C/O ratio.The latter is because we do not probe Oxygen and Carbon lines in the same spectrum.These three parameters are kept fixed while performing the fits to the observed line fluxes (see Sect. 4).On the contrary, Mg ii is a refractory element and, hence, is sensitive to metal depletion onto dust grains.This is the reason why we let the dust-to-metal mass ratio freely vary in the spectral fitting (Sect.4).
The [O ii]/Mg iiλ2796 ratio is shown to be more sensitive to metallicity (second left panel of Fig. 3) than other ratios and, more importantly, more sensitive to metallicity than to other parameters (in particular U ).The rise of the [O ii]/Mg iiλ2796 ratio as metallicity increases follows from the increase in the abundance of coolants (such as Oxygen).Towards high metallicities, the increase of Oxygen abundance is compensated by an higher efficiency of cooling.This makes the electronic tem- perature to drop.As consequence, the Mg ii emission compared to that of [O ii] is reduced because Mg ii requires a higher potential ( 4.4 eV) for collisional excitation than [O ii] ( 3.3eV).The wide range of [O ii]/Mg iiλ2796 values of our Mg ii emitters, (0.5 <log ([O ii]/Mg iiλ2796)< 1.6), suggests a variety of metallicities within our sources.Similarly, the spread of the model points shows that the C iii]/Mg iiλ2796 ratio is also sensitive to metallicity.The stellar ionizing spectra is harder at lower metallicity, producing enough high energy photons to ionize and excite C iii] and, hence, increase the C iii]/Mg iiλ2796.
Combining these ratios with the other ones more sensitive to other physical quantities, such as the ionization parameter, will provide useful constraints on the physical properties of the ionized gas.For example, [O iii]/Mg iiλ2796 and [Ne iii]/Mg iiλ2796, which show little dependence on metallicity, provides important constraints on the ionization parameters of our galaxies (top and middle panels of Fig. 3).The [Ne iii]/[O ii] ratio has been used both as metallicity (e.g.Nagao et al. 2006;Maiolino et al. 2008) and ionization potential indicator (e.g.Ali et al. 1991;Levesque & Richardson 2014) indicator.We note that the use of an emission-line ratio as probe of a physical quantity depends on the models assumptions (Levesque & Richardson 2014).For the models considered in this work, the [Ne iii]/[O ii] ratio can provide a certain level of constraint in the ionization paramater but it is also degenerate with metallicity.The observed data are compatible with a volume-averaged ionization parameters ranging from log U ∼ −3.2 up to -1.5, i.e. spanning values comparable to those of star-forming and intensively star-forming galaxies (e.g.Stasińska & Leitherer 1996;Brinchmann et al. 2004Brinchmann et al. , 2008;;Shirazi & Brinchmann 2012), and up to higher values commonly observed in young compact star-forming galaxies (e.g.Stark et al. 2014;Izotov et al. 2016Izotov et al. , 2017;;Chevallard et al. 2017).In conclusion, these ratios give no indication that we need to invoke harder ionization sources than massive stars, such as AGN or shocks, to reproduce the observed ratios of our MUSE Mg ii emitters.Nevertheless, for completeness, we now explore other types of ionizing sources.

Contribution from other ionizing sources
In addition to the previous subsection, we have compared the observed [O ii]/Mg iiλ2796, [Ne iii]/Mg iiλ2796, [Ne iii]/[O ii] and C iii]/Mg iiλ2796 ratios with predictions from photoionization models of narrow-line emitting regions in AGN (Feltre et al. 2016) and of shocks (Allen et al. 2008).We found that these models can predict the emission-line ratios observed in the spectra of our galaxies and none of these ratios enable a proper distinction between the different types of ionizing source.Complementary information is required to better explore any contribution from other ionizing sources, such as additional optical and UV emission-lines that would provide more constraints on the excitation properties of these sources.
As mentioned in Sect.2.2, to quantify the AGN contamination, we positionally cross-matched the whole Mg ii parent sample with the 7 Ms Source Catalogs of the Chandra Deep Field-South Survey (Luo et al. 2017).We found an X-ray counterpart only for one Mg ii emitter, ID872, which has been discarded from our sample as it exhibits broad Mg ii emission (see Sect. 2.2).Hence, we exclude nuclear gravitational accretion as the dominant source of ionization in our Mg ii emitters, although the presence of low-luminosity or heavily obscured AGN might not be completely excluded (Luo et al. 2017).
Unfortunately, we do not possess enough information to rule out a potential contribution from radiative shocks to the spectra of Mg ii emitters.In the literature, Mg ii emission accompanied by blueshifted absorption, in a P-Cygni like profile, has been commonly used as tracer of galactic winds (e.g.Weiner et al. 2009;Rubin et al. 2010Rubin et al. , 2011;;Erb et al. 2012;Finley et al. 2017b).These sources are not included in the Mg ii emitters, but they are considered here separately, as explained in Sect.2.3.In addition, shocks are usually associated with intense star formation or AGN and are generally not expected to be the dominant source of line emission within a galaxy (e.g.Kewley et al. 2013).We therefore conclude that, even if radiative shocks could still be present in our Mg ii emitters, their contribution to the typical total spectrum is unlikely to be dominant.In this respect, spatially resolved spectroscopy has been proven to be extremely useful to study the impact of shock contamination on the emission lines measured from galaxy spectra (e.g.Rich et al. 2011Rich et al. , 2014;;Yuan et al. 2012).

Spectral Fitting Analysis and Results
Emission-line ratios contain valuable clues on the source of ionization and the physical properties of the ionized gas.However, to probe other physical quantities of the galaxies, including stellar mass, SFR and dust attenuation, one needs to combine, in a self-consistent way, both continuum and nebular emission from stars and gas.With the aim of inferring these properties, we relied on SED fitting technique.Specifically, in this work we used the fitting code beagle (Chevallard & Charlot 2016) which already incorporates the models of Gutkin et al. (2016) In what follows, we first provide a brief overview of the main features of the beagle tool, along with the input settings chosen for the purposes of this work, and then present the main results from this spectral analysis.

Spectrophotometric fitting tool beagle
beagle (Chevallard & Charlot 2016) is a flexible tool, built on a Bayesian framework, to model and interpret the SED of galaxies.Briefly, the current version of this code self-consistenly incorporates the continuum radiation emitted by stars within galaxies and the reprocessed nebular emission from the ionized gas in H ii regions.It also accounts for the attenuation by dust and the transfer of radiation through the intergalactic media and includes different prescriptions to treat the chemical enrichment and star formation histories of galaxies.beagle can be exploited to interpret any combination of photometric and spectroscopic data from the UV to the near-infrared range, as well as to build mock spectra of galaxies (see also Sec. 5.1).

beagle fitting to the Mg ii parent sample
In this section we explore the synergy of HST and MUSE by simultaneously fitting broad-band photometry and integrated fluxes for our Mg ii parent sample, described in Sect.2.2.The 11 bands from HST allow us to constrain the stellar and recombination continuum, while the spectral information from MUSE provide useful information on the nebular emission.By applying the beagle tool to our Mg ii parent sample, we aim at deriving the properties of our galaxies (such as stellar mass, SFR, dust attenuation), and explore to which extent we can probe the physical properties of the ionized gas (such as metallicity and ionization parameter) with our observations.In the following, the values reported for each physical properties inferred from the fit corre-spond to the posterior median and the errors indicate the 68% central credible interval.

Spectro-photometric data
We simultaneously fit the HST broad-band photometry (see Sect. 2.4) and the integrated fluxes measured from the MUSE spectra for the whole Mg ii sample.We considered the strongest emission lines detected, with a S/N > 3 from PLATEFIT, in our spectra (see Table 2 and Sect. 2.5).Since a modelling of the neutral ISM needed for the treatment of resonant lines like Mg ii is not yet incorporated in beagle we do not include the Mg ii doublet in the fitting.
In the fitting procedure, the observed line intensities are compared with the integrated line fluxes computed on the spectral models (lines+continuum) incorporated within beagle.These models also include the stellar features which are, instead, already subtracted from line fluxes computed with PLATEFIT.We therefore can not directly input the PLATEFIT line fluxes into beagle.We computed the integrated fluxes of the lines detected on the MUSE spectra (Table 2) using the MUSE Python Data Analysis Framework 2 (MPDAF).Specifically, we performed a Gaussian fit to the section of the spectrum that contains the expected emission line using the gauss_fit (and gauss_dfit for line doublets) function of MPDAF.

beagle settings
We adopted stellar models (Sect.3.1) computed using a standard Chabrier (2003) IMF with 100 M as upper mass cut-off.
We kept the hydrogen gas density of the clouds fixed at n H = 10 2 cm −3 and the C/O abundance ratio at the solar value for the reasons explained in Sect.3. We assumed a delayed star formation history ψ(t) ∝ t exp(−t/τ SFR ), for any age t over the galaxy lifetime (section 4.2 of Chevallard & Charlot 2016), where τ SFR is the star formation time scale.
We followed the model of Charlot & Fall (2000) to describe dust attenuation.This models assumes two components, one associated with the short-lived birth clouds and another one diffuse throughout the ISM.Dust attenuation is parametrized in terms of the total optical depth, τ V , and the fraction of attenuation, µ, due to the diffuse ISM (see figure 5 of Charlot & Fall 2000, to see how these absorption curves impact the computation of the UV spectral slope β, reported in Sec.4.3).We also explored a different approach for the dust attenuation, i.e. the 'quasi-universal' relation of Chevallard et al. (2013) between the shape of the attenuation curve and the V-band attenuation optical depth in the diffuse ISM, which accounts for geometrical effects and galaxy inclination.However, we found no difference related to the dust prescriptions in the qualitative trends discussed in this section.
We let the following several adjustable physical quantities of the models incorporated in beagle vary freely, assuming uniform prior distributions in either logarithmic or linear quantities, as indicated below: interstellar metallicity Z (−2.2 ≤ log(Z/Z ) ≤ 0.24); volume-averaged ionization parameter ( −3.65 ≤ log U ≤ −0.65); the dust-to-metal mass ratio (0.1 ≤ ξ d ≤ 0.5); the star formation timescale, τ SFR , from 7 to 11.5 Gyr; -V-band dust optical depths in the range −3.≤ log τ V ≤ 0.7; the fraction µ of attenuation arising in the diffuse ISM (Charlot & Fall 2000), which ranges from 0 to 1.

beagle Results
Fig. 4 shows two examples of a simultaneous fit to HST broadband photometry (left panel) and MUSE integrated fluxes (right panel) for the Mg ii emitter ID17 (z = 0.84) and the Mg ii absorber ID14 (z = 0.77).We inferred several galaxy properties from the spectral fitting, as discussed below, such as stellar mass, star formation rate (SFR, averaged over the last 100 Myr) and specific star formation rate (sSFR), dust optical depth and ionizing emissivity.
We focused our analysis on the comparison of the properties of Mg ii emitters with those of absorbers, leaving a detailed study of the Mg ii P-Cygni to future works (Finley et al., in prep).We typically found the volume-averaged ionization parameter to be −3.4 log U −2.0 and the metallicity 0.1 Z/Z 1.5, in agreement with Fig. 3.We found Mg ii emitters and absorbers to have similar distributions of the gas nebular properties, namely metallicity, ionization parameter and dust-to-metal mass ratio.This favours a scenario in which Mg ii emission is a tracer of specific galaxy properties not necessarely connected to the properties of the gas within the ionization regions.In the following sections, we discuss the most interesting results from our spectral fitting analysis.

Stellar Mass and Star Formation
Fig. 5 shows the stellar mass versus SFR sequence for the Mg ii parent sample.The typical (median) errors on stellar mass and SFR ranges from ∼ ±7% to ∼ ±15%, and from ∼ ±12% to ∼ ±24%, respectively.For reference we report the star formation sequence by Whitaker et al. (2014) for 0.5 < z < 1.0 and 1.5 < z < 2.0 (solid and dotted dark red curves, respectively) derived from a mass-complete sample of star-forming galaxies in the CANDELS fields, drawn from the 3D-HST photometric catalogues.Specifically, we used the polynomial fit coefficients that parametrize the evolution of the SFR-stellar mass sequence reported in Table 1 of Whitaker et al. (2014).We also show the star formation sequence at z ∼ 0.9 from equation 11 of Boogaard et al. 2018, submitted (dark blue dashed line) computed using MUSE observations of the Hubble Ultra Deep Field and the Hubble Deep Field South of a sample of galaxies at 0.11 < z < 0.91, with stellar masses between 10 7 and 10 10.5 M .
Similarly to previous findings, we found Mg ii emitters to exhibit, on average, lower stellar masses than the absorbers (see histograms in Fig. 5).The median values of stellar mass are 5.9 × 10 8 M and 1.6 × 10 10 M for Mg ii emitters and absorbers, respectively.A two sample KS test gives a p-value lower than 10 −18 , so we choose to reject the null hypothesis that the two samples have the same stellar mass distributions.Analogous results were also found by previous works: Erb et al. (2012) on a sample drawn from a survey carried out with the LRIS spectrograph (LRIS-B) on the Keck I Telescope (Steidel et al. 2004), Kornei et al. (2013) in star-forming galaxies at z ∼ 1 from the DEEP2 survery and by Finley et al. (2017b) in a subsample of this Mg ii parent sample.Here we further confirm these previous findings by merely selecting our sources on the Mg ii line, without any previous selection on photometric colours or other emission lines.We note that MUSE has allowed us to probe Mg ii emission in galaxies with stellar masses one up to two orders of magnitude lower than those explored in the previous studies of Erb et al. (2012) and Kornei et al. (2013).
The Mg ii absorbers also reach higher values of SFR, and lower values of sSFR, compared to emitters.Fig. 5 is in overall agreement with Fig. 3 of Finley et al. (2017b) where stel- It is worth noting that despite some quantitative differences between the SFR inferred from beagle and those obtained with other methods, the general trends remain unchanged.Interestingly, galaxies with Mg ii P-Cygni profile show intermediate properties between emitters and absorbers and will be subject of future studies.
Before going ahead with the interpretation of the results, we need to consider the potential biases introduced by our sample selection.Indeed, Mg ii absorbers are, on average, more luminous than Mg ii emitters, because the ability to detect absorption features depends on the strength of the continuum.Moreover, the detection of continuum-faint Mg ii emitters at z > 1.5 is complicated by skyline residuals.We performed a first test by dividing the sample in two redshift bins, 0.7 < z ≤ 1.5 and 1.5 < z ≤ 2.34, and then selecting Mg ii emitters and absorbers within a given range of continuum luminosities in the F606W band.
The lower redshift bin, 0.7 < z < 1.5, had more than 10 sources per Mg ii spectral type (emitter and absorber) in the range of luminosity 23.3 < F6060W < 24.8 (where 23.3 is the brightest common magnitude between Mg ii emitters and absorbers in the redshift range of interest, and 24.8 is the peak value of F6060W distribution of the Mg ii absorbers), allowing for a statistical comparison.The F606W flux distributions of Mg ii emitters and absorbers for the lower redshift bin are shown in Fig. 6 (left panel).As can be seen from the right panel of Fig. 6, the Mg ii emitters and absorbers within the selected range of F606W continuum fluxes (yellow shaded area in Fig. 6, left panel) still show a dichotomy in stellar mass.
The p-value from a two sample KS test for this sub-sample is lower than 2 × 10 −4 and allows us to reject the null hypothesis that the two mass distributions are the same.We obtained the same result when considering HST F775W.For the higher redshift bins there is, unfortunately, low number statistics.The number of galaxies with 1.5 < z ≤ 2.34 and within a common range of luminosity is limited to 5 absorbers and 9 emitters.We performed anyway a two sample KS test and found a p-values lower than 0.008 both for HST F606W and HST F775W.This suggests that, even though our sample is likely not to be complete in terms of low-luminosities Mg ii absorbers (see Sect. 2), selection effects alone seem to do not be the primary driver for the difference in stellar mass between Mg ii absorbers and emitters (Finely et al., in prep).
Equivalent Width of Mg ii Fig. 7 shows the EW of the Mg iiλ2796 doublet component (computed with PLATEFIT as described in Sect.2.1) versus stellar mass (left), inferred from the fit and UV absolute magnitude at 1600 Å (right), computed on the SED predicted by beagle, for Mg ii absorbers and emitters, defined to have EW Mg ii > +1 and < −1, respectively (see Sect. 2.3).Mg ii emitters with high masses do not have strong Mg iiλ2796 EW in emission (left panel of Fig. 7).This could be explained in a scenario where, as the amount of ISM increases with stellar mass, the emission di-Fig.5: Main sequence, SFR versus stellar mass, for the Mg ii parent sample.We observe a smooth transitions in stellar mass from Mg ii emitters (cyan filled triangles), to P-cygni (green filled pentagons), to absorbers (magenta empty diamonds).Gray circles are Mg ii non-detections.Also shown main-sequence curves from Boogard et al. (2018), submitted for z∼0.9 (dashed dark blue line), and Whitaker et al. (2014) for 0.5 < z < 1.0 and 1.5 < z < 2.0 (solid and dotted dark red curves, respectively).minishes until it becomes completely suppressed, as we discuss in Sect. 5.Moreover, there is a lack of strong Mg iiλ2796 EW in emission for the bright (right panel of Fig. 7) Mg ii emitters.
Mg ii is very sensitive to emission-infill (e.g.Prochaska et al. 2011;Scarlata & Panagia 2015;Zhu et al. 2015;Finley et al. 2017b), due to re-emission of photons of the same same wavelength of the transition (Mg ii λλ2796, 2803 in this case) that fills in the absorption profile.To correct EW measurements of Mg ii for emission-infill, Zhu et al. (2015) proposed an observationdriven method which consists in comparing EW of Mg ii and Fe ii λ2344, λ2374, λ2586, λ2600 detected in quasar absorption-line systems to those observed in the spectra of star-forming galaxies.We do not cover the Fe ii transitions for all the sample and we do not aim here at quantitatively discussing the EW measurements for Mg ii absorbers.But we note that corrections for emissioninfill for the most massive sources would increase the EW of Mg ii absorbers shown in Fig. 7 by values between 1.6 − 3 Å (Finley et al. 2017b, Finley et al. in prep.).These corrections will introduce additional dispersion to Fig. 7, but will not impact the results discussed in Sec. 5.

Dust Attenuation, UV Spectral Slope and Ionizing Emissivity
The dust attenuation at 1500 Å, A 1500 , inferred from the fitting, is on average higher for Mg ii absorbers, with a median value of ∼ 1, 52 compared to the ∼ 0.38 mag of the emitters.Kornei et al. (2013) also found galaxies with strong Mg ii emission to have lower dust attenuation than their whole sample.
From the SED predicted from the beagle fits, we computed the UV spectral slope β (defined as F λ ∝ λ β ) following the parametrization of Calzetti et al. (1994) and the intrinsic (non corrected for dust attenuation) UV luminosity at 1600 Å, M UV .As the spectral slope is particularly sensitive to the dust content within the galaxy, we expect the UV slopes to be, on average, bluer for Mg ii emitters than absorbers.This is shown in Fig. 8, color-coded accordingly to the dust attenuation.Mg ii emitters have UV spectral slope β < −1, with a median value of ∼ −1.98, for a wide range of UV luminosities (−21.0 <M UV < −16.6).
The Mg ii absorbers, which are on average UV-brighter than emitters in our sample (Sect.2.2), are also the more massive (Sect.2.4) and have redder UV spectral slopes with increasing UV luminosity.At fixed UV luminosity, Mg ii emitters have bluer spectral slopes than absorbers.This is in agreement with previous findings from Erb et al. (2012), even though their Mg ii emitters also included sources with P-Cygni profile which do not show any particular trend in Fig. 8 but lie in between Mg ii emitters and absorbers.
From the beagle fits, we inferred the ionizing emissivity, i.e. the number of ionizing photons per UV luminosity.We computed two different ionizing emissivities considering both the unattenuated and attenuated UV luminosity, as follows: (i) ξ ion stellar computed using only the unattenuated stellar UV luminosity, i.e. ignoring the absorption and re-emission of photons inside the photo-ionization regions and dust attenuation; (ii) ξ ion computed using the total attenuated UV flux, i.e. the photons that remain after the transfer of the stellar radiation through H ii regions and interstellar dust, across a 100Å window centred at λ = 1500Å.
Fig. 9 shows the distributions of the two ionizing emissivities, ξ ion stellar and ξ ion , for the whole sample.Mg ii absorbers and emitters have similar distributions of the ionizing emissivity ξ ion stellar (left panel) computed on the unattenuated flux.When accounting for dust attenuation, Mg ii emitters and absorbers show different distributions of the ionizing emissivity ξ ion (right panel), with Mg ii emitters strongly peaking at lower values of ξ ion .Mg ii absorbers, on the other hand, reach higher values of ξ ion .The errors associated with the ξ ion values are of the order of 0.1 − 0.2 dex, which is relatively large considered the small range of values concerned (Fig. 9).This is because the fit is, in most of the cases, constrained by the HST broad-band continuum and few emission lines.It is worth highlighting that the ξ ion values shown here are not directly comparable with the values derived purely from nebular emission lines.ξ ion is commonly estimated from (dust corrected) hydrogen recombination lines (e.g.Bouwens et al. 2016;Schaerer et al. 2016;Matthee et al. 2017;Harikane et al. 2018;Shivaei et al. 2018) and, alternatively, by exploiting UV emission lines and photoionization models (Stark et al. 2015b(Stark et al. , 2017;;Nakajima et al. 2018a, e.g.).Additional lines are required to further constrain this physical quantity for our sample.Moreover, the productions of ionizing photons is connected with the properties of the stellar populations (age, metallicity and inclusion or not of binary stars) and with the escape fraction of ionizing photons (see section 4 of Nakajima et al. 2018a, for a discussion of the uncertainties related to the interpretation of ξ ion ).We focus here on a qualitative comparison of the distributions of ξ ion stellar and ξ ion which mainly reflect the different dust attenuation experienced by Mg ii emitters and absorbers.
The ionizing emissivity depend on the age and metallicity of the stellar populations.We did not find differences in the age and metallicity distributions of the Mg ii emitters and absorbers, probably because of the relatively large redshift range explored here and the high number of free parameters into play.In the case of an equal release of ionizing photons, the ionizing emissivity depends only on the UV luminosity.Since the intrinsic (stellar) emissivity, ξ ion stellar , is similar for Mg ii emitters and absorbers, the higher ξ ion reached by the Mg ii absorbers can be explained in terms of lower (i.e., more attenuated by dust) observed UV luminosity.This implies that the ionizing source (i.e.stellar) in Mg ii absorbers and emitters is intrinsically similar and that the differences between the two are mainly due to different dust and neutral gas content in the galaxy ISM.

Predictions from photoionization models
Early theoretical works already predicted emission from the Mg ii doublet in gaseous nebulae (e.g.Gurzadyan 1997, and references therein).Indeed, Mg i is relatively easy to ionize, given its low ionization potential of ∼ 7.65 eV, and electron collisions are efficient due to the small excitation potential of the Mg ii resonant level (∼ 4.4 eV).Dust can lead to a decrement of the emission line fluxes through absorption of photons.The associated photon scattering, within the ionized and neutral ISM, can give rise to the absorption features observed in galaxy spectra.The photoionization models of Gutkin et al. (2016) account for dust attenuation and resonant scattering effects within the H ii  For consistency with the spectral fitting setup (described in Sect.4), we assumed a delayed star formation history and Chabrier (2003) IMF with 100 M as upper mass cutoff.We adopted fixed values for the metallicity (Z = 0.5 Z ), the volume averaged ionization parameter (log U = −2.0)and the dust-to-metal mass ratio (ξ d = 0.3), in agreement with the average values found in Sect.3.1.We applied the ISM dust attenuation model of Charlot & Fall (2000) to the predicted line fluxes, shown for different values of the dust optical depth in the V-band, τ V , in Fig. 10.The Mg iiλ2796 line intensity starts decreasing at optical depth τ V ∼ 0.1, with a steeper exponential decline at τ V 1.The horizontal lines are the 3σ MUSE emission line flux detection limits for point-like sources (see Fig. 20 of Bacon et al. 2017) at 2800 Å (rest-frame) for mosaic (dashed line) and the deeper udf10 (continuous line).MUSE would detect the Mg ii emission in galaxies with SFR ≥ 1 M /yr −1 , values consistent with Fig. 5 and figure 3 of Finley et al. (2017b).
The fact that we do not observe the Mg ii emission is related, along with dust absorption, to resonant scattering effects due to an higher amount of absorbing material in the neutral ISM.An higher amount of gas could then give rise to the Mg ii absorption features observed in relatively massive and star-forming galaxies.Complementary information are needed to quantify gas masses of our Mg ii emitters and absorbers.Unfortunately, detections of H i (tracer of the atomic gas) or CO (indirect tracer of the molecular gas H 2 ) are not available for our sample.We also can not constrain the gas mass from emission line fluxes as this requires the detection of the most strong optical emission lines from [O ii]λλ3726, 3729 to [S ii]λλ6717, 6731 Fig. 10: Predictions of the Mg iiλ2796 line strength as function of the galaxy dust attenuation, expressed in terms of the optical depth in the V-band.These fluxes are for synthetic spectra of galaxies at z = 1 with M = 3 × 10 9 M and SFR= 0.1, 1.0, 10.0 M /yr −1 , as labeled in the legend.Information about the other model parameters can be found in the text.The gray horizontal lines are the 3σ MUSE emission line flux detection limits for point-like sources at 2800 Å (rest-frame) for mosaic and udf10, dashed and continuous lines, respectively.(Brinchmann et al. 2013) which are not fully covered by our spectra.

Mg ii emitters versus absorbers
Fig. 5 shows a clear transition from Mg ii emission to absorption, in terms of stellar masses and SFR.Moreover, the structural analysis of HST observations has shown that Mg ii emitters tend to have smaller sizes than absorbers (see also Finley et al. 2017b).This is consistent with the observational evidence that galaxy sizes increase with stellar mass (e.g.Shen et al. 2003;van der Wel et al. 2014).Furthermore, Mg ii emitters have been found to have bluer spectral slopes than absorbers (Fig. 8), i.e. a lower dust content.No particular trend has been found with red-shift, metallicity or other nebular properties, even though these could all be likely reasons for the observed scatter in the stellar mass−SFR relation shown in the middle panel of Fig. 5.As a different dust content also translates in a different amount of neutral gas, the observed Mg ii transition from emission to absorption can be explained by the impact of the resonant scattering to the observed flux.Indeed, the larger the amount of neutral gas in the ISM, the more the photons are resonantly scattered within the medium and, hence, the higher their probability to be absorbed by dust.
Our sources are also included in the CANDELS multiwavelength catalogue of (Guo et al. 2013).This catalogue combines the CANDELS (Cosmic Assembly Near-infrared Deep Extragalactic Legacy Survey Grogin et al. 2011;Koekemoer et al. 2011) HST/WFC3 F105W, F125W, and F160W data with existing public data, including the Spitzer/IRAC 3.6, 4.5, 5.8, 8.0 µm fluxes.Fig. 11 shows the flux ratio from the IRAC 3.6 and HST F160W bands versus redshift.Despite the large error bars for faint Mg ii emitters, Mg ii absorbers show redder F160W−3.6 µm colours compared to Mg ii emitters.The physical interpretation of the rest-frame 1 − 2 µm near-infrared emission from star-forming galaxies is challenging, as it depends on the nature of the stars (most likely post-AGB stars) contributing to it (e.g.Eminian et al. 2008).However, redder near-infrared colours have been observed in more star-forming systems, i.e. higher SFR and stellar masses (e.g.Rodighiero et al. 2007;Eminian et al. 2008;Mentuch et al. 2010;Lange et al. 2016).The redder F160W−3.6 µm colours observed for the Mg ii absorbers are in agreement with their higher stellar masses and SFR, as shown in Fig. 5.

Mg ii as an analogy to Lyα
In Fig. 7 we observed a trend between the Mg ii EW and the stellar mass (left) and UV luminosity (right) of our Mg ii emitters.A deficit of bright Mg ii emitters with strong emission Mg ii EW ( −7Å) is observed.This result is similar to findings from previous studies on the resonant Lyα line.There are observational evidences (e.g.Ando et al. 2006;Stark et al. 2010;Furusawa et al. 2016;Hashimoto et al. 2017) for a lack of strong Lyα emission (EW < −100Å) observed for UV bright (hence, more massive) sources, referred to as the "Ando-effect" (Ando et al. 2006).Multiple physical explanations can be invoked to describe the effect, including the neutral gas content, different dust attenuation, gas kinematics and age of the stellar populations (Ando et al. 2006;Verhamme et al. 2008;Garel et al. 2012).Alternatively, Nilsson et al. (2009) argued that the deficit of high Lyα EW luminous galaxies is related to the rarity of these sources.Both Mg ii and Lyα are resonant lines, so we should expect to observe some comparable trends (as argued also by Erb et al. 2012;Martin et al. 2013;Rigby et al. 2014;Henry et al. 2018) and the previous explanations to apply to Mg ii as well.Guaita et al. (2011) found their faint high EW Lyα emitters (LAE) to have stellar masses lower than 10 10 M and a lower dust content compared to the brighter galaxies in their sample.In addition, Guaita et al. (2011) andHathi et al. (2016) found Lyα emitters (EW ≥ 20 Å) at 2 < z < 2.5 to be less massive, have lower SFR and less dust.Galaxies with strong Lyα emission have also been found to have smaller sizes than those with weaker emission or Lyα in absorption (e.g.Law et al. 2012;Shibuya et al. 2014;Kobayashi et al. 2016;Paulino-Afonso et al. 2018).These trends are similar to those observed between our fainter/low mass/less dusty/small size Mg ii emitters and brighter/more massive/dustrich/larger size Mg ii absorbers.In this respect, our results sug-  gest that the lack of bright (and massive) Mg ii emitters with strong emission Mg ii EW (highly negative EW values) could be associated with an increased amount of the ISM within the galaxy itself, invoked to explain similar trends for the Lyα (e.g.Hashimoto et al. 2017).

Mg ii escape fraction
Mg ii photons within H ii regions can resonantly scatter through the surrounding medium until they are absorbed by dust.The fraction of Mg ii photons that escape the galaxy, f esc (Mg ii), provides important clues on the impact of dust on resonant lines.This fraction is defined as the ratio between the Mg ii observed flux and the intrinsic Mg ii nebular emission (analogous to the escape fraction of Lyα, Verhamme et al. 2008;Hayes et al. 2010Hayes et al. , 2011;;Blanc et al. 2011;Atek et al. 2014).This ratio is equal to unity in absence of absorption; the lower its value, the higher is the number of photons absorbed by dust grains.
From a study of 10 local Green Pea galaxies, Henry et al. (2018) found the escape fraction of Mg ii photons to closely correlate with that of Lyα photons, suggesting that both lines arise from the same low column density ISM gas.Henry et al. (2018) proposed a prescription, calibrated on photoionization models, to predict the intrinsic Mg ii emission from the [O ii] and [O iii] line fluxes.Unfortunately, the MUSE spectral coverage does not enable us to observe simultaneously both lines in our studied redshift range.Out of our 63 Mg ii emitters, only 8 spectra exhibit both [O ii] and [O iii].
We estimated the Mg ii escape fraction of our Mg ii emitters from the ratio between the Mg iiλ2796fluxes, computed using PLATEFIT (i.e.including correction for stellar absorption), and the Mg iiλ2796nebular flux from the photoionization models included in the beagle fit.The observed Mg iiλ2796fluxes are dereddened using the optical depth inferred by the beagle fit.Results are illustrated in Fig. 12.For comparison purpose, we also show the escape fraction computed assuming a Calzetti et al. (2000) attenuation curve.The f esc (Mg ii) is lower than unity within errors for 73% (46/63) of our sample.For the 38/63 sources with f esc (Mg ii) < 1, the escape fraction ranges from 3% to 98%, with a median value of ∼54%.We note that Mg ii emitters with dust optical depths, τ d 2796 , higher than unity have the lowest values of Mg ii escape fraction, resembling the observed decrease of the Lyα escape fraction with reddening E(B-V) (e.g.Hayes et al. 2010Hayes et al. , 2011;;Blanc et al. 2011;Atek et al. 2014).Despite the large number of variables that control the computation of f esc , as discussed below, our results lie around the dust attenuation curve of Calzetti et al. (2000) which corresponds to pure dust attenuation.This suggests little effect by resonant scattering on the observed fluxes of our Mg ii emitters and therefore a low content of neutral gas.In addition, by comparing the f esc (Mg ii) with the observed EW of Mg iiλ2796 and the intrinsic nebular Mg iiλ2796 flux from photoionization models, we found trends similar to those observed by (Henry et al. 2018, see also their Figure 5).Specifically, high f esc (Mg ii) is not always associated with a strong observed Mg ii emission.The strongest Mg ii emitters (in terms of Mg iiλ2796 EW) of our sample are those with the weakest intrinsic nebular Mg iiλ2796 flux.These findings are in agreement with the interpretation by Henry et al. (2018) that strong Mg ii emission is not uniquely associated with an higher production of Mg ii photons but rather it is observed when Mg ii photons can escape the ISM.
The reasons for observing f esc (Mg ii) higher than unity are multifold, arising from both uncertainties on the observed quantities and assumptions on the modelling approach.
Firstly, the spectral fitting procedure described in Sec. 4 is complex as it aims at reproducing the full SED of our galaxies, accounting simultaneously for the continuum (from stars and gas) and nebular emissions.The HST photometric bands provide strong constraints on the choice of models, in particular in the cases where few emission lines are detected.For instance, 7 of the sources (at z > 1.49) for which the only line detected is the C iii] doublet, have f esc (Mg ii) > 1.In contrast, the majority of the sources (at z < 0.86) with the highest number of emission lines detected, including [O iii]λ5007, have f esc (Mg ii) < 1 (orange contoured triangles in Fig. 12).Clearly, the computation of the Mg ii escape fraction benefits from additional information on optical emission lines, to better constrain the nebular properties (as also discussed in Sec.3.3).
A second reason is related to a possible extended Mg ii emission, similarly to that observed for Lyα (e.g.Herenz et al. 2015;Wisotzki et al. 2016;Drake et al. 2017;Leclercq et al. 2017;Marino et al. 2018) and Fe ii* (Finley et al. 2017a).If this is case, the observed emission line ratios might be altered by the approach chosen to estimate the line flux (see Sect. 4.1 of Drake et al. 2017).Furthermore, given the low ionization and excitation potential of Mg ii (∼7.65 eV and ∼4.4 eV, respectively), its emission might extend beyond the outer radius of the photoionization calculations3 .Effects related to shocks, compression and turbulence within the medium could also provide an additional contribution to the Mg ii observed flux.Geometrical effects, i.e. the angular distribution of Mg ii photons due to resonant scattering, are possibly another contributing factor.Follow up studies should, therefore, focus on modelling the emission of resonant low-ionization lines beyond the hydrogen ionization front and on comparing the spatially resolved emission from Mg ii to that of other non-resonant lines, e.g.[O ii] and C iii] (see also Martin et al. 2013).
It is also worth mentioning that Mg ii is a refractory element and, hence, sensitive to the level of depletion onto dust grains (Guseva et al. 2013).In the Gutkin et al. (2016) models, ∼20% up to ∼ 80% of Mg ii is confined in dust.This range is consistent with ∼50% of magnesium depleted onto dust grains found by Guseva et al. (2013).Hence, it is unlikely a major explanation for f esc (Mg ii) > 1.However, this, and any other dependence on model assumptions, needs to be taken into account when comparing observations with theoretical predictions.This is particularly true when studying high redshift sources, as their dust properties can differ from the local ones (Cucciati et al. 2012) and models might require a finer tuning.
Finally, we note that PLATEFIT uses templates (i.e.Bruzual & Charlot 2003) to subtract the stellar continuum different than those used in beagle (i.e.Bruzual & Charlot, in prep.).In their work on low redshift sources, Guseva et al. (2013) applied a constant correction for the stellar continuum to the observed fluxes (by multiplying the line intensities for (EW + 0.5)/EW), motivated by the roughly constant Mg ii stellar features in the models (i.e.Bruzual & Charlot 2003) over a wide range of stellar ages.Similarly, Henry et al. (2018) applied a 0.3 Åcorrection to the EW of each Mg ii doublet component.Given the small extent of this correction, we expect the differences among templates to play a secondary role.
To conclude, we caution any quantitative study of the Mg ii escape fraction, given the complexity, both from the observational and theoretical side, in controlling its estimate.However, even if further work is required, we emphasize the potential use of Mg ii as complementary and, hopefully, alternative, resonant line to the more well studied Lyα.Indeed, even if much fainter, Mg ii is less affected by the absorption of the intergalactic medium than Lyα (Henry et al. 2018).

Summary and Conclusions
We have studied a sample of 381 galaxies in the MUSE Hubble Ultra Deep Field Survey (Bacon et al. 2017) within a redshift range of 0.7 < z < 2.34 .Out of these, 123 galaxies show a wide variety of Mg ii λλ2796, 2803 doublet profiles, ranging from emission to absorption, and have been classified in: Mg ii emitters (63), Mg ii P-Cygni (19) and Mg ii absorbers (41).The main goal of this work was to find the underlying physical properties that drive the detection of the Mg ii doublet in emission or in absorption in the spectra of galaxies up to the peak of the SFRD history (Madau & Dickinson 2014), where a change in the regime of the global properties (also in term of dust content, Cucciati et al. 2012) of star-forming galaxies is observed.In what follows, we summarize the main results of this work and highlight future prospectives.
• We first explored whether the line fluxes of Mg ii emitters are consistent with predictions from nebular emission in starforming galaxies (Fig. 3) and find them to be compatible with ionizing photons produced within H ii regions (see also Erb et al. 2012).• Based on the measured emission line ratios available in our sample (i.e.[O ii]/Mg ii, [Ne iii]/Mg ii and C iii]/Mg ii), we were not able to identify features that would enable us to confirm or reject AGN or radiative shocks as sources of ionization.However, we removed all the potential AGN identified through X-ray from our sample (see Sect. 2.2 and 3.3) and we do not expect our Mg ii emitters to be contaminated by strong AGN.While we can dismiss a substantial contribution from gravitational accretion onto black holes, we can not rule out a possible contamination from shocks to the observed spectra.• To explore whether the different profiles of the Mg ii doublet trace particular properties of the galaxies, we relied on the Bayesian spectral fitting code beagle (Chevallard & Charlot 2016).Specifically, we exploited both the information from MUSE spectra and HST broad-band photometry and performed a spectral fit accounting simultaneously for the continuum and nebular stellar emissions (examples are shown in Fig. 4).We found Mg ii emitters to have, on average, lower stellar masses and bluer spectral slopes (i.e.lower dust attenuation) than Mg ii absorbers (Figs. 5,8 and 9).This indicates that the content of dust and neutral gas in the ISM of our galaxies plays a dominant role in shaping the Mg ii features.• We found a lack of strong Mg ii EW in emission for our bright Mg ii emitters (Fig. 7), similarly to the trend that has been observed for Lyα.As they are both resonant lines, one would expect to find correlations between the observed properties of Mg ii and Lyα, upon the assumptions that the source of photons production is the same and that they are observed through the same medium.• We compute the fraction of Mg ii photons escaping the galaxy (Fig. 12) finding many uncertainties in deriving this quantity.These uncertainties are mainly related to our modelling approach and other physical processes that could come into play (e.g.shocks, geometrical effects).Additional spectral information (preferentially spatially resolved) and a tailored modelling of the Mg ii resonant doublet are necessary to fully understand its emission feature.Nevertheless, extending the escape fraction studies, until now mainly restricted to the Lyα (e.g.Verhamme et al. 2008;Hayes et al. 2010Hayes et al. , 2011;;Blanc et al. 2011;Atek et al. 2014), with other resonant lines, such as Mg ii, is a promising approach to better understand the physics of the ISM within galaxies (see also Henry et al. 2018).
Additional emission lines in the rest-frame UV/optical range, along with deep spatially resolved spectroscopy, are required to further investigate the physical origin of Mg ii emission.This is specially relevant for those sources with an observed Mg ii flux higher than that predicted by purely nebular emission and for studying the potential effect of radiative shocks on the observed spectra of our Mg ii emitters.In particular, the completion of deeper MUSE observations with adaptive optics, planned for a subregion of 1 square arcminute of the UDF, will enable further studies in this direction.We expect new data for at least 34/381 galaxies of our sample (including 6/2/2 Mg ii emitters/P-Cygni/absorbers).
Most likely, a contribution from shocks is present in those sources with Mg ii P-Cygni-like profiles, as this peculiar profile is a tracer of galactic winds.A detailed study of the Mg ii spectral shape and physical properties of these sources is beyond the scope of this paper and will be subject of future analysis.It is worth highlighting that galaxies with Mg ii P-Cygni profile show intermediate properties between emitters and absorbers.Additional studies on Mg ii P-Cygni will help us understand whether Mg ii emitters are the results of a complete "blowout" of gas from galactic winds or if their stellar populations have simply fully ionized the gas.In this respect, we note that 6 of our Mg ii emitters (ID 84, 121, 46, 92, 1219, 7101) are in major close pairs (Table 3 of Ventou et al. 2017), pointing to major mergers.These merging events may have indeed produced galactic outflows for these sources (see also Finley et al. 2017b).Follow up studies will focus on explaining the observed transitions between Mg ii in emission, through P-Cygni profile, to absorption by means of proper radiative transfer modelling of the neutral medium (Garel et al., in prep., Finley et al., in prep.).
Our spectral modelling accounts for photospheric stellar emission and absorption and for the nebular emission from ionized gas, but does not include the effect of the neutral ISM.Spectral models incorporating absorption by neutral gas have been developed by Vidal-García et al. (2017) and are now being implemented wihin the fitting code beagle to get a more comprehensive and simultaneous treatment of the spectral features from stars, ionized and neutral ISM in and around galaxies.
To conclude, pushing these studies to higher redshift will allow us to see whether Mg ii emitters are common or rare at earlier epochs.The Mg ii line doublet is also very promising because it undergoes the same physics as the Lyα line, due to their resonant nature.A close connection between the profiles of these two lines has been already found in Green Peas galaxies at z ∼ 0.2 − 0.3 (Henry et al. 2018).It would be extremely interesting to see whether a connection exist among the properties of these two lines up to earlier epochs of galaxy evolution.A possibility is to search for Mg ii emission in near-infrared spectroscopic observations complementary those of the MUSE LAE.For example, K-band Multi-Object Spectrometer (KMOS) observations are available for the MUSE-Wide LAE and 3D-HST grism spectroscopy for the MUSE UDF.Moreover, future nearinfrared spectrographs, such as JWST/NIRSpec, will also potentially enable the studies of the Mg ii features at higher redshifts than those explored in this work, along with the simultaneous observations of Lyα for the most distant sources.This will provide additional clues on the dust and gas content of the ISM at high redshifts and, why not, during the reionization epoch.

Fig. 1 :
Fig. 1: From left to right: zoom-in of MUSE spectra, at rest-frame wavelengths, of sources showing Mg ii in emission, P-Cygni profile and absorption.Magenta dashed lines indicate the rest-frame wavelengths of the Mg iiλ2796 and Mg iiλ2803 doublet components.

Fig. 2 :
Fig. 2: Redshift (top panel) and F606W HST passband filter flux (right panel) distributions for the whole Mg ii parent sample (dark gray dashed-line histrogram).As labeled in the legend, distributions of Mg ii emitters, P-Cygni and absorbers are shown in cyan, green and magenta histograms, respectively.

Fig. 3 :
Fig. 3: Left: [O iii]λ5007/Mg iiλ2796, [O ii]/Mg iiλ2796, [Ne iii]/Mg iiλ2796, [Ne iii]/[O ii] and C iii]/Mg iiλ2796 emission-line ratios predicted from the star-forming galaxy models of Gutkin et al. (2016), described in Sect.3.1, for different values of the volumeaveraged ionization parameter log U (x-axis) and metallicity Z (colour coded as indicated in the top panel).Gray dotted lines mark the minimum and maximum value of the line ratios measured from the MUSE spectra of Mg ii emitters.Right (from top to bottom): observed line ratios as function of redshift for the Mg ii emitters, as defined in Sect.2.3 (empty-black circles) and for the sample of Guseva et al. (2013) (empty-gray diamonds).Red arrows in the top-right of each panel indicate the effect of attenuation by dust for A v = 1 and 3 mag and a Calzetti et al. (2000) attenuation curve.Data measurements from Guseva et al. (2013) are corrected for dust attenuation, while the MUSE fluxes are not.

Fig. 4 :
Fig. 4: Example of a simultaneous beagle fit to HST photometry (top) and MUSE integrated fluxes (bottom) for the Mg ii emitter ID17 at z= 0.84 (left) and Mg ii absorbers ID14 at z= 0.77 (right).Top: HST (cyan diamonds) and predicted (black points and red shaded area) broad-band photometry.In black the full SED predicted from the beagle fit.Bottom: integrated fluxes measured from MUSE spectra (red diamonds) and from the SED predicted by beagle (gray diamonds).Error bars on the data points are contained within the markers.

Fig. 6 :
Fig. 6: Left: F606W passband filter flux distribution for Mg ii emitters and absorbers (cyan and magenta histograms, respectively) in the redshift range 0.7 < z < 1.5.Right: Stellar mass distributions of Mg ii emitters and absorbers (same color-code as the left panel) with a given range of F606W flux, as highlighted in yellow in the left panel.

Fig. 7 :
Fig. 7: EW of Mg iiλ2796 for Mg ii emitters (cyan triangles) and absorbers (magenta diamonds) as function of the stellar mass (left) and UV absolute magnitude at 1600 Å (right), color-coded accordingly to the redshift.The gray shaded area indicates the threshold values used to identify Mg ii emitters (EW < −1.0) and absorbers (EW > 1.0).

Fig. 9 :
Fig. 9: Ionizing emissivity computed on the unattenuated stellar (left) and dust attenuated (right) UV luminosity, ξ ion stellar and ξ ion , respectively.Histograms are color-coded as labelled in the legend.

Fig. 10
Fig. 10 shows the impact of pure dust attenuation (i.e.without including resonant scattering from the neutral ISM) beyond the H ii regions on the Mg iiλ2796 intensities predicted by the models (solid lines).The predictions are for synthetic spectra of galaxies at z = 1 with M = 3 × 10 9 M and three values of the SFR= 0.1, 1.0, 10.0 M /yr −1 (color-coded as labeled in the legend), computed using the photoionization models of Gutkin et al. (2016) (Sec.3.1) and the beagle code (Chevallard & Charlot 2016, see also Sec. 4.1).For consistency with the spectral fitting setup (described in Sect.4), we assumed a delayed star formation history andChabrier (2003) IMF with 100 M as upper mass cutoff.We adopted fixed values for the metallicity (Z = 0.5 Z ), the volume averaged ionization parameter (log U = −2.0)and the dust-to-metal mass ratio (ξ d = 0.3), in agreement with the average values found in Sect.3.1.We applied the ISM dust attenuation model ofCharlot & Fall (2000) to the predicted line fluxes, shown for different values of the dust optical depth in the V-band, τ V , in Fig.10.

Fig. 11 :
Fig. 11: IRAC 3.6 µm and HST F160W flux ratio versus redshift, for the Mg ii emitters (cyan triangle), P-Cygni (green pentagons) and absorbers (magenta diamonds).Error bars on Mg ii emitters and P-Cygni are contained within the markers.

Fig. 12 :
Fig. 12: Mg ii escape fraction as function of the optical depth at the Mg iiλ2796 wavelength for our Mg ii emitters.Orange contoured triangles are Mg ii emitters at z < 0.86.The salmon curve shows the Calzetti et al. (2000) attenuation curve.

Table 1 :
Classification of the Mg ii parent sample

Table 2 :
Additional emission lines detected in the Mg ii parent sample models (left panels) compare with the emission-line ratios measured from the MUSE spectra of our Mg ii emitters (right panels), namely, from top to bottom, [O iii]λ5007/Mg iiλ2796 (mainly for comparison purposes with low redshift samples), [O ii]/Mg iiλ2796, [Ne iii]/Mg iiλ2796, [Ne iii]/[O