## Emission Line Data Products

**Spectral Analysis**

The main goal of LZIFU (LaZy-IFU, Ho et al. 2016) is to extract emission line maps and ionised gas kinematic maps from SAMI data cubes. We achieved this in two steps. On a spaxel-to-spaxel basis, we first model and subtract the continuum, then fit emission lines to the continuum-free spectrum. We briefly introduce the procedures below. A full description of the pipeline LZIFU is presented in Ho et al.2016. Further details of LZIFUs application to SAMI DR2 can be found in the DR2 paper (Scott et al. submitted).

**1.1 Continuum Fitting**

**1.1.1 Unbinned cubes**

For the unbinned, "default" cubes, we implement an improved continuum fitting method as compared to DR1 to better subtract the underlying Balmer absorption in low S/N data. We use the Voronoi-binned data, which has S/N$\ \sim10$ in the continuum, to constrain the number of templates that are used to fit each spaxel within the Voronoi bin of interest. This is achieved by using pPXF (penalized Pixel Fitting; Cappelari & Emsellem 1994) to fit the Voronoi-binned spectrum with a subset of the MILES simple stellar population (SSP) spectral library (Vazdekis et al. 2010) that contains four metallicities ([M/H] = -0.71, -0.40, 0.00, 0.22) and 13 logarithmically-spaced ages ranging from 0.0063-15.85 Gyrs. Following Cid Fernandes et al. (2013), the MILES SSPs are supplemented with younger SSP templates drawn from Gonzalez Delgado et al. (2005) with metallicities [M/H] = -0.71, -0.40, 0.00 and ages 0.001-0.025 Gyr. During the fitting, emission line templates are included for the Balmer lines, as well as strong forbidden lines. Importantly, this simultaneous fitting of emission and absorption components allows the regions surrounding the age-sensitive Balmer lines to be included in the continuum fits. The stellar kinematics are not fitted for during this process, instead we use those derived by the SAMI stellar kinematics pipeline, included as part of this release.

The subset of SSP templates that have non-zero weights assigned in the fits to the Voronoi binned spectra are then used during the fitting of each spaxel contained within the region defined by the Voronoi bin. Again, emission lines are fitted simultaneously, and the stellar kinematics are fixed to those measured by our stellar kinematics pipeline, while allowing pPXF to re-determine the optimal template weights only for spaxels where the S/N>5. For spaxels with S/N<5, the weights determined during the Voronoi binned fitting are used to produce a single optimal template, while the stellar kinematics are fixed to those derived from the Voronoi-binned data. This helps to guard against poor fits due to low S/N. In all of the pPXF fitting described above, we include a 12th order multiplicative polynomial. This continuum fit is then used in LZIFU to subtract the continuum and measure the final line fluxes for the 1- to 3-components fits. Overall this method produces similar line fluxes to those found in DR1, but with better constraints in spaxels with low-S/N continua, and some systematic offsets in galaxies with significant Balmer absorption features.

**1.1.2 Binned data and aperture spectra**

For binned data and aperture spectra we follow the same continuum fitting process as used in SAMI Data Release 1. LZIFU first convolves the blue and red spectra to a common spectral resolution (i.e., the blue resolution) and then stitches the two spectra together. The merged spectrum is sent to the penalized pixel-fitting routine (pPXF; Cappellari & Emsellem 2004) for modeling the continuum. Only channels not contaminated by strong sky lines or optical emission lines are included in the fitting process. In addition to bad channels rejected by the data reduction pipeline, we mask out the vicinity ($\rm\pm10$ Å) of strong sky lines (at 5577, 6360, and 7340 Å), and those at 40 Å (full-width) around common emission lines ([OII]3726,29, H$\delta$, H$\gamma$, [OIII]4363, H$\beta$, [OIII]4959, 5007, [OI]6300, [NII]6548,83, H$\alpha$, and [SII]6716,31). Only channels between 3700 Å and $6950\times (1+z)$ Å are considered due to the limited spectral coverage of the stellar templates.

We adopt the MILES SSP templates with the Salpeter IMF of four metallicities ([M/H] = $-0.71$, $-0.40$, 0 and $+0.22$) and 13 ages (equally spaced logarithmically from 63.1 Myr to 15.8Gyr) from Vazdekis et al. (2010). Additive Legendre Polynomials (orders 2 to 10) are also included to fit simultaneously with the stellar templates. To reject potential bad channels, we iterate the continuum fit while imposing a robust-sigma clipping at the 5$\sigma$ level. Note that this is different from what the standard CLEAN keyword in pPXF does.

