#  BUDDI-MaNGA I: A statistical sample of cleanly decomposed bulge and disc
spectra

Evelyn J. Johnston1, Boris Häußler2, & Keerthana Jegatheesan1.
1 Núcleo de Astronomía, Facultad de Ingeniería y Ciencias, Universidad Diego
Portales, Av. Ejército Libertador 441, Santiago, Chile
2 European Southern Observatory, Alonso de Cordova 3107, Vitacura, Santiago,
Chile
Contact e-mail<EMAIL_ADDRESS>
###### Abstract

Many galaxies display clear bulges and discs, and understanding how these
components form is a vital step towards understanding how the galaxy has
evolved into what we see today. The BUDDI-MaNGA project aims to study galaxy
evolution and morphological transformations through the star-formation
histories of the bulges and discs. We have applied our buddi software to
galaxies from the MaNGA Survey in the SDSS DR15 in order to isolate their
bulge and disc spectra, from which we derived their stellar populations. To
date, this work provides the largest sample of clean bulge and disc spectra
extracted from IFU datacubes using the galaxies light profile information, and
will form the basis for a series of papers aiming to answer open questions on
how galaxies have formed and evolved, and the role of their individual
structures. This paper presents an introduction to the project, including an
overview of these fits, a characterisation of the sample, and a series of
tests on the fits to ensure reliability.

###### keywords:

galaxies: bulges – galaxies: disc – galaxies: fundamental parameters –
galaxies: structure

††pubyear: 2022††pagerange:  BUDDI-MaNGA I: A statistical sample of cleanly
decomposed bulge and disc spectra–A

##  1 Introduction

In the hierarchical model of galaxy evolution, galaxies have built up their
mass through mergers and accretion of other galaxies (e.g. Guo & White, 2008).
Many galaxies display multiple components, such as bulges and discs, and as
the galaxy grows in mass, interactions and star formation activity within the
galaxy affects these components differently. Therefore, understanding how
these structures assemble their mass is a key element in understanding galaxy
evolution in general. Many galaxies are also known to consist of only one
component, such as a pure disc or a pure bulge (i.e. an elliptical galaxy),
and so investigating the transformation between one and two-component systems
(in both directions) will also help us explain the existence of these systems.

Many studies of bulges and discs have been carried out via bulge–disc
decomposition techniques on photometric data, in which the light profile of
each component is fitted either in one or two dimensions and used to create a
best-fitting model for each component. From these models, the structural
parameters, such as the size and luminosity of each component, can be derived.
In the last two decades, this technique has been employed by many large
photometric surveys of galaxies, such as SDSS (e.g. Simard et al., 2011), GAMA
(e.g. Lange et al., 2016), CANDELS (e.g. Dimauro et al., 2018), and
CANDELS+HFF (Nedkova et al, in prep), in order to obtain statistically
significant results on their properties over a range of redshifts. Applying
this technique to multi-waveband data provides magnitudes for the bulge and
disc in each band. These colours can in turn be used to derive their stellar
populations through SED fitting (e.g. Kennedy et al., 2016).

However, deriving estimates of the ages and metallicities of stellar
populations from such broad-band colours alone can result in highly degenerate
stellar populations (Worthey et al., 1994), and can also be affected by dust
reddening (Disney et al., 1989). The addition of spectroscopic information is
vital towards breaking this degeneracy and measuring the star-formation
histories across galaxies. In recent years, several approaches have been used
to cleanly separate the light from different components within galaxies
observed with long-slit spectroscopy, using either the differences in their
light profiles (e.g. Sil’chenko et al., 2012; Johnston et al., 2012, 2014) or
their distinct kinematics (e.g. Coccato et al., 2011; Johnston et al., 2013;
Tabor et al., 2017). With the introduction of integral-field spectrographs
with high spatial resolution and large fields of view, such as the Multi-Unit
Spectroscopic Explorer (MUSE, Bacon et al., 2010), and surveys like the Calar
Alto Legacy Integral Field spectroscopy Area survey (CALIFA, Sánchez et al.,
2012), the Sydney-AAO Multi-object Integral-field spectrograph survey (SAMI,
Croom et al., 2012), and the SDSS-IV Mapping Nearby Galaxies at Apache Point
Observatory survey (MaNGA, Bundy et al., 2015), these spectroscopic
decomposition techniques can now be adapted to make the most of the combined
spatial and spectroscopic information that is now available.

For example, several works have focussed on the different kinematics of the
bulges and discs to separate their spectra. Typically, one expects the galaxy
to consist of a spherical, dispersion-supported bulge surrounded by a rotating
disc, and so one can try to model the kinematics of each component using this
assumption to extract the spectra of the kinematic bulge and disc. This idea
has been used successfully by Tabor et al. (2017) and Tabor et al. (2019) for
CALIFA and MaNGA galaxies, respectively. They used photometric decomposition
to determine the ratio of light from the bulge and disc throughout the galaxy,
and used these light ratios as constraints when modelling the spectra with 2
kinematic components. A similar approach has also been used to study the bulge
and disc of NGC 3521 by Coccato et al. (2018) and a large sample of galaxies
from the SAMI survey by Oh et al. (2020). And another study by Du et al.
(2020) applied this technique to galaxies in the TNG100 run of IllustrisTNG to
compare the properties of the morphological and kinematic components present
in disc galaxies.

Other approaches use the 2-dimensional light profile of the galaxy to separate
the bulge and disc spectra. For example, Fraser-McKelvie et al. (2018) used
decomposition of SDSS photometric data to determine which spaxels lay in
bulge- and disc-dominated regions within MaNGA galaxies in order to minimize
contamination from other structures. They then concentrated their analysis on
these areas to derive the properties of the stellar populations of the disc
and bulge regions. A similar approach was used by Pak et al. (2021), while
Barsanti et al. (2021) combined this idea with two other approaches (i.e.
using photometric decomposition of the galaxy to determine the mass and flux
fractions of the bulge and disc across the IFU field of view (FOV) in addition
to simply identifying bulge- and disc-dominated regions) for their
spectroscopic decomposition of SAMI galaxies.

The next natural step is to apply this bulge–disc decomposition directly to
the IFU data itself to make full use of the spatial and spectroscopic
information available in the datacubes. One approach that uses this idea is
Bulge–Disc Decomposition of IFU data (buddi, Johnston et al., 2017), which
uses galfitm (Häußler et al., 2013), a modified form of galfit (Peng et al.,
2002, 2010) that can model the light profile of multi-waveband images of a
galaxy simultaneously. buddi uses information from the entire datacube to
create a wavelength-dependent model of each component within the galaxy, from
which the spectra of each component can be cleanly extracted. It was developed
and tested on prototype data from the MaNGA Survey in Johnston et al. (2017),
and has since been successfully used to separate the light from many different
components within galaxies, such as bulges, discs and lenses of S0 galaxies
(Johnston et al., 2021), to extended stellar haloes around cD galaxies
(Johnston et al., 2018), and down to the nuclear star clusters in the cores of
dwarf galaxies (Johnston et al., 2020).

A similar technique to buddi is c2d, which was developed by Méndez-Abreu et
al. (2019a). In this case, the initial fit to the galaxy light profile is
carried out on complementary imaging data, as opposed to the white-light image
of the galaxy itself as in the case of buddi, but it uses the same general
idea of modelling the galaxies light profile as a function of wavelength. c2d
has been successfully applied to galaxies in the CALIFA survey to study the
properties of ETGs (Méndez-Abreu et al., 2019b), and of bulges and discs over
a wide range of galaxy morphologies (Méndez-Abreu et al., 2021).

We are now entering an exciting time, where these different IFU decomposition
techniques are transitioning from proof-of-concept ideas to being used for
science. While they have so far mainly been applied to small samples of
galaxies, where each galaxy could be modelled carefully by the user, the field
is now moving towards automated fits to large data sets to carry out
statistical studies of the spectroscopic stellar populations of galaxy
components. To this end, this work presents the BUDDI-MaNGA project, in which
we apply buddi to all suitable galaxies included in the recent MaNGA data
release 15 (hereafter DR15, Aguado et al., 2019). We identify the ‘good’ fits
to the data (see Section 4.2), and extract clean bulge and disc spectra for
these galaxies and estimates their stellar populations and star-formation
histories. This work will produce the largest sample of clean bulge and disc
spectra to date, allowing statistical studies of the stellar populations of
each component for the first time, and will be expanded in the future with
SDSS Data Release 17 (Abdurro’uf et al., 2022).

This paper is the first in the series, and provides an overview of the
project, while Johnston et al (submitted) presents the first scientific
analysis of the S0 galaxies in the sample. Future works will further explore
galaxy formation, evolution, and morphological transformations through the
effects on the different components within the galaxies.

This paper is laid out as follows: Section 2 outlines the data and catalogs
used, Section 3 gives an overview of buddi and details of the fits that are
specific to the MaNGA data. Section 4 presents the results for the structural
parameters derived using buddi and the criteria used to determine which fits
are considered to be good enough for further analysis, and the stellar
populations analysis is given in Section 5. We then present a comparison of
the stellar populations estimates when the fits are repeated using the
structural parameters derived from fits to photometric data instead in Section
6, and finally we present our conclusions in Section 7.

##  2 Data

The data used in this paper came from the SDSS DR15 of the MaNGA Survey. It
should be noted that the MaNGA data products included as part of data release
16 (DR16, Ahumada et al., 2020) are identical to those in DR15, and this data
counts as the third data release for MaNGA. Data from the full survey became
public in SDSS DR17, and will be used for future works within the scope of the
BUDDI-MaNGA project.

MaNGA is an integral field spectroscopic survey using the BOSS spectrograph
(Smee et al., 2013) on the 2.5 m SDSS telescope (Gunn et al., 2006) at the
Apache Point Observatory, and is part of the Sloan Digital Sky Survey-IV
(SDSS-IV, Blanton et al., 2017). By the end of the survey in 2020, MaNGA
observed $\sim 10,000$ galaxies, of which 4824 have been released publicly as
part of DR15. The galaxies were selected to cover a wide range in mass and
morphology, with redshifts in the range $0.01<z<0.15$ (Yan et al., 2016). The
observations for each galaxy provide spatial coverage out to $\sim 1.5R_{e}$
for $\sim 66$ per cent of the total sample, and out to $\sim 2.5R_{e}$ for the
remaining galaxies. This coverage is achieved using a series of hexagonal IFUs
of different sizes, from the 19-fibre IFUs which have a 12″ diameter up to the
127-fibre IFUs with a diameter of 32″ (Drory et al., 2015). The final data has
a continuous wavelength coverage between 3600 to 10300 Å, with a spectral
resolution of $R\sim 1400$ at 4000 Å to $R\sim 2600$ at 9000 Å (Drory et al.,
2015).

