# ASPCAP

ASPCAP is the APOGEE Stellar Parameters and Abundances Pipeline that analyzes APOGEE stellar spectra, and for APOGEE targets, derives the stellar atmospheric parameters and individual element abundances. Over time and with each successive DR, modifications, and enhancements of ASPCAP occur. The most recent description is Holtzman et al. 2021.

A general description of ASPCAP and any DR-associated changes are detailed in the following publications: DR12 in Garcia-Perez et al. (2016), DR13 and DR14 in Holtzman et al. (2018), DR16 in Jönsson et al. (2020), and DR17 in Holtzman et al. 2021.. This page provides only a short description of the current ASPCAP status. The user is directed to the above-listed papers for more in-depth information.

Additionally, all users of the derived DR17 stellar parameters and abundances, should read the information on Using APOGEE stellar parameters and Using APOGEE stellar abundances.

## Overview of ASPCAP

One main objective of the APOGEE survey is to extract the chemical abundances of multiple elements for the entire stellar sample. This is achieved by comparing APOGEE observations to a large library of synthetic spectra and determining the best matching synthetic spectrum using the code FERRE (Allende Prieto et al. 2006), which allows for interpolation within the library.

ASPCAP employs a two-step process to extract abundances: first, the stellar atmospheric parameters are determined by fitting the entire APOGEE spectrum; and second, these parameters are then used to derive an individual element abundance by fitting over limited-wavelength regions of the spectrum (windows) that are dominated by spectral features associated with that element. The H-band wavelength regime covered by the APOGEE spectra encompasses a vast number of atomic transitions for a variety of elements. Molecular features, predominantly from CN, CO, and OH, can also be very prominent, which is especially true for the cooler stars that comprise the bulk of the APOGEE sample. The ASPCAP global (full-wavelength) fit takes into account that variations in certain elemental abundance ratios can significantly affect the equation of state (e.g. through CO formation or contributing free electrons) or the opacity. Accordingly, the stellar parameters portion of the ASPCAP pipeline has the potential to allow for variations in eight parameters: effective temperature Teff, surface gravity log g, microturbulence vmicro, macroturbulence/rotation (vmacro/vsini), overall metal abundance [M/H], relative α-element abundance [α/M], carbon abundance [C/M], and nitrogen abundance [N/M].

Because the parameter space covered by stars is large, several spectral grids are constructed that together cover the parameter range across the HR-diagram. The coverage of the different spectral grids is described in Jönsson et al. (2020). Note that, for reasons of computational practicality, the grids that cover red giant stars do not include a rotation dimension (also, most giants are not expected to have significant rotation).

For DR17, new spectral grids have been constructed using the Synspec (reference) spectral synthesis code that incorporate NLTE level populations for Na, Mg, K, and Ca (Osorio reference). This differs from previous data releases that have used the Turbospectrum LTE synthesis code. However, while the results using the Synspec grids are the primary DR17 results, a set of supplemental analyses are provided in separate files that allow interested users to investigate effects of NLTE/LTE, different synthesis codes, plane-parallel vs spherical geometry, etc. For more information see the pages on synthetic spectral libraries and supplemental analyses.

The syntheses use model atmospheres computed by the MARCS group, as described in Holtzman et al. (2018) and DR16 modifications are detailed in Jönsson et al. (2020). The atomic and line list data used for synthesizing the spectra is described in Smith et al. (2021).

The ASPCAP pipeline produces results for stellar parameters and abundances from the FERRE best fits to the observed spectra from the synthetic grids. The pipeline also produces an informational bitmask, ASPCAPFLAG, that provides some potentially important information about the objects or the fits. For example, a bit might be set for a star that has previously been identified to be a likely spectroscopic binary (for which the ASPCAP procedure would be suspect!), or other bits might be set if the best fit parameter or abundance falls at or near the edge of the spectral grid that was used. A summary list of the criteria used to set different bits in the bitmask is provided links.

It is important to note that many of the bits are largely informational, i.e., they do not necessarily indicate a problem with the measurements. As a result, it would not be appropriate to select only stars with ASPCAPFLAG==0, as that might remove many stars for which derived quantities may be fine. There are a subset of conditions that imply that the spectra and/or measurements are not valid, and we have defined a single STAR_BAD bit that is set for objects that meet any of these conditions: these include spectra with large numbers of bad pixels, objects that were targeted as non-stellar objects or as stars with emission or embedded in nebula, stars identified as likely spectroscopic binaries, and stars whose solution lie at the edge of a grid in effective temperature or surface gravity. Many/most users will want to remove such stars from consideration, but, clearly, the spectra for some of these may be of interest! Note that we have been more conservative in setting the STAR_BAD bit in DR17 than in previous data releases; in particular, stars at the grid edge in metallicity are not flagged as STAR_BAD.