These templates are at a slightly lower spectral resolution than the red arm of our spectra; therefore in low stellar velocity dispersion galaxies ($\sigma<$30 km s$^{-1}$), we may incorrectly subtract the H$\alpha$ absorption. However, most of these low stellar velocity dispersion galaxies have strong emission lines, so this systematic error is not likely to have a big effect beyond what is accounted for in our Balmer flux error corrections.

**1.2 Emission Line Fitting - Single and Multiple Components**

After removing the continuum, LZIFU models emission lines as Gaussians and performs a bounded-value nonlinear least-squares fit using the Levenberg-Marquardt least-squares method implemented in IDL (MPFIT; Markwardt 2009). Only channels ±20 Å around line centres, as inferred from the galaxy redshift (LZIFU input redshift), are included in the fitting process. Each galaxy is fit three times, assuming that the line is composed of 1, 2, or 3 velocity components having a Gaussian shape. All the lines are fit simultaneously and each kinematic component is constrained to share the same velocity and velocity dispersion. In total, we fit 11 strong optical lines simultaneously, [OII]3726,29, Hβ, [OIII]4959,5007, [OI]6300, [NII]6548,83, Hα, and [SII]6716,31. [OIII]4959 and [NII]6548 are both constrained to be one-third in amplitude (and flux) of [OIII]5007 and [NII]6583, respectively. We do not produce line maps for these two lines.

SAMI DR2 includes several sets of emission line fits. 1-component or "1-comp" fits are obtained by fitting a single Gaussian to each line in each spaxel or spectrum. For a limited set of data we release a 2-component or "2-comp" fit, obtained by fitting two Gaussians to each line in each spaxel or spectrum

The recommended-component or "recom-comp" provide the fits for the best number of components (1, 2 or 3) able to reproduce the observed spectrum. To determine the recommended number of components for each galaxy, we use an artificial neural network (LZComp; Hampton et al. 2017) trained by SAMI team members. As an additional constraint, we require that all components have a signal-to-noise ratio of at least 5 in H$\alpha$. If this condition is not met, we reduce the number of components by 1. 3 components becomes 2 components and 2 components becomes 1 component.

The only line for which we are releasing individual fluxes for multiple components is Hα. Hα emission line flux maps are arrays of dimension 50×50×N, where the N slices are: [total flux in all components, flux in component 1, ...flux in component N], where N is the recommended number of components. The other lines may have strong uncertainties in the individual components, so only the sum of the fluxes (along with appropriate covariance-included errors) is released, in a 50×50 map. Multi-component fits are also included for the gas kinematic measurements. The format of these data are 50×50×N arrays, where the N slices are: [NaN, V or $\sigma$ of component 1, ...V or σ of component N]. The first (zeroth) slice is included as NaN in order to preserve matching with the Halpha emission line map format.

**Data Quality**

**2.1 Errors in the line fits**

One sigma errors of line fluxes (except for Balmer lines, see below), velocities, and velocity dispersions are taken straight from MPFIT, which uses the Levenberg-Marquardt technique to solve the maximum likelihood problem, and the Jacobian matrix of the line model to estimate the covariance matrix for parameters. We have tested the robustness of MPFIT through Monte Carlo simulations. In the absence of any systematic errors, such as those from continuum subtraction or those from variance of the data, the one sigma errors returned by LZIFU (from MPFIT) are robust. We discuss in the following sections some of the possible systematic errors we have identified that you should be aware of, some of which have been incorporated into the line flux error extensions.

**2.2 Systematic errors from the continuum fit**

Due to the way the continuum is fit and LZIFU is set up, the best-fit continua are assumed to be noise- and error-free by the emission line fitting code. Our Monte Carlo simulations reveal, unsurprisingly, that there is some systematic contribution to the true line-fitting errors that comes from the continuum, unidentified by LZIFU. This systematic effect is negligible in galaxies with strong emission lines and weak continua, but has a progressively larger effect as the continuum flux increases relative to the emission line fluxes. Errors are predominantly due to the Balmer absorption features, and therefore affect the H$\alpha$ and H$\beta$ emission line fluxes most strongly. This has the effect that raw MPFIT errors on the Balmer line fluxes can be significant underestimates in some cases. In order to avoid this, we have incorporated an estimate of this error into the H$\alpha$ and H$\beta$ line flux error extensions.