The decomposition technique used in this paper is the buddi code (Johnston et
al., 2017), which was originally developed and tested on commissioning data
observed as part of the MaNGA survey. As part of these tests, a series of
simulated datacubes were created based on the MaNGA datacubes for galaxies
observed with the 127, 91 and 61-fibre IFUs, and these datacubes were modelled
with buddi to compare the extracted parameters with those used to create the
models. We found that buddi was able to successfully extract the physical
parameters and line strengths for 2 component fits in the 127 and 91-fibre
IFUs, while the scatter in the results increased in the smaller IFUs due to
the small number of resolution elements, critical to a successful
decomposition. In particular, the fits to the 61-fibre IFUs were found to
result in overestimates for the bulge Sérsic index and $R_{e}$ in about half
the simulated datacubes, and underestimates for the line strengths measured
from the extracted disc spectra. This effect on the line strengths is likely
due to the overmodeling of the bulges due to the effect on the Sérsic indices
and sizes, resulting in poor fits to the discs and low S/N for their spectra.
As a result, the data sample selected for this study was restricted to only
those galaxies observed with the 91 and 127-fibre IFUs. This limitation
consequently resulted in a total sample of 1,926 candidate galaxies in SDSS
DR15, which we used as our starting sample. The breakdown of the numbers of
galaxies used in the fits is given in Table 1.

Table 1: Overview of the galaxy sample modelled with the single Sérsic (SS) and Sérsic+exponential (SE) models | SS | SE
---|---|---
Number of galaxies (DR15) | 4,824 | 4,824
Number of candidate galaxies (IFU only) | 1,926 | 1,926
Number of candidate galaxies (MPP-VAC) | 1,719 | 1,705
Number of failed/crashed fits | 402 | 405
Number of bad fits | 279 | 609
Number of successful fits | 1,038 | 691
The number of candidate galaxies (IFU only) refers only to the number of
galaxies observed with the 91 and 127-fibre IFUs, while the MPP-VAC candidate
galaxies give the numbers of galaxies that have been flagged as having
successful fits in the MPP-VAC for each model. The failed and bad fits refer
to those that were attempted using the MPP-VAC parameters as initial
estimates, but in which Galfitm crashed during the fitting process (i.e. the
fit failed to converge) or where the fits completed but the fit parameters
were deemed unphysical and fell outside of the conditions set for good fits in
Section 4.2, respectively.

In addition to the MaNGA datacubes, several Value Added Catalogs from the DR15
were used in this project, namely the MaNGA PyMorph DR15 Photometric Value
Added Catalog (MPP-VAC; Fischer et al., 2019) and the MaNGA Deep Learning
Morphology Value Added Catalogue (MDLM-VAC, Domínguez Sánchez et al., 2018).
These catalogs will be described in more detail later in the paper.

##  3 Modelling the galaxies with buddi

Each galaxy datacube was modelled with buddi using both a single Sérsic (SS)
model and a Sérsic+exponential (SE) model, where the latter may be interpreted
as a fit to the bulge and disc respectively. buddi uses galfitm (Häußler et
al., 2013), a modified form of galfit (Peng et al., 2002, 2010), to model the
light profile of multi-waveband images of a galaxy simultaneously. The benefit
of using galfitm over galfit is that the variations in the structural
parameters of each component with wavelength can be modelled using user-
defined Chebychev polynomials. As a result, the fit to each image slice uses
information from the entire datacube, thus boosting the S/N over that of any
individual image and allowing reasonable estimates to be derived for the
structural parameters at wavelengths where the image slices have lower S/N.
This technique is especially powerful in separating different components of
different colours (Häußler et al., 2022), ideal to separate the spectra of
bulge and disc. While we encourage readers to be familiar with buddi, where a
full description can be found in Johnston et al. (2017), a brief overview and
workflow are presented below, and visualized in Fig. 1.

Figure 1: An overview of the steps to decompose a MaNGA datacube with BUDDI.
The free parameters are the integrated magnitude ($mag$), effective radius
($Re$), Sérsic index ($n$; in the SE fits, $n_{S}$ and $n_{exp}$ refer to the
Sérsic indices of the Sérsic and exponential component respectively), position
angle ($PA$), axes ratio ($q$) and residual sky value ($RS$). SS and SE refer
to the single Sérsic and Sérsic+exponential fits, respectively, and the
colours of each parameter identify how it varies with wavelength - dark blue
means it’s completely free with wavelength, purple is allowed to vary
according to a linear polynomial, light blue can be different for different
components, but remains constant with wavelength, and red is held fixed
according to the best fit polynomial from the previous step.

###  3.1 Preparation: Create the mask and PSF profile

The first step towards carrying out the fits with buddi is to prepare the
data, including the corresponding Point Spread Function (PSF), bad pixel mask
and uncertainty, or sigma, datacubes.

####  3.1.1 Bad-pixel mask

Since the MaNGA IFUs have hexagonal FOVs, the rectangular datacubes contain
many pixels with 0 values filling in the space outside the MaNGA field. If
left unmasked, galfitm will assume that these pixels are valid and represent
the sky level, which will affect the fit due to the sharp cut off where the
galaxies extend out of the MaNGA FOV. Consequently, the first step was to
create a bad pixel datacube to mask out these spaxels, which was extracted
from the mask extension within each MaNGA datacube. This extension gives
details on the quality of each spaxel in the datacube, including information
on the effects of the IFU footprint and missing data, and thus identifies
which spaxels should be used or ignored as a function of wavelength in the
analysis. Consequently the mask varies as a function of wavelength, and so the
next steps carried out with buddi applied the same binning steps to the mask
datacube that were used for the science datacube to ensure the correct spaxels
were masked out in all steps of the fit.

In the current version of the data, no further steps were taken to mask out
other objects within the FOV, such as foreground stars or
background/neighbouring galaxies, which may ultimately affect the final fits.
However, this step is to be included in the next round of fits using the data
released as part of DR17.

####  3.1.2 PSF model

Another part of the preparation was to create a model PSF datacube for each
galaxy, which will be convolved with the fit to all images in the datacube to
improve the fit. Yan et al. (2016) describes how the IFU fibre bundles used by
the MaNGA survey cannot alone provide an accurate PSF shape since some flux is
lost in each exposure to the gaps between the fibres, resulting in it being
spatially undersampled. While a three point dither pattern was used for all
observations to provide full spatial coverage and to create a more uniform
circular PSF (Law et al., 2015), additional steps were taken to identify the
shape of the PSF in order to refine the scale of the PSF observed with the
fibre bundles.

To refine the shape of the PSF, the images of the guide stars were used. For
each 15 minute exposure, a series of guider images were stored, and the
integrated PSF was created by bias subtracting and flat fielding these images
before stacking them. The resulting image is the time-integrated PSF, and
includes any smearing introduced by imperfect guiding. The typical FWHM of
this stacked PSF image is $\sim 1.5\arcsec$. The MaNGA data reduction pipeline
then modeled the focal-plane PSF observed by the fibre bundles with a double
Gaussian profile, and used this profile to refine the shape of the PSF created
from the guider images. The result is the reconstructed PSF, which is included
in the datacubes for the $griz$-bands. According to Law et al. (2016), the
MaNGA reconstructed PSF is nearly constant with wavelength, and the spatial
covariance matrix also varies only slowly with wavelength. Therefore, the
$griz$-band reconstructed PSF images describe the covariance in the data cubes
by providing sparse correlation matrices in the $griz$-bands, from which the
PSF image at any wavelength can be created by interpolation.

In this work, the PSF datacubes were thus created by interpolating between the
reconstructed PSF images in the $griz$-bands, using the filter transmission
curves to determine the relative flux of each PSF image at each wavelength.

####  3.1.3 Sigma datacube

To further improve the fit, a sigma datacube was created from the inverse
variance (IVAR) datacube included in the extension of the MaNGA datacube using
$sigma=1/\sqrt{IVAR}$. This datacube can be handed over to GalfitM as part of
the fit, and allows more accurate estimation of the flux uncertainty in each
pixel than an internal estimation by GalfitM from header keywords.

Finally, the target and sigma datacubes were converted from flux units of
erg/s/cm2/Å into Janskys. This conversion results in the spectra having a
constant magnitude zeropoint of 8.9 over the entire wavelength range, which is
one of the input parameters for GalfitM, and allows greater flexibility when
using buddi for data from different IFU spectrographs. Note that this
conversion is reversed at the end of the process (See Section 3.5).

###  3.2 Step 1: Obliterate the kinematics

The first step that buddi carried out was to measure and obliterate the
kinematics across the galaxy, thus ensuring that the image of the galaxy at
each wavelength is at the same rest-frame wavelength and giving a symmetric
light profile. This step is important because buddi uses GalfitM to model
symmetric light profiles for each galaxy in this study. The kinematics of the
galaxy would result in asymmetric images of the galaxy in the uncorrected
datacube at wavelengths around strong spectral features due to the red and
blue shifts of those features along the major axis of the galaxy.
Additionally, the decrease in velocity dispersion with radius would contribute
to further asymmetries in the light profiles of individual image slices, where
the light in the inner parts of the galaxy may reflect the wings of a spectral
feature while in the outskirts it comes from the stellar continuum. Fitting an
uncorrected datacube of a galaxy with buddi results in spectral features
similar to P Cygni profiles in the final spectra of each component, and so
these corrections are necessary for the quality of the final spectra.

In order to carry out these corrections, the datacubes were first binned using
the Voronoi tessellation technique of Cappellari & Copin (2003), and the
kinematics of the binned spectra were measured with the penalised Pixel
Fitting software (ppxf) of Cappellari & Emsellem (2004). This latter step was
carried out using the template spectra of Vazdekis et al. (2010), which are
based on the MILES stellar library of Sánchez-Blázquez et al. (2006). They
consist of 156 template spectra ranging in metallicity from $-1.71$ to
$+0.22$, and in age from 1 to 17.78 Gyrs. Having measured the kinematics
across the galaxy, the spectra in each spaxel within the datacube were shifted
to correct for the line-of-sight velocity, and broadened to match the maximum
velocity dispersion measured within the galaxy. To remove erroneous
measurements due to the background noise, a limit of S/N $=3$ per pixel at
$\sim 6000$Å was implemented to only include those spaxels that were not
dominated by noise.

###  3.3 Step 2: Fit the white-light image

Having obliterated the kinematics across the datacube, the light-profile
fitting can start. The first step is to create the white-light image of the
galaxy, and fit it using the SS and SE models, respectively. This step
provides a quick way to determine the best initial parameters and number of
components for the fits using an image with the maximum S/N. While this
procedure is mainly useful for manual fitting of small samples of galaxies, it
is still useful for the automated fits carried out in this work as it helps to
refine the initial estimates for the fit parameters (integrated magnitude,
$m_{tot}$; effective radius, $R_{e}$; Sérsic index, $n$; axis ratio, $q$; and
position angle, $PA$) before introducing the wavelength information. The
initial parameters for these two fits were taken from the MPP-VAC, in which
the $g$, $r$ and $i$-band images of the galaxies included in the DR15 MaNGA
sample from the NASA-Sloan Atlas catalog (hereafter NSA, Blanton et al., 2011)
were modelled with the PyMorph code (Vikram et al., 2010), which also uses
Galfit, albeit single-band. The MPP-VAC carried out these fits for both SS and
SE models. Therefore, for each galaxy, the $r$-band parameters from the MPP-
VAC for the corresponding model (SS or SE) were used as initial parameters for
the fits with buddi since this band falls closest to the centre of the MaNGA
spectra wavelength range. Additionally, the effective radius measurements from
the MPP-VAC were corrected for the pixel scale of the MaNGA datacubes, and the
position angle from the MPP-VAC was corrected to agree with how Galfit
measures the angle.