## Stellar Parameters: Calibrations and Uncertainties

As in previous data releases, two sets of values for Teff and log g are provided for each target star: one set is directly from the FERRE-determined best-fit synthetic spectrum and another set that have been calibrated to better align with independent measurements of Teff and log g. The exact methodology for these calibrations has changed over time. While a short description of the DR17 calibrations is provided here, users should consult Holtzman et al. (2021, in prep ) for further details.

The uncalibrated effective temperatures from the FERRE fits are stored in the first element of the FPARAM array. Calibrated effective temperatures for objects without the STAR_BAD bit set are stored in the first element of the PARAM array. These temperatures are duplicated in the "named" tags, TEFF_SPEC and TEFF, but for these, the populated values are further restricted to objects with neither the STAR_BAD nor the CHI2_BAD bit set in ASPCAPFLAG. Uncertainties are are presented in TEFF_ERR tag; these are estimated from repeat observations of stars and are parameterized as a function of Teff, [M/H], and S/N.

Stellar surface gravities (log g) have been calibrated for giants using asteroseismic values for stars in the Kepler field and for dwarfs using a combination of asteroseismic values (for warmer dwarfs) and isochrone-derived gravities (for cooler dwarfs). The calibration for DR17 differs from that used for previous data releases, in that it uses a neural network to provide the calibration instead of separate polynomial relations for different types of stars; see Holtzman et al. (2021) for additional details. The uncalibrated surface gravities from the FERRE fits are stored in the second element of the FPARAM array. Calibrated surface gravities for objects without the STAR_BAD bit set are stored in the second element of the PARAM array. These surface gravities are duplicated in the "named" tags, LOGG_SPEC and LOGG, but for these, the populated values are further restricted to objects with neither the STAR_BAD nor the CHI2_BAD bit set in ASPCAPFLAG. Uncertainties are are presented in LOGG_ERR tag; these are estimated from repeat observations of stars and are parameterized as a function of Teff, [M/H], and S/N.

The calibration of the stellar parameters is a post-processing step (i.e., implemented after the ASPCAP fits are performed). As in prior data releases, the spectroscopic stellar parameters (i.e., the FPARAM parameter array) are used for the determination of the individual element abundances. We do this because the spectroscopic stellar parameters achieve the best fit between the synthetic and observed spectrum, so this allows a more robust element abundance derivation from blended spectral features. However, the use of the uncalibrated stellar parameters could potentially lead to systematics in abundances derived from spectral transitions that are particularly sensitive to Teff or log g.

As noted above, several other stellar parameters are also derived during the global fit of the spectrum: microturbulent velocity, overall metallicity [M/H], overall alpha-element abundance [$\alpha$/M], carbon abundance [C/M], nitrogen abundance [N/M], and, for dwarfs, rotational velocity. The values of the stellar parameters from the FERRE fit are given in the FPARAM array in the order: Teff, log g, vmicro, [M/H], [C/M], [N/M], [$\alpha$/M], and v sin i. Apart from Teff and log g, a calibration is applied only to [alpha/M] (as described below). Otherwise, all quantities are transferred to the PARAM array. The [M/H] and [$\alpha$/M] values are transferred to the "named" tags M_H and ALPHA_M for stars without STAR_BAD, CHI2_BAD, and only for values away from the grid edge in each parameter.

## Stellar Abundances: Abundance scale, Calibrations and Uncertainties

The abundance scale for APOGEE is a hybrid scale. Atomic line strengths adjusted to match high resolution spectra of the Sun and Arcturus, using Grevesse (2007) abundances for the Sun and literature abundances for Arcturus. For molecular lines, lab data are adopted. Because of the hybrid nature of the abundance scale, there can be systematic offsets of raw APOGEE abundances with respect to other measurements.

ASPCAP employs the same grids of synthetic stellar spectra for the derivation of the stellar abundances as was used for the determination of the stellar parameters. For the individual element abundances, the fit is performed only in the spectral windows encompassing the transitions corresponding to the element of interest. Additionally, the spectral fitting process varies only a single abundance dimension -- [M/H], [α/M], [C/M] or [N/M] -- depending on the element. Some of the element abundance windows have significant levels of blending/line contamination (which are not taken into consideration by ASPCAP). Consequently, these windows are assigned a lower weight in the abundance determination. For elements with few available transitions, this could potentially lead to the determination of an element abundance from a single line.