Balmer absorption in stellar populations is strongly correlated with the 4000 Å break. We therefore estimate our errors on the Balmer absorption of the continuum using the errors on the Dn4000 index (which is measured by J. Moustakas' IDL routine *spectral_indices*). This error in the Balmer continuum absorption equivalent width is then proportional to the extra error translated to the emission line fluxes. The Balmer continuum absorption is spread out over a wide spectral range, so only a fraction of it (based on the emission line width) is propagated to the emission line flux. We therefore use the equations:

$$\delta_{Hx,tot}^2 = \delta_{Hx,MPFIT}^2 + (A_{Hx} \delta_{Hx,contEW} f_{cont})^2$$

$$A_{H\alpha} = 0.0504933 + 0.00100893 \times (6 \sigma) $$

$$A_{H\beta} = 0.0258323 + 0.000802997 \times (6 \sigma) $$

where $\sigma$ is the velocity dispersion of the emission line, and $f_{cont}$ is the continuum level around the emission line, used to convert the equivalent width error into flux units. $A_{Hx}$ equations were calculated using the MILES stellar template libraries at typical ranges of metallicity, stellar velocity dispersion, and stellar population age.

These new errors are incorporated in as the actual errors on the emission line fluxes for Balmer emission lines, and should be used as you would normally use errors.

**2.3 Non-zero covariance**

When a line is fit with more than one component, the fluxes of different components are highly correlated. Typically the correlation coefficients are negative because the total flux, the sum of all components, remains approximately the same. This means when summing the fluxes of two components together, the combined error is not the quadrature sum of the errors. The error of the sum should be taken directly from the first slice in MS2D, which takes the covariances into account.

**2.4 Errors of [OII]3726,31 doublets**

In almost all lines, the wavelength separations between different lines are much larger than the spectral resolutions such that fluxes between different lines are independent of each other, i.e. the covariances are zero. This is not true for the [OII]3726,31 doublets. The doublets are marginally resolved by the blue spectrograph and therefore non-zero covariance can be important. Currently, the covariances are not reported and therefore directly summing the flux errors (of the two lines) in quadrature would overestimate the errors.

In some cases where signal-to-noise ratio is poor, LZIFU would use only one Gaussian to model one of the lines and report zero flux for the other. In this case, the error on the line with zero flux would be NaN (parameter touches boundaries) and the error on the non-zero line will be a more representative estimate.

Because the doublets are only marginally resolved, and the lines are usually at the very blue parts of the spectrograph, we highly recommend that you use only the summed flux for any analysis.

**Data Products**

Two-dimensional maps of all quantities are provided for both the unbinned, "default", cubes and for each of the different binning schemes. For the default, sectors-binned and adaptive-binned cubes we provide both 1-component and recommended-component fits for all measurements. For the annular-binned cubes we provide only 2-component fits as this best represents the underlying velocity structure of the gas.

We also provide ionised gas velocity dispersion, line fluxes and star formation related quantities measured in a set of fixed apertures. The set of apertures are the standard SAMI aperture set: 1".4, 2", 3", 4" and 3 kpc diameter circular apertures and an elliptical aperture with semi-major axis of radius Re. We provide 1-component and recommended-component measurements for all apertures. These measurements are contained in two tables, Gas1compApertures and GasRecomcompApertures, containing the 1-component and recommended-component measurements respectively. Each row contains all measurements for a single galaxy. The columns have a structure {Measurement}_{Aperture}, e.g. HALPHA_3_ARCSECOND. Additional columns contain some general galaxy properties applicable to all apertures. For details see the SAMI DR2 schema browser.

**3.1 Kinematics maps**

Line-of-sight velocity and velocity dispersion maps (and relative errors maps) obtained by fitting simultaneously 11 emission lines with a single Gaussian component. The velocities are calculated with respect to the heliocentric redshift as measured by the GAMA survey and are given in units of km/s. Each file has two extensions:

PRIMARY | ionised gas velocity map

V_ERR | error on the ionised gas velocity

and

PRIMARY | ionised gas velocity dispersion map

VDISP_ERR | error on the ionised gas velocity dispersion

**3.2 Line flux maps**

2D image obtained by summing all the flux associated to a given emission line in each spaxel (and relative error maps). Units are $10^{-16} \mathrm{ergs}\ \mathrm{s}^{-1} \mathrm{cm}^{-2}$. Each line flux map has two extensions:

PRIMARY | line flux map

{LINE}_ERR | error on the line flux

**3.3 Extinction Maps**

Extinction maps are calculated using the Balmer decrement and the Cardelli et al. (1989) extinction law.

For each spaxel:

$$balmerdec = \frac{H\alpha}{H\beta}$$

$$balmerdecerr = balmerdec * [(H\alpha_{err}/H\alpha)^2 + (H\beta_{err}/H\beta)^2]^{0.5}$$

$$attencorr = (\frac{balmerdec}{2.86})^{2.36}$$

$$attencorrerr = |\frac{attencorr * 2.36 * balmerdecerr}{balmerdec}|$$

These maps will be in units of attenuation correction factor — such that you can multiply this map by the Halpha cube to obtain de-extincted Halpha cubes. Note that, when the Balmer decrement is less than 2.86, no correction will be applied (attenuation correction factor = 1., error = 0.).

Additionally, we have set to NaN the correction and error for spaxels with Halpha flux > 40 ($\times 10^{-16} \mathrm{erg}\ \mathrm{s}^{-1} \mathrm{cm}^{-2}$) and Balmer decrement > 10. These numbers were chosen to eliminate spurious Halpha fits to the edges of the fibre bundles. Errors are given as 1-sigma uncertainties on the attenuation correction.

Each file has two extensions:

PRIMARY | attenuation correction map

EXTINCT_CORR_ERR | error on the attenuation correction

**3.3 Star Formation Rate Masks**

We classify each spaxel using (when possible) [OIII]/Hbeta, [NII]/Halpha, [SII]/Halpha, and [OI]/Halpha flux ratios to determine whether the emission lines are dominated by photoionization from HII regions or other sources like AGN or shocks, using the BPT/VO87 diagnostic diagrams and dividing lines from Kewley et al. (2006). We only classify spaxels with ratios that have a signal-to-noise ratio of at least 5. Emission is classified as star-forming in a given diagnostic if:

$$\log([OIII]/H\beta) < (0.61 / (\log([NII]/H\alpha)-0.05) + 1.3$$ (Kauffmann et al. 2003)

$$\log([OIII]/H\beta) < (0.72 / (\log([SII]/H\alpha)-0.32) + 1.3$$ (Kewley et al. 2001)

$$\log([OIII]/H\beta) < (0.73 / (\log([OI]/H\alpha) +0.59) + 1.33$$ (Kewley et al. 2001)

We additionally add a likely classification of "star-forming" to spaxels with $\log([NII]/H\alpha) <-0.4$ without an [OIII] detection and to spaxels with Halpha detections but no [N II], [S II], [O I], or [O III] detections.

Each spaxel in the map is 1 (when star formation dominates the emission in all available line ratios) or 0 (when other ionization mechanisms dominate), so it may be simply multiplied by the Halpha flux map to produce "Halpha from star formation" maps.

Each file has a single extension:

SFMask | Star formation mask map

**3.4 Star Formation Rate Maps**

Star formation rate (SFR) maps (in $M_\odot \mathrm{yr}^{−1}$) are obtained from extinction-corrected Hα maps. As mentioned above, extinction-corrected Hα maps are derived by multiplying the attenuation correction factor map (computed from smoothed data) by the observed (i.e., not smoothed) Hα map. The relevant Star Formation Masks have been applied to zero out Hα emission that may be contaminated by AGN, LINER, or shock emission. When calculating the distances, we are using the flow-corrected redshifts z_tonry from the SAMI-matched GAMA catalog for the GAMA regions and the cluster redshift from Owers et al. 2017. for cluster galaxies. We assume $H_0=70.$, $\Omega_m=0.3$ and $\Omega_\Lambda=0.7$.

$$SFR=L(Hα)×7.91.53×10−42 [M_\odot \mathrm{yr}^{−1}]$$ following Kennicutt (1998) with conversion to a Chabrier Initial Mass Function (Chabrier 2003). L(Hα) is the Hα luminosity in each spaxel corrected for internal extinction via the Balmer decrement.

Star formation rate density and error maps (in units of $M_\odot \mathrm{yr}^{−1} \mathrm{kpc}^{−2}$) are also provided. Errors are given as 1-sigma uncertainties on the SFR. Each file has two extensions:

PRIMARY | Star formation rate map

SFR_ERR | Error on the star formation rate

and

PRIMARY | Star formation rate surface density map

SFRSurfDensity_ERR | Error on the star formation rate surface density

We emphasise that these SFR maps are not appropriate for calculating a global (total) SFR, for two reasons: a) These maps use a clean sample of star-forming spaxels, not a complete one. Thus, it is possible (and likely) that some regions of star formation may be excluded, particularly in ambiguous cases, and b) Measurements of derived quantities will have more reliable measurements if the spectra are summed and then emission lines refit, rather than summing together many low-S/N fits. In general, the aperture spectra measurements in the Gas1compApertures and GasRecomcomApertures tables should be used for global SFR measurements.

SFR maps retain the same dimensions as the the Hα emission line maps. Note that this means the input 50×50 extinction maps and star formation masks are applied to all components of the multicomponent Hα maps.