The MPP-VAC includes flags to identify failed fits within the sample for
either the SS or SE models, which usually occurred for galaxies with irregular
morphologies, in the process of merging or where multiple galaxies are
superimposed within the FOV. Consequently, only those galaxies marked as
having a successful fit in the MPP-VAC were modelled with buddi. This
additional constraint reduced the total number of candidate galaxies that
could be fitted to 1,710 for the SS model, and 1,705 for the SE model (listed
as Number of candidate galaxies (MPP-VAC) in Table 1). The fits with each of
these two models were carried out independently, resulting in some galaxies
that were modelled successfully with one model but not the other.

###  3.4 Step 3: Fit the narrow-band images

Having carried out the fit to the white light image, the next step is to
introduce variations due to wavelength. If the fit to the white-light image
was successful (i.e. GalfitM converged on a solution and didn’t crash), the
datacube was rebinned into a series of 10 narrow-band images along the
wavelength direction, where these images have higher S/N than any individual
image slice within the datacube. While the user can define the number of
narrow band images, we decided to use 10 since it gave a good compromise
between the speed of the fits (more images means more free parameters and
slower fits) and a good coverage of the wavelength range. The initial
estimates for the fit parameters for these images were taken as the fit
parameters from the fits to the white light images in the previous step. In
each case (SS and SE), the first fit to these narrow band images was allowed
complete freedom in the fit parameters, simulating the results obtained by
running Galfit on each image independently. This step gives a good idea of how
the structural parameters vary as a function of wavelength. In manual fits for
small samples of galaxies, these results would be useful for determining the
correct Chebychev polynomials for each parameter to reflect the general
variation as a function of wavelength. In these automated fits however, the
Chebychev polynomials are predefined. But it was still decided to run these
free fits since they may be useful for identifying galaxies that are not so
well modelled with these set polynomials for a future follow-up study.

Having completed the free fits, the fits were then repeated using Chebychev
polynomials to constrain the parameters for effective radius ($R_{e}$), Sérsic
index ($n$), axis ratio ($q$) and position angle ($PA$) as a function of
wavelength while leaving the integrated magnitude ($m_{tot}$) free. In the SS
fits, a polynomial of order 2 was selected for the $R_{e}$ and $n$ and an
order of 1 used for the $PA$ and $q$, following the approach of Vulcani et al.
(2014), while in the SE fits, polynomials of order 1 (constant with
wavelength) were used for these parameters. In both cases, the integrated
magnitude was allowed full freedom. This additional degree of freedom in the
sizes and Sérsic indices for the SS fits effectively mimics colour gradients
across the galaxy and allows for a better single component fit in the case of
2-component galaxies which would be more bulge dominated in the inner regions
and more disc dominated in the outskirts. In such cases, the galaxy would
appear larger and with a lower Sérsic index at bluer wavelengths, and more
compact and potentially with a higher Sérsic index at redder wavelengths.
Thus, allowing these variations with wavelength enables GalfitM to derive a
more accurate fit to the light profile of the galaxy as a whole.

###  3.5 Step 4: Fit the image slices and extract the decomposed spectra

Once the structural parameters have been determined in the narrow band images,
it is now possible to determine the magnitude/flux at each wavelength, which
ultimately will be used to derive the spectra for each component. This step
was carried out by fitting the unbinned image slices from the kinematics-
obliterated datacube. In order to reduce the computing time and to avoid
memory issues, each datacube was split up into batches of 10 consecutive image
slices, which were modelled by GalfitM simultaneously. In these fits, the
structural parameters ($R_{e}$, $n$, $PA$, and $q$) were held fixed for each
image slice, using the values that were determined in the previous step, while
the integrated magnitude was left completely free. The initial estimates for
the magnitudes for each image slice were determined by interpolation at the
corresponding wavelength between the fits to the binned images. It should be
noted at this point that no special treatment was applied for galaxies
containing emission lines. Since the parameters were held fixed according to
the polynomials used, any emission lines that displayed a similar light
profile to one of the components was included in the fit, and thus the
spectrum, for that component. If however the emission lines followed a
different distribution, GalfitM would still model the underlying galaxy and
the emission line features would appear in the residual images and datacube.
Tests were carried out comparing the stellar populations derived from the
Sérsic and exponential component spectra with those from the original datacube
in galaxies that contain emission lines, and no significant difference in the
final results was seen. However, this topic will be explored in greater detail
when we repeat the fits to the DR17 dataset.

Figure 2: Top row: the MaNGA white-light image of 8445-12702, the best fit
model for the SE fit, and the residual image. Middle row: the model images for
the exponential and Sérsic components, including information on the $R_{e}$
and $n$ from the fits, and the SDSS $gri$-band image, downloaded using the
Marvin Python client (Cherinka et al., 2019). All images from the MaNGA data
have been scaled to the same flux range for easier comparison. Bottom row: The
normalized integrated flux of the galaxy (black) from the MaNGA datacube, with
the spectra extracted for the exponential and Sérsic components in blue and
red, respectively. The dark and light grey lines represent the residuals from
faint asymmetric features and background objects and the sky background,
respectively. The feature in the sky spectrum at $5577$Å is the [OI] sky line.
The purple line represents the combined exponential+Sérsic+sky spectrum,
superimposed upon the integrated spectrum of the galaxy. On the right is a
zoom-in of the normalised exponential and Sérsic spectra over the spectral
region marked by the grey band on the left plot, showing the differences in
the line strengths of the H$\beta$ feature between the discs and the bulge.

Once the fits to these image slices were completed, the spectra for each
component were created in 2 ways. First, as one-dimensional integrated spectra
for the galaxy component as a whole, produced by plotting the integrated flux
(derived from the magnitude from GalfitM) of that component as a function of
wavelength, and second as model datacubes, created using the best-fit model
images of each component at each wavelength from GalfitM. In both, the fluxes
of these spectra were converted from Janskys back into the original flux
units. An example of the fit to galaxy 8445-12702 and the spectra extracted
for the Sérsic and exponential components are shown in Fig. 2, along with a
zoom in on the H$\beta$ feature to show the differences in the final spectra.
The images created from the MaNGA data have all been scaled to the same flux
levels for easier comparison, and the residual image reveals faint spiral arms
within the disc of this galaxy that cannot be seen in the original MaNGA
datacube or the SDSS $gri$-band image.

The results presented and discussed in the rest of this paper use the one-
dimensional integrated spectra. Due to the polynomials used in the fits to the
image slices, the decomposed datacubes show the same spectrum, and thus
stellar populations, in every spaxel. Therefore, while these datacubes do not
show any variations across the bulge or disc components, they can still be
useful for comparing the bulge and disc luminosity fractions across the galaxy
and thus better understanding the stellar population gradients seen within a
galaxy (e.g. see Figures 14, 15 and 16 of Johnston et al., 2017, and Figure 7
of Johnston et al., 2018). Additionally, they can be used to create a residual
datacube that is free from the light of the galaxy, which can be useful for
studying faint background or neighbouring sources whose light would otherwise
be contaminated by the light of the main galaxy (e.g. see Solimano et al,
submitted).

##  4 Overview of the fits

As described in Section 2, 1926 candidate galaxies were identified from the
total sample included in the DR15 by selecting only those observed with the 91
and 127-fibre IFUs. However, not all of these galaxies had successful fits,
and consequently fit parameters, in the MPP-VAC. By including only those
galaxies with successful fits in the MPP-VAC, the sample was reduced to 1719
and 1705 for the SS and SE fits, respectively. Of these galaxies, good fits
with buddi were achieved for 1038 (SS) and 691 (SE) galaxies, corresponding to
a success rate of $\sim 70\%$ and $53\%$, respectively. The remaining galaxies
fell into two categories- those in which the fit with GalfitM crashed and/or
failed to converge (see Section 4.1), and those that were considered poor fits
due to unphysical structural parameters (see Section 4.2). An overview of
these numbers is given in Table 1.

In this section, we will explore the properties of the fits, the criteria used
to identify a good fit, and the reasons for some fits failing.

###  4.1 Common reasons for failed/crashed fits

In around $23\%$ of the model fits by GalfitM to the candidate galaxies (i.e.
those with successful fits in the MPP-VAC), the fits crashed or failed to
converge, either when modelling the white-light image, the narrow band images,
or the image slices (see Sections 3.3, 3.4 and 3.5, respectively). There are
several reasons for these fits to fail, which are discussed below.

One reason for many of the failed fits is due to the small FOV of the MaNGA
images compared to the SDSS imaging data used for the fits in the MPP-VAC.
Since the MaNGA galaxies are only observed out to 1.5 or 2.5 $R_{e}$, limited
information is available for the outskirts of the galaxies. This issue becomes
particularly problematic for more face-on galaxies, where the MaNGA FOV has
few or no pixels representing the light from the outskirts of the galaxy or
purely the sky background. As a result, in these cases, the fit fails due to
insufficient information being available.

Another issue is that foreground and background objects that fall within the
MaNGA FOV are not masked out in the fits with buddi\- the masks created only
represent the spaxels within the datacube that contain no light from the IFU
fibres. Any bright, unmasked objects in the field can affect the fits by
distorting the shape of the model created by GalfitM. While this issue is
limited by the small FOV of the MaNGA datacubes, the effect is not negligible.
In a future version of the fits to the full MaNGA sample, the masking
algorithm will be improved to identify such contaminating sources and to mask
them out.

While the MPP-VAC gives a flag for successful fits, which were used as initial
estimates for the fits by buddi, in some cases the fit parameters given in the
MPP-VAC were unphysical. For example, a small number of galaxies showed axes
ratios for one component as being $<0.1$, or having very small effective radii
(e.g. less than half a pixel width in the SDSS imaging data). Consequently, in
some cases, using these unphysical parameters as initial estimates for the
fits with buddi resulted in some of the fits failing.

Finally, another reason for some fits failing is due to the models either
containing too many/few components. For example, attempting to fit a galaxy
with a complex morphology, such as with a bulge, disc, bar and spiral arms,
with the SS or SE models may result in a poor fit due to the complexity of the
galaxy. A similar but related issue is caused where one component is
particularly faint at specific wavelengths. For example, in some galaxies it
was found that the bulge was very bright at redder wavelengths but very faint
in the blue end of the spectrum. As a result, the fits to the image slices
failed at bluer wavelengths since the bulge was too faint to be reliably
detected, but were successful at redder wavelengths where the bulge was
brighter.

While the reasons outlined above account for the common issues that led to the
majority of the crashed fits, they do not represent an exhaustive list of all
the possible reasons that caused the fits to fail.

###  4.2 Classification of a good fit

Of the fits that completed successfully and provided spectra for each
component included in the models, a further selection was applied to
distinguish between good (i.e. reliable) and bad (unreliable) fits. This
selection criteria was based on the feasibility of the final structural
parameters of the fit, where those that converged on unphysical parameters
were considered bad fits, and were applied to the fits to the narrow-band
images. The following criteria were used to identify good fits:

  1. 1.

$\Delta mag_{r}\leq 2.5$ (SE models only)

  2. 2.

$0.25\leq R_{e}\leq 50\arcsec$,

  3. 3.

$0.205\leq n\leq 7.95$,

  4. 4.

$0.1\leq q\leq 1.0$.

In the SE models, if only one component was found to fall outside of these
parameters, the fit to the whole galaxy was considered bad. The limit on the
magnitude difference in the SE fits was selected since it represents a case
where the minimum light fraction of both components is $10\%$. A visual
inspection of the fits showed that in many cases where $\Delta mag_{r}>2.5$,
the galaxy was well modelled with a single Sérsic profile. Thus, in these
cases, the SE fits ‘failed’ because the galaxies are single component systems,
i.e. they do not contain a distinct bulge and disc.

