SDSS-IV MaStar: Theoretical Atmospheric Parameters for the MaNGA Stellar
  Library
  We calculate the fundamental stellar parameters effective temperature,
surface gravity and iron abundance - T$_{\rm eff}$, log g, [Fe/H] - for the
final release of the Mapping Nearby Galaxies at APO (MaNGA) Stellar Library
(MaStar), containing 59,266 per-visit-spectra for 24,290 unique stars at
intermediate resolution ($R\sim1800$) and high S/N (median = 96). We fit
theoretical spectra from model atmospheres by both MARCS and BOSZ-ATLAS9 to the
observed MaStar spectra, using the full spectral fitting code pPXF. We further
employ a Bayesian approach, using a Markov Chain Monte Carlo (MCMC) technique
to map the parameter space and obtain uncertainties. Originally in this paper,
we cross match MaStar observations with Gaia photometry, which enable us to set
reliable priors and identify outliers according to stellar evolution. In
parallel to the parameter determination, we calculate corresponding stellar
population models to test the reliability of the parameters for each stellar
evolutionary phase. We further assess our procedure by determining parameters
for standard stars such as the Sun and Vega and by comparing our parameters
with those determined in the literature from high-resolution spectroscopy
(APOGEE and SEGUE) and from lower-resolution matching template (LAMOST). The
comparisons, considering the different methodologies and S/N of the literature
surveys, are favourable in all cases. Our final parameter catalogue for MaStar
cover the following ranges: $2592 \leq $ T$_{\rm eff} \leq 32983\;$K; $-0.7
\leq $ log g $ \leq 5.4\;$dex; $-2.9 \leq $ [Fe/H] $\leq 1.0\;$dex and will be
available with the last SDSS-IV Data Release, in December 2021.