In DR17, the abundance determination of 23 species is attempted; C, C I, N, O, Na, Mg, Al, Si, P, S, K, Ca, Ti, Ti II, V, Cr, Mn, Fe, Co, Ni, Cu, Ce, Nd, and 13C. However, the abundances of P, Cu, Nd, and 13C have been judged to be unreliable because the features are too weak or because of known issues in the linelist (e.g., for Cu). Note that in previous data releases, attempts were made to measure Ge, Rb, and Yb, but these were not attempted for DR17 because the features are extremely weak; some of the data arrays, however, still have placeholders for these elements.

The accuracy of an individual abundance varies by the element and with the type of star; lines of a given element have strengths that vary with effective temperature, surface gravity, and abundance. Nonetheless, the FERRE code returns abundances for all stars; the current ASPCAP methodology does not intrinsically provide upper limits. Empirical uncertainties for the abundances are derived from the scatter in abundances from stars in the sample that are observed in two or more different fields, as ASPCAP analyzes each field separately. These uncertainties are parameterized as a function of Teff, [M/H], and S/N, with different relations for giants and dwarfs.

The raw FERRE abundances are provided in the FELEM array in the allStar file. Note that these abundances are expressed relative the H for some elements (those for which the [M/H] dimension was varied), and relative to total metals, M, for others. Homogeneous values are provided in the X_H_SPEC and X_M_SPEC arrays. These are populated from the FELEM arrays, using [M/H] from the FPARAM array to convert where needed, but only for objects without the STAR_BAD bit set and only where the abundances are not near the grid edge. The empirical uncertainties are presented in the X_H_ERR and X_M_ERR arrays. In these arrays, the order of the abundances is:
C,CI,N,O,Na,Mg,Al,Si,P,S,K,Ca,Ti,TiII,V,Cr,Mn,Fe,Co,Ni,Cu,Ge (unfilled),Rb (unfilled),Ce,Nd,Yb (unfilled),13C.

Because of the hybrid nature of the abundance scale, we provide a set of "calibrated" abundances in addition to the raw spectroscopic measurements, where the calibration is a simple zero-point shift such that the median of the abundances in solar-metallicity stars in the solar neighborhood are shifted to have [X/M] = 0. We use solar-metallicity stars in the solar neighborhood rather than the Sun itself, because the effective temperature of the Sun is significantly higher than the bulk of our sample, and many abundances are not measured to high accuracy at that effective temperatures. The zero-point adjusted abundances are provided in the X_M and X_H arrays. Note that no zero-point shifts are applied for C and N in giants because these vary in solar-neighborhood stars because of mixing in the stellar atmosphere that is a function of stellar mass.

Finally, the relative element abundances ([X/Fe]) are also presented in the "named" tags, e.g. C_FE, N_FE, MG_FE, etc., with empirical uncertainties in C_FE_ERR, N_FE_ERR, MG_FE_ERR, etc. These are taken identically from the X_M values (using [Fe/M] to convert to [X/FE]). However, for some elements, abundances cannot be reliably determined across the full parameter space because spectral features may get very weak, be dominated by other spectral features, etc. Nonetheless, the abundance array columns (X_H_SPEC, X_H, X_M_SPEC, X_M) are populated. Based on inspection of results across parameter space, the SDSS APOGEE/ASPCAP team has identified areas of parameter space where the abundances are most unlikely unreliable. In an attempt to make things easier, the "named" tags are only populated for regions in which the results are not clearly unreliable. This does not necessarily imply that all of the results given the named tags are fully reliable, however! Abundance determination across a wide range of parameter space is challenging, and there are likely systematic variations across the sample.

For more information, see Using APOGEE Stellar abundances and Jönsson et al. (2020). For more information on the spectral lines used for determining the neutron-capture elements Nd and Ce, see Hasselquist et al. (2016) and Cunha et al. (2017), respectively.

## Output Data Files

ASPCAP parameters, abundances, and uncertainties are presented in a single summary allStar file for all objects. Since ASPCAP processing is done by APOGEE field, some objects may appear more than once, if they were observed in different fields (these are actually useful since they allow us to estimate empirical uncertainties from the scatter in measurements from different spectra).

The allStar file does not contain the pseudo-continuum normalized spectra or the model spectral fits. These can be found on a per-field basis in the aspcapField files, and in a per-star basis in aspcapStar files.

Data Access contains a full description of how to access these files.