The lower limit for the $R_{e}$ corresponds to half a spaxel in the MaNGA
datacube ($\sim 10\%$ of the PSF FWHM), which was considered the minimum
reasonable size that could be determined with galfitm. Häußler et al. (2013)
and Häußler et al. (2022) have shown that, if the PSF is well known,
recovering a object size well below 1 pixel is feasible without systematic
bias (down to 0.3 pixels for one-component fits in Häußler et al. 2013 and 0.5
pixels for two-component fits in Häußler et al. 2022). From fits to single
band images, Gadotti (2008) recommended a lower limit of $R_{e}$ of 0.8 times
the half width at half maximum (HWHM) of the seeing PSF (i.e. 0.6″ in this
work). We therefore looked at the effect on the final sample using different
lower limits to the $R_{e}$, finding no cases with $R_{e}<0.6\arcsec$ for the
SS models, and only 1 exponential and 8 Sérsic components with
$R_{e}<0.6\arcsec$ for the SE fits (with the majority of these still having
radii of greater than 0.5″). Since so few galaxies are affected by increasing
the lower limit, we decided to use the lower limit for $R_{e}$ based on the
multi-band fits of Häußler et al. (2013, 2022). The upper limit in $R_{e}$ is
larger than the FOV of all MaNGA IFUs, and was selected to try to maximise the
sample of good fits while eliminating any obviously unreliable fits. In
Johnston et al. (2017), It was found that for more edge on galaxies observed
with MaNGA, galfitm can overestimate the effective radius, sometimes to a
value outside of the radius of the FOV, since only the inner regions and the
minor axis of the galaxy falls within the FOV. However, despite this issue,
the residual images show a very good fit to the galaxy within the FOV, and so
the spectra extracted for both components were considered reliable. However,
in these cases in particular, it should be noted that the resulting spectra
will only represent the inner regions of the galaxy within the FOV available.

The fits were carried out using a range of Sérsic indices of between 0.2 and
8, which are the typical upper and lower limits generally imposed upon similar
fits in the literature. In order to avoid using any models that hit these hard
limits and thus failed to converge, we followed Häußler et al. (2022) to use
the range $0.205\leq n\leq 7.95$. This limitation had the largest effect on
the number of galaxies considered to have a ‘good’ fit, and in the next
version of the fits to the DR17 data we plan to revisit the fits that hit
these limits to try to improve the models using different starting parameters
or a narrower range for the Sérsic index.

The lower limit on the axes ratio rules out poor fits due to unmasked
foreground stars within the FOV that galfitm attempted to include in the fit.
This limit are in alignment with the sample selection carried out in Häußler
et al. (2013) and other works using GalfitM.

$\sim 7\%$ and $\sim 23\%$ of the fits to candidate galaxies resulted in bad
fits based on the criteria above for the SS and SE models, respectively. It
was found that in general, the fits that resulted in unphysical parameters
were either nearly face-on galaxies, where it was difficult for galfitm to
reliably model the sky background or the outskirts of the galaxy, or those
that showed other objects within the MaNGA FOV, such as foreground stars,
neighbouring/background galaxies, bright spiral arms or star-forming regions.
While some of these cases resulted in the fits crashing (see above), others
led to distorted models for the galaxy and unphysical structural parameters.

The presence of bars should also be taken into account when considering the
fits as this component may affect the fit to the bulge, thus affecting the
structural parameters and the derived spectra. While a full analysis of the
effect of bars on the fits is beyond the scope of this paper, we can however
look at the expected fraction of bars in the sample of galaxies. The MDLM-VAC
gives the probability for each galaxy containing a signature of a bar from
Galaxy Zoo 2 (Willett et al., 2013) and Nair & Abraham (2010), which uses data
from the SDSS DR4 (Stoughton et al., 2002). By adopting a limit of 0.5 for the
presence of a bar, we find that 112 and 126 galaxies successfully fitted with
the SE model have a clear bar signature according to Galaxy Zoo 2 and Nair &
Abraham (2010), respectively. Of these galaxies, 72 galaxies are in common
between the two catalogs, accounting for $\sim 10$ percent of the SE sample of
galaxies with successful fits. Thus, the majority of the galaxies modelled
with the SE model in this work can be considered unbarred.

A summary of the number of candidate galaxies versus the number of galaxies
that were modelled successfully with buddi is given in Table 1. Throughout the
rest of this paper, the discussion will focus on the successful fits using the
criteria above, unless specified otherwise. It should be noted at this point
that the classification of successful fits does not take into account the S/N
of the extracted spectra, and future works using the BUDDI-MaNGA data may
choose to use their own selection criteria depending on their science goals.

Figure 3: Overview of the masses (left), morphologies (middle) and redshifts
(right) for ‘good’ fits with the SS (top) and SE (bottom) models. The grey
bars represent the morphologies of all galaxies where fits where attempted
(i.e. observed with the 91 and 127-fibre IFUs with successful fits in the MPP-
VAC for SS or SE profiles).

###  4.3 Distributions of the successful fits

Having identified the galaxies with successful fits within the sample, we can
now explore the properties of those galaxies components. The distribution of
the galaxies with successful fits in terms of total mass, morphology and
redshift are shown in Fig 3. The masses and redshifts were taken from the NSA,
while the morphologies come from the MDLM-VAC, where early type galaxies
(ellipticals and S0s) are considered to have T-Type $<0$ while late type
(spiral) galaxies have T-Types $>0$ and irregular galaxies are identified with
T-Type $=10$. The figure also shows the distribution of the full sample of
MaNGA candidate galaxies from DR15 (i.e. those with initial estimates for the
fit parameters from the MPP-VAC and observed with the 91 or 127-fibre IFUs) in
grey for comparison. It can be seen that the distribution of the galaxies
successfully modelled by buddi do follow approximately the same shape as the
full DR15 sample, with approximately $40-50$% of galaxies in each bin
successfully modelled in SE, with significantly more in SS. The morphologies
show peaks at T-Types -2.5 and 4.5, corresponding to early and late types
respectively, and do not appear to show any bias against a certain T-Type, and
the redshifts rise sharply to $z\sim 0.03$ with a longer tail out to $z\sim
0.15$. The shapes for the distributions for the SS and SE fits are very
similar for morphology and redshift, but they show a larger difference in the
galaxy stellar mass, where the SS models successfully fit more lower mass
galaxies ($\text{log}(M/M_{\odot})<10$) than the SE fits. One contributing
factor to this effect could be that the lower mass galaxies were observed with
the smaller IFUs, in this case the 91-fibre IFU, where it’s harder to achieve
a good fit with 2 components. Another consideration is that, in general, it is
harder to separate the components in fainter galaxies due to lower S/N.

However, in general, the sample of DR15 galaxies that have been successfully
modelled with buddi follow similar distributions in terms of the masses,
morphologies and redshifts as the full MaNGA DR15 sample, indicating that
these fits have introduced no significant bias to the sample.

###  4.4 Statistics of the fit parameters

The histograms in Fig. 4 present the distribution for each of the structural
parameters ($R_{e}$, $n$, $PA$ and $q$) for all the successful fits with buddi
in blue, with the distribution of the initial estimates from the MPP-VAC for
the same galaxies in red for comparison. The distributions for $R_{e}$ in all
plots show a peak at $R_{e}<10\arcsec$ with a long tail to larger radii. This
trend is likely to be due to a selection bias in the original sample, where
the IFU-bundle used to observe each galaxy was selected to cover the inner
1.5-2.5 $R_{e}$. As a reference, the vertical dashed and dot-dashed lines in
these plots mark the radii of the 91 and 127-fibre IFUs, respectively. The
fits to some of the galaxies with large values of $R_{e}$ were checked by eye,
and it was found that many of them have high inclinations and appear very
edge-on, making it hard to accurately measure the $R_{e}$ due to the small
FOV. In the SE fits, it can be seen that the mean $R_{e}$ value for the
exponential components is higher than the Sérsic component. Assuming these
components model the discs and bulges respectively, this result reflects the
scenario where the discs are more extended and the bulges more compact.

Figure 4: Overview of the fit parameters for ‘good’ fits, defined as having
$0.25<R_{e}<50\arcsec$, $0.205<n<7.95$ and $q>0.1$. The red line represents
the distribution in the fit parameters from the MPP-VAC for the same sample of
galaxies for comparison. The vertical dashed and dot-dashed lines in the top
row indicate the radii of the FOV for the 91 and 127-fibre IFUs respectively.
The insets in each plot show the histograms for the ratio of the $R_{e}$ and
$n$ from buddi relative to the MPP-VAC values for the same galaxy and
component (top two rows), and the differences in the buddi and MPP-VAC values
for the $PA$ and $q$ in the bottom two rows. The numbers in the insets reflect
the median value for the distributions in those histograms (i.e. the median
value for the ratios or differences), and the dashed grey lines reflect ratios
of 1 and differences of 0 as a guide.

The Sérsic index distributions are also interesting, showing a bias towards
lower values in the SS plot that peak at around $n=1$. The distribution in the
morphologies in Fig. 3 shows that the majority of the sample are late-type
galaxies (T-Type $>0$), thus explaining the bias towards lower $n$. However,
the fits to the Sérsic component in the SE fits also show a peak at very low
$n$. There are several possible reasons for this trend. For example, it could
be due to the majority of bulges in this sample of galaxies being closer to
pseudobulges than classical bulges (using $n<2.0$ and $n>2.0$ respectively,
using the definition of Fisher & Drory, 2008), or that GalfitM has ‘flipped’
the components, such that the exponential profile fits dominates the light in
the inner regions and the Sérsic profile models the more extended component.
This phenomenon will be explored further in Section 4.6.

The distribution in the $PA$ is relatively flat for both sets of fits, as
expected, and the axis ratio ($q$) for the SS fits are relatively flat up to
$q\sim 0.8$, where they start to drop. While this result may reflect the
sample selection in the larger DR15 sample of galaxies, another significant
contributing factor is that it’s harder to get a good fit to more face-on
galaxies in the MaNGA sample due to the small fields of view, resulting in the
outskirts of the galaxy and the sky background not being included in the fit.
Another factor to consider is that determining axis ratios for more face on
galaxies is harder than more edge on galaxies, i.e. the difference from axes
ratios of 0.9 and 1.0 is much smaller than from 0.05 to 0.15. The SE fits, on
the other hand, show a peak at $q\sim 0.65$ for both components, with the fits
to the exponential component dropping faster to higher values of $q$ while the
Sérsic profiles drop more steeply to lower values for $q$. Again, assuming
that these two profiles generally model the discs and bulges respectively,
these trends simply reflect that the discs have higher ellipticities while the
bulges appear rounder, as would be expected.

###  4.5 Comparing the fit parameters with the MPP-VAC

Since the MaNGA images have a smaller FOV and slightly lower spatial
resolution than the imaging data used for MPP-VAC, the fit parameters for each
galaxy derived by both methods may be different because buddi has less
information to model the outskirts of the galaxy and the sky background. To
explore the effect of this smaller field of view on the reliability of the
fits, Johnston et al. (2017) created a series of simulated datacubes based on
the MaNGA data for different IFU sizes, and ran these datacubes through buddi
using an SE model to compare the derived structural parameters and stellar
populations with those used to create the datacubes. They found that for the
datacubes based on the 127 and 91-fibre IFUs, the final structural parameters
and the stellar populations derived from the resulting spectra were consistent
with the properties that went into the model datacubes. They therefore
concluded that these two IFU sizes in the MaNGA data have sufficient
resolution elements to obtain a reliable two component fit. In the smaller IFU
sizes however, the structural parameters and, in particular the stellar
populations, were found to become increasingly unreliable. However, those
tests were run on a small number of simulated datacubes. With the data set
used in this work, it is possible to repeat these tests in a more
statistically significant way by comparing the fit parameters to those derived
from photometric data and provided in the MPP-VAC.

The red lines in the histograms in Fig. 4 represent the distributions in the
fit parameters from the MPP-VAC for the same sample of galaxies. In general,
the distributions are very similar, indicating that in the majority of these
cases the MaNGA FOV is sufficiently large to achieve a good fit with galfitm.

Figure 5: A comparison of the fit parameters derived using buddi with the
input parameters from the MPP-VAC for galaxies considered to have ‘good’ fits
in both catalogs. Red points reflect galaxies identified as having been
flipped by buddi but not in the MPP-VAC. The layout follows Fig. 4

To further explore the differences in the fit parameters for each component
modelled within each galaxy, the insets in each plot within Fig. 4 directly
compare the parameters between buddi and the MPP-VAC for each galaxy, plotting
the ratio of the $R_{e}$ and $n$ from buddi over the input value from the MPP-
VAC in the top two rows, and the physical difference between the two fits for
the $PA$ and $q$ in the bottom two rows. The median values for each
distribution are given in the top right of each inset, and are listed in Table
2 along with the values of the first and third quartiles of the distributions.
It can be seen that in all cases, the distributions peak at around 1 for the
ratios, and around 0 for the differences, indicating that, in general, the
fits by buddi are not too different to the initial parameters taken for that
galaxy or component from the MPP-VAC. Figure 5 also presents the fit
parameters from buddi and the MPP-VAC as scatter plots. Again, it can be seen
that the fit parameters are generally consistent, but with larger scatter for
the $R_{e}$ and $n$. For example, one can see that buddi appears to over-
estimate the $R_{e}$ for the single Sérsic fits to larger galaxies, which is
likely to be an effect of these galaxies filling more of the FOV and being
poorly modelled by a single component. The Sérsic indices for the Sérsic
components in the SE fits also display large scatter. Again, this trend may be
an artefact from the effects already mentioned, but in some cases they may
also be the result of the components being flipped by buddi and not in the
MPP-VAC, or vice versa. In other words, the Sérsic component may reflect the
more extended component in the buddi fit but the more compact component in the
MPP-VAC. This phenomenon will be discussed further in Section 4.6, but for now
those galaxies that have been identified as flipped by buddi but not in the
MPP-VAC are highlighted in red in Fig. 5, and do appear to account for some of
the scatter at low $n$ with buddi. Another effect may be the different
approaches used in this work and the MPP-VAC for fitting galaxies with high
Sérsic indices, where in the MPP-VAC, the authors repeated the fits to the
bulge components that converged on $n=8$ with a reduced upper limit on the
Sérsic index constraining the fit, generally with $1<n_{lim}<3$. They then
evaluated each fit in terms of the $\chi^{2}$ of the final fits, and selected
the better fit, which was often the one with the lower limit for $n$. This
process of repeating the fits explains the higher frequencies for $n\sim 1$ in
the MPP-VAC catalog seen in Fig. 4, but may introduce potential bias in the
fits to artificially low Sérsic indices and leads to an inhomogeneous fitting
sample due to the use of different constraints. Finally, while Häußler et al.
(2013) and Häußler et al. (2022) show that multi-waveband fits, such as those
used in this study, allow sizes and Sérsic indices to be recovered more
accurately, they still find that the Sérsic index is the hardest parameter to
derive accurately when applying light profile fits for both one and two-
component models. Therefore, the scatter seen in the Sérsic indices in Fig. 5
is to be expected.

Table 2: Overview of the distributions in the ratios of the $R_{e}$ and $n$ from buddi relative to the MPP-VAC values for the same galaxy and component, and the differences in the buddi and MPP-VAC values for the $PA$ and $q$, giving the median values and the values of the first and third quartiles. | Q1 | Median | Q3
---|---|---|---
SS |  |  |
$R_{e}$ | 0.96 | 1.08 | 1.48
$n$ | 0.90 | 1.09 | 1.37
$PA$ | -0.45 | 0.35 | 1.05
$q$ | -0.02 | 0.00 | 0.01
SE, exponential |  |  |
$R_{e}$ | 0.73 | 1.04 | 1.30
$PA$ | -2.51 | 0.36 | 4.00
$q$ | -0.07 | -0.01 | 0.06
SE, Sérsic |  |  |
$R_{e}$ | 0.72 | 0.98 | 1.21
$n$ | 0.63 | 0.90 | 1.48
$PA$ | -8.31 | 0.04 | 6.43
$q$ | -0.07 | -0.01 | 0.03

###  4.6 Flipped galaxies

In the MPP-VAC, Fischer et al. (2019) described the phenomenon of ‘flipped’
galaxies, where the Sérsic component models the more extended structure while
the exponential component was found to be more compact. They identified the
flipped galaxies as those having $R_{e,\text{exp}}<R_{e,\text{S\'{e}rsic}}$
and $n_{\text{S\'{e}rsic}}<1$, and thus labelled the bulge and disc components
in their fits accordingly.

This phenomenon is explored in this data set in Figure 6, which compares the
$R_{e}$ of the Sérsic and exponential components, colour-coded according to
the Sérsic index of the Sérsic model. It can be seen that the majority of
galaxies with $R_{e,\text{exp}}<R_{e,\text{S\'{e}rsic}}$ fall into two
categories- those with very high Sérsic indices (i.e. $n>5$), representing
bright cores and broad wings ($\sim 20\%$ of the sample, displayed as light
red points), and those with Sérsic indices $n<1$ ($\sim 75\%$ of the sample,
blue points). Consequently, in the majority of cases where the Sérsic
component models the more extended structure within the galaxy, it also has a
Sérsic index of below 1. Clearly, this scenario does not fit with the
assumption that the Sérsic and exponential components always model the bulge
and disc respectively, but is in agreement with the findings of Fischer et al.
(2019).

Figure 6: Comparison of the $R_{e}$ for the Sérsic and exponential components
in each SE fit, with blue, red and light red points representing $n<1$,
$1<n<5$ and $n>5$, respectively.

We followed Fischer et al. (2019) and identified flipped galaxies as those
with $n_{\text{S\'{e}rsic}}<1$ and $R_{e,\text{exp}}<R_{e,\text{S\'{e}rsic}}$.
However, before officially identifying these galaxies as flipped, a final
consistency check was carried out. In Fig. 7, the Sérsic-to-Total and Bulge-
to-Total flux ratios for each galaxy are plotted against the morphology. In
this plot, the flipped galaxies are highlighted in red. If the bulges and
discs have been correctly identified, one would expect that the Bulge-to-Total
flux ratio would decrease with increasing T-Type as one moves from early to
late type galaxies. This trend can clearly be seen in the plot for the Bulge-
to-Total flux ratios, while the Sérsic-to-Total light ratios are actually seen
to increase for the later type spirals. Consequently it can be seen that in
this sample, the identification of flipped galaxies appears to work, and that
the majority of the flipped galaxies have later type morphologies.

In this sample, $\sim 33\%$ of the galaxies are considered to be flipped. This
number is significantly higher than the $\sim 13\%$ found by Fischer et al.
(2019), which may be due to a combination of factors. For example, the MaNGA
images used for the fits in this work use a smaller sample of galaxies with a
smaller FOV and lower spatial resolution, which may introduce some inherent
biases to the fits. Furthermore, it could also be due to differences in the
fitting procedures, where Fischer et al. (2019) carried out repeated fits for
galaxies with $n_{\text{S\'{e}rsic}}=8$ to constrain the upper limit for the
Sérsic index. This additional step was not carried out in this study, and may
have some effect on whether some galaxies are flipped. And finally, the
initial parameters used for the fits with buddi came from the MPP-VAC, and so
if a galaxy was flipped in that sample, the buddi fit also started as being
flipped.

Due to the presence of likely flipped galaxies in both this work and the MPP-
VAC, we follow the methodology of Fischer et al. (2019) to report the sizes of
both components in terms of $R_{e}$ instead of using the scale length,
$R_{d}$, for the size of the exponential component. However, should one want
to use the scale length of the exponential component, it can be calculated
from the effective radius using $R_{d}=R_{e}/1.678$ (Meert et al., 2015).

Figure 7: The Sérsic-to-Total (top) and Bulge-to-Total (bottom) flux ratios of
each galaxy as a function of T-Type. The solid line represents the rolling
median, with the dashed lines showing $\pm 1\sigma$. The red points mark the
galaxies that were identified as being flipped.

##  5 Overview of the Stellar Population Properties

Having cleanly extracted the spectra for each component and identified the
galaxies with good fits, the next step was to derive the stellar populations.
A detailed analysis of the stellar populations in each component as a function
of galaxy morphology, mass etc is beyond the scope of this work, and will be
explored in future papers. However, an overview of the basic stellar
populations properties is presented here, alongside some further tests of the
reliability of the fits using a more statistical sample than was available in
Johnston et al. (2017).

###  5.1 Analysis of the Mass-Weighted Stellar Populations

The mass-weighted stellar populations were measured from each spectrum through
full-spectral fitting using ppxf. A regularized fit was applied to each
spectrum using a linear combination of template spectra of known relative ages
and metallicities from the MILES evolutionary synthesis models of Vazdekis et
al. (2015). These model spectra span an age and metallicity range of
$0.03-14\,$Gyr and [M/H]=$-2.27$ to +0.40 respectively, and were created using
the BaSTI isochrones (Pietrinferni et al., 2004, 2006). The fits were also
carried out with the template spectra created using the Padova isochrones
(Girardi et al., 2000), but while the results were consistent between the two
sets of models, the sparser sampling in the high-metallicity regime led to
some artefacts in the metallicities measured after regularization.
Consequently, the results presented in this section were derived using the
BaSTI isochrone templates. The best fit models were convolved with a
multiplicative Legendre polynomial of order 10 to model the shape of the
continuum, thus reducing the sensitivity to dust reddening and omitting the
requirement of a reddening curve (Cappellari, 2017).

The regularization process is designed to smooth the variation in the weights
of the templates with similar ages and metallicities. This step reduces the
chances of template mismatch, which contributes to the noise in the stellar
population parameters, and attaches a physical meaning to the weights assigned
to the templates in term of the star formation history, age and metallicity
distribution within an individual galaxy. In order to determine the level of
regularization required, an unregularized fit is first applied to each
spectrum to measure the $\chi^{2}$ value for the fit. The noise spectrum was
then scaled appropriately until $\chi^{2}/N_{DOF}=1$, where $N_{DOF}$ is the
number of degrees of freedom in the fit (i.e. the number of unmasked pixels in
the input spectrum). Finally, the fit to the spectrum was repeated using the
scaled noise spectrum and increasing the regularization value in steps until
the $\chi^{2}$ of the fit increased by $\Delta\chi^{2}=\sqrt{2\times
N_{DOF}}$. This value represents the limit between a smooth fit that still
reflects the star-formation history of the galaxy and one that has been
smoothed excessively. However, it is important to note that this fit may not
reflect the true star-formation history of the galaxy, in particular for
variations in the star-formation activity over shorter timescales than the
models allow. Consequently, these regularized fits are designed to reduce the
age-metallicity degeneracy between spectra. The template spectra used in these
fits are modelled for an initial birth cloud of $1\text{M}_{\odot}$, meaning
that the final weight of each template reflects the ‘zero-age’ mass-to-light
ratio of that stellar population. As a result, the smoothed weighting of
template spectra with similar ages and metallicities represents a simplified
star-formation history of the component being modelled by defining the
relative mass contribution of each stellar population (see e.g. McDermid et
al., 2015).

Figure 8: An example of the fit to galaxy 8991-12704. The top row shows the
MaNGA white-light image (left), and SDSS $gri$-band image with the MaNGA FOV
outlined (middle), and the white-light residual image from the SE fit (right).
The second row shows the best fit for the SS model (left) and the exponential
and Sérsic components for the SE fit (middle and right). For each model, the
smoothed age-metallicity grid and the ppxf fit to the integrated spectrum for
that component are given below in the bottom two rows. Note that in the bottom
row, the gas spectrum and the residuals have been offset for clarity, and
several key emission and absorption lines have been identified in the fit to
the Sérsic component spectrum for reference.

An example of the regularized SFH derived for the spiral galaxy with the MaNGA
plate-IFU number 8991-12704 is shown in Fig. 8. This figure includes the MaNGA
white-light image of the galaxy alongside the SDSS $gri$-band image, the
residual image after subtracting the SE model, and the best-fitting model
images for the SS model and the exponential and Sérsic components in the SE
fit. Below each model image are the smoothed age-metallicity weights grids,
which represent the SFHs for the spectra extracted using the corresponding
models, and the fit to the spectrum by ppxf. For this galaxy, one can see that
the SFH derived from the SS fit shows that the galaxy has undergone an
extended star formation history, with the majority of the mass being built up
between $1-10$ billion years ago. When we consider the SFHs of the Sérsic and
exponential components, their independent SFHs become clear. The exponential
component shows generally younger stellar populations than the Sérsic
component, and was built up over a longer timescale, while the Sérsic
component shows that the majority of its stellar mass was formed early in the
lifetime of the galaxy with only a tiny fraction of the mass formed more
recently. These results are consistent with the model that the exponential and
Sérsic components represent the disc and bulge respectively, and the typical
scenario where spiral galaxies contain an old bulge surrounded by a star
forming disc. Thus, this figure demonstrates the strength of using buddi to
cleanly disentangle the stellar populations of distinct components within
galaxies.

Figure 9: Ages (top) and metallicities (bottom) as a function of the total
galaxy mass for the SS fits (left) and the discs and bulges of the SE fits
(middle and right respectively), colour-coded by the T-Type of each galaxy.

In order to compare the stellar populations of the bulges and discs across the
entire sample, the mean mass-weighted ages and metallicities of each galaxy as
a whole (from the SS fit) and of their bulges and discs (from the SE fit) were
calculated using

$\text{log(Age${}_{\text{M-W}}$)}=\frac{\sum\omega_{i}\text{log(Age${}_{\text{template},i}$)}}{\sum\omega_{i}}$
(1)

and

$\text{[M/H]${}_{\text{M-W}}$}=\frac{\sum\omega_{i}\text{[M/H]}_{\text{template},i}}{\sum\omega_{i}}$
(2)

respectively, where $\omega_{i}$ represents the weight of the $i^{th}$
template (i.e. the value by which the $i^{th}$ stellar template is multiplied
to best fit the galaxy spectrum), and [M/H]${}_{\text{template},i}$ and
Age${}_{\text{template},i}$ are the metallicity and age of the $i^{th}$
template respectively.

Figure 9 presents an example of the mass-weighted ages and metallicities for
all galaxies successfully fitted with the SS and SE models, plotted against
the mass of the total galaxy and colour coded according to the morphology in
terms of T-Type (red indicates earlier types while blue indicates later type
morphologies). In the plots for the SS fits, one can clearly see the red and
blue sequences, such that the higher-mass ETGs generally have older, more
metal-rich stellar populations while the lower-mass LTGs have younger, more
metal-poor stellar populations. Furthermore, the distributions in the ages and
metallicities of the LTGs are much broader than the ETGs. These trends are in
agreement with the stellar mass-metallicity and mass-age relations in the
literature. For example, the first study of the stellar mass-metallicity
relation was by Gallazzi et al. (2005), in which they found that low-mass
galaxies tended to be younger and more metal-poor than the higher-mass
galaxies, with a rapid transition between these two regimes occurring for the
mass range $3\times 10^{9}-3\times 10^{10}$M⊙. This same transition in age and
metallicity can be seen in the SS plots in Fig. 9. A recent study by
Zenocratti et al. (2022) of the mass-metallicity relation using galaxies in
the EAGLE simulation also found a link with morphology, such that at a given
mass, the rotationally-supported disc galaxies tend to have lower
metallicities than the dispersion supported spheroidal galaxies. They
concluded that this trend arose due to the disc galaxies having recently
accreted low-metallicity gas, which fuelled more recent star formation, while
the spheroidal galaxies instead formed stars earlier on by using their own gas
reservoirs.

When looking at the plots for the SE fits, the same general trends appear to
also hold true for the bulges and discs, though with more scatter. For
example, in the higher mass galaxies ($M>10^{10}M_{\odot}$), the discs show a
broader distribution in both age and metallicity than the bulges. This trend
could indicate fundamental differences in the evolution of the bulges and
discs themselves in this mass range, potentially reflecting more recent star
formation in the discs of high-mass galaxies fuelled by accreted low-
metallicity gas while the bulges have evolved more passively, as was already
proposed by Zenocratti et al. (2022) for disc-dominated galaxies. In low-mass
galaxies however, both the bulges and discs show evidence of younger and more
metal-poor stellar populations, indicating that both components may have
formed more recently than in the higher mass galaxies. A more detailed
analysis of the bulge and disc star-formation histories in the S0s in this
sample by Johnston et al (submitted) have indeed found this trend, where the
bulges of galaxies with masses M $>10^{10}$M⊙ formed rapidly in the early
lifetime of the galaxy, while those in lower mass galaxies formed more
recently over longer timescales. Additionally, a more detailed analysis of
this trend for spiral galaxies is ongoing, and will be presented in
Jegatheesan et al (in prep). However, similar trends have been seen in studies
that applied bulge-disc decomposition techniques to photometric data. For
example, a recent study by Robotham et al. (2022) used the ProFUSE package to
explore the mass-size-age plane for galaxy components through SED fitting to
$ugri$ZYJHKs imaging from the GAMA survey, finding a strong trend in the disc
metallicity with the disc mass such that higher mass discs have higher
metallicities, as seen in Fig. 9.

###  5.2 Investigating the effect of the Chebychev polynomials

In Section 3.4 we discussed the Chebychev polynomials selected for the fit
parameters, specifically using a polynomial of order 1 for the $R_{e}$ and $n$
in the SE fits and an order of 2 for these parameters in the SS fits (the $q$
and $PA$ used polynomials of order 1 throughout). This additional degree of
freedom was selected for the SS fits to improve the models of 2-component
galaxies by allowing for colour gradients. Such gradients could be created,
for example, in spiral galaxies with old, red bulges surrounded by younger,
star-forming discs, making them appear larger at bluer wavelengths and more
compact in the redder end of the spectrum. Since these polynomials model the
general shape of the light distribution throughout the galaxy, the choice of
polynomial between orders 1 and 2 should not affect the strength of the
spectral features significantly.

In order to test this hypothesis, the SS fits were repeated using a polynomial
of order 1 for the $R_{e}$ and $n$, and the stellar populations derived in the
same way. Apart from the choice of polynomial, the fits and the analysis were
identical. Figure 10 compares the ages and metallicities of the galaxies using
these two polynomial orders, and show that the results are generally
consistent, with standard deviations of 0.38 Gyrs in age and 0.05 in
metallicity. Consequently, we can say that the stellar populations derived
from the spectra extracted by buddi are fairly insensitive to the choice of
polynomial between an order of 1 and 2.

Figure 10: A comparison of the mass-weighted ages (left) and metallicities
(right) for the spectra derived from the SS fits using Chebychev polynomials
of orders 1 and 2 to model the variation in $R_{e}$ and $n$ with wavelength.
The mean differences in the age and metallicity measurements are given in the
bottom right of each plot, with the uncertainty reflecting the standard
deviation of the scatter.

##  6 Comparison with MPP-VAC

Figure 11: Comparison of the stellar populations for each component extracted
using the buddi and pymorph fit parameters. The colours correspond to the
morphology, as indicated in the colour bar on the right, with redder colours
reflecting ETGs (T-Type$<0$). The mean differences in age and metallicity
measurements are given in the bottom right of each plot, with the uncertainty
reflecting the standard deviation. The data points with the circle around them
identify the measurements for 8249-12705, for which the spectra extracted for
the exponential component are plotted in Fig. 12.

In section 4 we explored the differences in the structural parameters between
the fits obtained by buddi and those in the MPP-VAC that were derived from
SDSS images of the MaNGA galaxies using the pymorph code. While no significant
differences were detected in the trends for the structural parameters, even
small differences in the fits could potentially lead to significantly
different estimates of the stellar populations in each component. While this
issue was explored in Johnston et al. (2017) for the prototype MaNGA data, the
small number of galaxies available at the time meant that the tests were
carried out on a series of simulated datacubes. In this section, we will
explore this issue in more detail by comparing the stellar populations derived
from the spectra extracted using the buddi and MPP-VAC fit parameters.

For this test, the galaxies were modelled again with buddi using the fit
parameters for each component in the MPP-VAC, and with 0-order polynomials for
the $R_{e}$, $n$, $q$ and $PA$ (i.e. holding them fixed at the input values
along the entire wavelength range) and allowing the magnitudes complete
freedom. The mean mass-weighted ages and metallicites of the resulting bulge
and disc spectra were derived in the same way as described in Section 5, and
are plotted in Fig. 11 for both the SS and SE fits. As before, the colours
reflect the morphology of each galaxy. It should be noted that these plots
only include the results for spectra that were derived from successful fits in
both cases, using the criteria outlined in Section 4.2, where the parameters
derived by buddi and the MPP-VAC were assessed independently. The mean
differences between the ages and metallicities measured in the two sets of
fits, along with the standard deviation of the scatter, are given in the
bottom right of each plot.

One can see that, in general, the measurements for the ages and metallicities
for the SS and SE fits are very consistent, though the SE fits do show a
larger scatter, particularly for the exponential component. The colours of the
data points show that many of the outliers in the results for the exponential
component are early-type galaxies, with T-Types$<0$, and so it is possible
that in some cases these poor results are due to forcing a 2-component fit on
an elliptical galaxy that is already well modelled with a single Sérsic
profile, which makes profiles fits inherently unreliable. The outliers in the
Sérsic components of the SE fits, on the other hand, tend to be LTGs, but the
correlation is much tighter in this case. Since Fig. 7 shows that the majority
of flipped galaxies have late type morphologies, it is possible that this
scatter is due to mismatched components, i.e. where the Sérsic and exponential
components have been flipped in one set of fits but not the other. However,
only $\sim 4\%$ of these galaxies were found to fall into this category (i.e.
flipped in one set of fits but not the other), and so this mismatch does not
completely explain the scatter.

Figure 12: An example of the fits to galaxy 8249-12705 using the parameters
derived using buddi (left) and with those from the MPP-VAC (right). The top
row shows the SDSS $gri$-band image of galaxy alongside the model images for
the exponential and Sérsic components from each fit. The key fit parameters
for the two fits ($R_{e}$, $n_{S\'{e}rsic}$ and exponential-to-total light
ratio) are also given. The middle row shows the spectrum extracted for the
exponential component in the SE fit using both sets of fit parameters, along
with the best fit from ppxf superimposed in red. The bottom row shows the
corresponding smoothed age-metallicity grid for the fits to the spectra in the
middle row.

To further explore the outliers, Fig. 12 has been replotted in Figures 14 and
14 in Appendix A, this time colour coding the points according to the ratios
of the values derived by buddi to those from the MPP-VAC. While no obvious
trend can be seen between the difference in the stellar populations and these
fit parameters, it is interesting to note that the outliers in the exponential
components that are marked as ETGs in Fig. 12 also appear to show lower ratios
in the $R_{e}$ and $n$ values between the two sets of fits, i.e. the values
derived by buddi are significantly lower than those in the MPP-VAC. Again,
this effect may be a result of forcing a 2-component fit upon galaxies that
are better modelled with a single Sérsic component.

A closer inspection was carried out on the fits to some of the outlying points
to better understand the discrepancy in their measurements. The largest
outlier in the age and metallicity plots for the exponential components
corresponds to galaxy 8249-12705 (marked with a circle around the point in
Fig. 11), and the corresponding spectra for the exponential component derived
using the buddi and MPP-VAC fit parameters are shown in Fig. 12. This figure
also shows the SDSS $gri$-band image of this galaxy and the model images for
each component from both sets of fit parameters. It can be seen that despite
using the MPP-VAC parameters as the initial estimates, buddi has converged on
a very different fit where the Sérsic component is much more compact and with
a lower Sérsic index, and where the exponential component is brighter (the
exponential-to-total light ratio is 0.59 for the buddi fit compared to 0.11
for the MPP-VAC fit). Below these images, the spectra derived for the
exponential component are given, with the best fit by ppxf over plotted in
red, and the smoothed age-metallicity grid is also given, showing the weights
of the template spectra used in that fit. It can be seen that the spectrum
extracted by buddi has higher S/N with clear spectral features, whereas the
spectrum created using the MPP-VAC fit parameters is much noisier with few
clear spectral features. This lower S/N for the MPP-VAC fit is simply due to
the faintness of the exponential component in the model, where the Sérsic
component dominates the light in all spaxels in the FOV, and which is not the
case for the buddi fit. As a result, the fit to the MPP-VAC exponential
spectrum is very poor, and produces significantly younger, more metal-poor
measurements for the stellar populations. The morphology of this galaxy is
listed in the MDLM-VAC as T-Type$=-2.4$ and a probability of being an S0 of
0.2, making it a likely Elliptical galaxy. As a result, any 2-component fits
to this galaxy should be used with care and should not be assumed to represent
the bulge and disc components. In general, though, where good fits are
achieved with the structural parameters derived by buddi and using those from
the MPP-VAC, the results, in terms of both the fit parameters and the stellar
populations derived from the spectra, are generally consistent. Consequently,
we conclude that the buddi fits are reliable, and that the stellar populations
derived truly reflect those of the components modelled in the fits. These
results also show that buddi can be used for IFU data with less coverage of
the galaxy if the structural parameters can be measured reliably from broad-
band photometric data and held fixed within buddi.

A natural question occurs here- why use buddi for the full fits when it’s been
shown that you can achieve similar results using fit parameters from catalogs
such as the MPP-VAC, or from applying your own fits to imaging data of the
same galaxies? The main advantage of using buddi is that it is self contained-
imaging data of the targets may not be available over the same wavelength
range or to the same depth as the IFU datacube. By carrying out the fits
within buddi, you can ensure that you have derived reliable fit parameters
over the wavelength range you are actually using, and avoid introducing errors
or bias when converting pixel scales etc between the imaging and spectroscopic
data. Fits to simulated data by Häußler et al. (2022) have shown that such
multi-band fitting significantly improves the measurements of the parameter
values, particularly of the effective radii and Sérsic indices, when compared
to fitting a single image. Furthermore, running the initial fits within buddi
also allows the user more flexibility to modify the initial parameters,
include or exclude components, and to update the polynomials for the fit
parameters as a function of wavelength to ensure the best fit to the datacube
for their science case. While this step is also possible with separate imaging
data, differences in the depth of the images and the spatial resolution may
result in poor fits when one tries to include too many components in the fit
to the IFU data.

Of course, using buddi in this way assumes you are using IFU datacubes with
sufficient spatial resolution and a wide field-of-view. buddi has so far only
been tested on data from MUSE and the MaNGA and CALIFA surveys. It is likely
that additional imaging data is required for the fits with buddi to datacubes
from IFU instruments with smaller fields of view, such as SAURON (Bacon et
al., 2001), KCWI (Morrissey et al., 2018) and the SAMI survey. buddi has
therefore been written to allow the user the flexibility to define the
structural parameters for the fits based on alternative imaging data for such
scenarios.

##  7 Discussion and Conclusions

We have used buddi to carry out automated light profile fits to IFU datacubes
of a large sample of galaxies observed as part of the SDSS-IV MaNGA Survey and
released as part of the SDSS DR15. We used a single Sérsic (SS) and
Sérsic+exponential (SE) models to cleanly extract the spectra of the galaxy
and the bulge and disc respectively. As the first paper in this series, the
purpose of this work is to introduce the BUDDI-MaNGA project, focussing on the
procedure for the fit, characterising the final sample, and testing the
results. Future papers will focus more on the scientific results of this data
set.

We used the publicly available MaNGA data from the DR15, initially selecting
only those galaxies observed with the 91 and 127-fibre IFUs and which had
successful fits in the MPP-VAC. The fits with buddi were carried out using the
MPP-VAC parameters as initial estimates for the structural parameters. After
modelling all the galaxies, we identified a final sample of galaxies with
‘good’ fits, using criteria based on physically meaningful structural
parameters. This final sample consisted of 1038 galaxies for the SS model and
691 galaxies for the SE model. The spectra extracted using the SS model
represent the mean global spectrum of the galaxy, while those created using
the SE model represent the bulge and disc components.

The first step in the analysis was to carry out a comparison of the fit
parameters derived by buddi with the initial parameters from the MPP-VAC. We
found similar trends in their distributions, indicating that buddi was able to
model the light profiles of the galaxies reliably despite the smaller FOV of
the MaNGA data. The main difference was that the buddi fits resulted in more
Sérsic components with $n\sim 8$ while the MPP-VAC showed a higher frequency
of $n<2$. This trend is mainly down to variations in the approach towards the
fits between these two works– in this work the galaxies were modelled once,
whereas in Fischer et al. (2019) the fits with high Sérsic indices were
repeated with reduced upper limits on this parameter and then manually checked
one by one to determine the best fit.

We also observed the phenomenon of flipped galaxies, already reported by
Fischer et al. (2019) and Lange et al. (2016), where the Sérsic profile models
the more extended component while the exponential profile fits the more
compact component. As in Fischer et al. (2019), we found that in the majority
of cases where the Sérsic component was more extended than the exponential
component, it also had a low Sérsic index ($n<1$). Consequently, for the
remainder of this work, we identified the discs as the more extended component
and bulges as the more compact component. In most cases, the bulges and discs
corresponded to the Sérsic and exponential components respectively, except in
the cases where $R_{e,\text{exp}}>R_{e,\text{S\'{e}rsic}}$ and
$n_{\text{S\'{e}rsic}}<1$ where the bulges and discs were taken to be the
exponential and Sérsic components respectively.

Having extracted the spectra for each component, we used ppxf to carry out
regularized fits to the spectra in order to derive estimates of their mean
mass-weighted stellar populations. While these populations will be analysed in
more detail in future work, the mass-metallicity and mass-age plots for the SS
fits, representing each galaxy a whole, and the bulge and disc components in
the SE fits were presented. The plots for the SS fits showed clear trends such
that high mass and early type galaxies generally contain older and more metal-
rich stellar populations, while lower-mass and later-type galaxies are younger
and more metal-poor. Since the mass-weighted stellar populations provide
information on when the majority of the stellar mass was created in these
galaxies, this trend reflects the known trend that many of the ETGs were
formed a long time ago, while the LTGs have undergone significant star
formation throughout their lives. Similar trends were seen for the two
components in the SE fits, but with a larger scatter in particular in the
discs of higher mass galaxies. These results reflect that the discs in most
galaxies in this sample have built their mass over a longer period than the
bulges, likely through a combination of ongoing star formation, accretion and
minor mergers.

Two sets of tests were used to investigate the reliability of the fits. In the
first case, the SS fits were repeated using Chebychev polynomials of order 1
for the Sérsic index and effective radius. The stellar populations were
derived in the same way, and the mean mass-weighted ages and metallicities
compared. Both methods were found to give consistent values, indicating that
the spectra extracted by buddi are fairly insensitive to the choice of
polynomial between orders of 1 and 2.

The second reliability test focussed on the fit structural parameters
themselves, and how they compare to the fits using the values in the MPP-VAC.
The SS and SE fits were repeated using the MPP-VAC structural parameters,
holding these values fixed and only allowing the magnitude to vary in each
case. The stellar populations were derived in the same way and compared with
the original fits, and it was found that for galaxies that were considered to
have ‘good’ fits with both sets of parameters, the stellar populations were
generally consistent. As a result, we encourage the use of buddi to determine
the best fit parameters for each galaxy, but acknowledge that in cases where
the FOV is small and the coverage of the galaxy within the IFU datacube is
poor, using fit parameters derived from photometric data will suffice.

In conclusion, in this paper we present the BUDDI-MaNGA project, in which
$\sim 1000$ MaNGA galaxies have been modelled successfully with buddi using
single Sérsic and Sérsic+exponential models to cleanly extract the spectra of
each galaxy and their bulges and disc components respectively. To date, this
work provides the largest sample of clean bulge and disc spectra extracted
from IFU datacubes using the galaxies light profile information. The spectra
derived using these parameters and the subsequent stellar populations analysis
will be used in future papers in this series to explore the themes of galaxy
formation, evolution, and morphological transformations through their effects
on the different components within the galaxies.

## Acknowledgements

We would like to thank the referee for their useful comments which have helped
to improve this paper. E.J.J. acknowledges support from FONDECYT Iniciación en
investigación 2020 Project 11200263. K.J. acknowledges financial support from
ANID Doctorado Nacional 2021 project number 21211770. We gratefully thank the
bomberos de Santiago for extinguishing the fire at PUC before it reached the
server room where the BUDDI-MANGA data are stored.

Funding for the Sloan Digital Sky Survey IV has been provided by the Alfred P.
Sloan Foundation, the U.S. Department of Energy Office of Science, and the
Participating Institutions.

SDSS-IV acknowledges support and resources from the Center for High
Performance Computing at the University of Utah. The SDSS website is
www.sdss.org.

SDSS-IV is managed by the Astrophysical Research Consortium for the Participating Institutions of the SDSS Collaboration including the Brazilian Participation Group, the Carnegie Institution for Science, Carnegie Mellon University, Center for Astrophysics | Harvard & Smithsonian, the Chilean Participation Group, the French Participation Group, Instituto de Astrofísica de Canarias, The Johns Hopkins University, Kavli Institute for the Physics and Mathematics of the Universe (IPMU) / University of Tokyo, the Korean Participation Group, Lawrence Berkeley National Laboratory, Leibniz Institut für Astrophysik Potsdam (AIP), Max-Planck-Institut für Astronomie (MPIA Heidelberg), Max-Planck-Institut für Astrophysik (MPA Garching), Max-Planck-Institut für Extraterrestrische Physik (MPE), National Astronomical Observatories of China, New Mexico State University, New York University, University of Notre Dame, Observatário Nacional / MCTI, The Ohio State University, Pennsylvania State University, Shanghai Astronomical Observatory, United Kingdom Participation Group, Universidad Nacional Autónoma de México, University of Arizona, University of Colorado Boulder, University of Oxford, University of Portsmouth, University of Utah, University of Virginia, University of Washington, University of Wisconsin, Vanderbilt University, and Yale University.

## Data Availability

The MaNGA data used in this paper is already publicly available as part of
SDSS DR15 and the associated Value Added Catalogs. The BUDDI-MaNGA derived
data, including the fit parameters and stellar populations etc, will be made
public in the future after we have carried out the fits to the DR17 data.
However, anyone interested in using the current data are welcome to contact us
to discuss collaboration.

## References

  * Abdurro’uf et al. (2022) Abdurro’uf et al., 2022, ApJS, 259, 35
  * Aguado et al. (2019) Aguado D. S., et al., 2019, ApJS, 240, 23
  * Ahumada et al. (2020) Ahumada R., et al., 2020, ApJS, 249, 3
  * Bacon et al. (2001) Bacon R., et al., 2001, MNRAS, 326, 23
  * Bacon et al. (2010) Bacon R., et al., 2010, in Ground-based and Airborne Instrumentation for Astronomy III. p. 773508, doi:10.1117/12.856027
  * Barsanti et al. (2021) Barsanti S., et al., 2021, ApJ, 906, 100
  * Blanton et al. (2011) Blanton M. R., Kazin E., Muna D., Weaver B. A., Price-Whelan A., 2011, AJ, 142, 31
  * Blanton et al. (2017) Blanton M. R., et al., 2017, AJ, 154, 28
  * Bundy et al. (2015) Bundy K., et al., 2015, ApJ, 798, 7
  * Cappellari (2017) Cappellari M., 2017, MNRAS, 466, 798
  * Cappellari & Copin (2003) Cappellari M., Copin Y., 2003, MNRAS, 342, 345
  * Cappellari & Emsellem (2004) Cappellari M., Emsellem E., 2004, PASP, 116, 138
  * Cherinka et al. (2019) Cherinka B., et al., 2019, AJ, 158, 74
  * Coccato et al. (2011) Coccato L., Morelli L., Corsini E. M., Buson L., Pizzella A., Vergani D., Bertola F., 2011, MNRAS, 412, L113
  * Coccato et al. (2018) Coccato L., Fabricius M. H., Saglia R. P., Bender R., Erwin P., Drory N., Morelli L., 2018, MNRAS, 477, 1958
  * Croom et al. (2012) Croom S. M., et al., 2012, MNRAS, 421, 872
  * Dimauro et al. (2018) Dimauro P., et al., 2018, MNRAS, 478, 5410
  * Disney et al. (1989) Disney M., Davies J., Phillipps S., 1989, MNRAS, 239, 939
  * Domínguez Sánchez et al. (2018) Domínguez Sánchez H., Huertas-Company M., Bernardi M., Tuccillo D., Fischer J. L., 2018, MNRAS, 476, 3661
  * Drory et al. (2015) Drory N., et al., 2015, AJ, 149, 77
  * Du et al. (2020) Du M., Ho L. C., Debattista V. P., Pillepich A., Nelson D., Zhao D., Hernquist L., 2020, ApJ, 895, 139
  * Fischer et al. (2019) Fischer J. L., Domínguez Sánchez H., Bernardi M., 2019, MNRAS, 483, 2057
  * Fisher & Drory (2008) Fisher D. B., Drory N., 2008, AJ, 136, 773
  * Fraser-McKelvie et al. (2018) Fraser-McKelvie A., Aragón-Salamanca A., Merrifield M., Tabor M., Bernardi M., Drory N., Parikh T., Argudo-Fernández M., 2018, MNRAS, 481, 5580
  * Gadotti (2008) Gadotti D. A., 2008, MNRAS, 384, 420
  * Gallazzi et al. (2005) Gallazzi A., Charlot S., Brinchmann J., White S. D. M., Tremonti C. A., 2005, MNRAS, 362, 41
  * Girardi et al. (2000) Girardi L., Bressan A., Bertelli G., Chiosi C., 2000, A&AS, 141, 371
  * Gunn et al. (2006) Gunn J. E., et al., 2006, AJ, 131, 2332
  * Guo & White (2008) Guo Q., White S. D. M., 2008, MNRAS, 384, 2
  * Häußler et al. (2013) Häußler B., et al., 2013, MNRAS, 430, 330
  * Häußler et al. (2022) Häußler B., et al., 2022, arXiv e-prints, p. arXiv:2204.05907
  * Johnston et al. (2012) Johnston E. J., Aragón-Salamanca A., Merrifield M. R., Bedregal A. G., 2012, MNRAS, 422, 2590
  * Johnston et al. (2013) Johnston E. J., Merrifield M. R., Aragón-Salamanca A., Cappellari M., 2013, MNRAS, 428, 1296
  * Johnston et al. (2014) Johnston E. J., Aragón-Salamanca A., Merrifield M. R., 2014, MNRAS, 441, 333
  * Johnston et al. (2017) Johnston E. J., et al., 2017, MNRAS, 465, 2317
  * Johnston et al. (2018) Johnston E. J., Merrifield M., Aragón-Salamanca A., 2018, MNRAS, 478, 4255
  * Johnston et al. (2020) Johnston E. J., et al., 2020, MNRAS, 495, 2247
  * Johnston et al. (2021) Johnston E. J., et al., 2021, MNRAS, 500, 4193
  * Kennedy et al. (2016) Kennedy R., et al., 2016, MNRAS, 460, 3458
  * Lange et al. (2016) Lange R., et al., 2016, MNRAS, 462, 1470
  * Law et al. (2015) Law D. R., et al., 2015, AJ, 150, 19
  * Law et al. (2016) Law D. R., et al., 2016, AJ, 152, 83
  * McDermid et al. (2015) McDermid R. M., et al., 2015, MNRAS, 448, 3484
  * Meert et al. (2015) Meert A., Vikram V., Bernardi M., 2015, MNRAS, 446, 3943
  * Méndez-Abreu et al. (2019a) Méndez-Abreu J., Sánchez S. F., de Lorenzo-Cáceres A., 2019a, MNRAS, 484, 4298
  * Méndez-Abreu et al. (2019b) Méndez-Abreu J., Sánchez S. F., de Lorenzo-Cáceres A., 2019b, MNRAS, 488, L80
  * Méndez-Abreu et al. (2021) Méndez-Abreu J., de Lorenzo-Cáceres A., Sánchez S. F., 2021, MNRAS, 504, 3058
  * Morrissey et al. (2018) Morrissey P., et al., 2018, ApJ, 864, 93
  * Nair & Abraham (2010) Nair P. B., Abraham R. G., 2010, ApJ, 714, L260
  * Oh et al. (2020) Oh S., et al., 2020, MNRAS, 495, 4638
  * Pak et al. (2021) Pak M., Lee J. H., Oh S., D’Eugenio F., Colless M., Jeong H., Jeong W.-S., 2021, ApJ, 921, 49
  * Peng et al. (2002) Peng C. Y., Ho L. C., Impey C. D., Rix H.-W., 2002, AJ, 124, 266
  * Peng et al. (2010) Peng C. Y., Ho L. C., Impey C. D., Rix H.-W., 2010, AJ, 139, 2097
  * Pietrinferni et al. (2004) Pietrinferni A., Cassisi S., Salaris M., Castelli F., 2004, ApJ, 612, 168
  * Pietrinferni et al. (2006) Pietrinferni A., Cassisi S., Salaris M., Castelli F., 2006, ApJ, 642, 797
  * Robotham et al. (2022) Robotham A. S. G., Bellstedt S., Driver S. P., 2022, MNRAS,
  * Sánchez-Blázquez et al. (2006) Sánchez-Blázquez P., et al., 2006, MNRAS, 371, 703
  * Sánchez et al. (2012) Sánchez S. F., et al., 2012, A&A, 538, A8
  * Sil’chenko et al. (2012) Sil’chenko O. K., Proshina I. S., Shulga A. P., Koposov S. E., 2012, MNRAS, 427, 790
  * Simard et al. (2011) Simard L., Mendel J. T., Patton D. R., Ellison S. L., McConnachie A. W., 2011, ApJS, 196, 11
  * Smee et al. (2013) Smee S. A., et al., 2013, AJ, 146, 32
  * Stoughton et al. (2002) Stoughton C., et al., 2002, AJ, 123, 485
  * Tabor et al. (2017) Tabor M., Merrifield M., Aragón-Salamanca A., Cappellari M., Bamford S. P., Johnston E., 2017, MNRAS, 466, 2024
  * Tabor et al. (2019) Tabor M., Merrifield M., Aragón-Salamanca A., Fraser-McKelvie A., Peterken T., Smethurst R., Drory N., Lane R. R., 2019, MNRAS, 485, 1546
  * Vazdekis et al. (2010) Vazdekis A., Sánchez-Blázquez P., Falcón-Barroso J., Cenarro A. J., Beasley M. A., Cardiel N., Gorgas J., Peletier R. F., 2010, MNRAS, 404, 1639
  * Vazdekis et al. (2015) Vazdekis A., et al., 2015, MNRAS, 449, 1177
  * Vikram et al. (2010) Vikram V., Wadadekar Y., Kembhavi A. K., Vijayagovindan G. V., 2010, MNRAS, 409, 1379
  * Vulcani et al. (2014) Vulcani B., et al., 2014, MNRAS, 441, 1340
  * Willett et al. (2013) Willett K. W., et al., 2013, MNRAS, 435, 2835
  * Worthey et al. (1994) Worthey G., Faber S. M., Gonzalez J. J., Burstein D., 1994, ApJS, 94, 687
  * Yan et al. (2016) Yan R., et al., 2016, AJ, 152, 197
  * Zenocratti et al. (2022) Zenocratti L. J., De Rossi M. E., Theuns T., Lara-López M. A., 2022, MNRAS, 512, 6164

##  Appendix A Further exploration of the effect on stellar populations from
the fit parameters

In this section, we replot Fig. 11 to compare the stellar populations derived
from spectra extracted using the buddi and MPP-VAC fit parameters, now colour
coding the points according to the ratio of the $R_{e}$ (Fig. 13) and $n$
(Fig. 14) values derived by buddi and the MPP-VAC. Note that the colours for
the exponential component in Fig. 14 correspond to the ratio in the values for
$n$ for the Sérsic component since this component has a fixed value for $n$.

Figure 13: As for Fig. 11, but colour coded according to the ratio of the
$R_{e}$ values derived by buddi relative to those in the MPP-VAC.  Figure 14:
As for Fig. 11, but colour coded according to the ratio of the $n$ values
derived by buddi relative to those in the MPP-VAC. Note that in the case of
the exponential component, the ratio of the Sérsic indices actually
corresponds to those of the Sérsic component.