skip to main content

gaia data release 4 documentation

16.3 Apsis modules

16.3.3 GSP-Phot

Author(s): René Andrae

16.3.3.1 Goal

GSP-Phot infers fundamental stellar parameters radius, mass, age, [Fe/H], [M/H], atmospheric parameters Teff, log⁡g, line-of-sight extinction A0, and distance of all sources. For this, GSP-Phot mainly relies on the BP/RP spectra, but also uses the measured parallax and integrated G-band photometry. Here, GSP-Phot assumes that every source that it is applied to is a single star, irrespective of whether this is true or not.

16.3.3.2 Training data and models

GSP-Phot employs three different stellar model SEDs, MARCS, A and OB (Korn et al. 2026, and references therein). As described in Section 16.2.3.2, dust attenuation is applied to the model SEDs using the extinction curve from Gordon et al. (2023). Using the BP/RP simulator (Section 16.2.3.3), these model SEDs are translated into BP/RP model spectra. Furthermore, GSP-Phot employs isochrone models taken from PARSEC-1.2S Colibri S37 (Tang et al. 2014; Chen et al. 2015; Pastorelli et al. 2020, and references therein).

GSP-Phot does not require any training data, because it employs a forward-modelling approach (as opposed to an empirical approach).

16.3.3.3 Inputs

The input data for GSP-Phot include the BP/RP coefficients and their respective covariance matrices, the apparent G magnitude and the parallax. In detail, the inputs are:

  • •

    parallax with the preliminary zero-point subtracted (not available in the Gaia archive)

  • •

    parallax error with additional error from the preliminary zero-point added in quadrature (not available in the Gaia archive)

  • •

    G-band mean flux value, phot_g_mean_flux

  • •

    G-band mean flux error, phot_g_mean_flux_error

  • •

    GBP coefficient values, this is a DataLink product

  • •

    GBP coefficient errors, this is a DataLink product

  • •

    GBP coefficient correlations, this is a DataLink product

  • •

    GRP coefficient values, this is a DataLink product

  • •

    GRP coefficient errors, this is a DataLink product

  • •

    GRP coefficient correlations, this is a DataLink product

16.3.3.4 Outputs

The best-library results from GSP-Phot are published in the table ap_xp. The parameters provided by GSP-Phot are summarised in Table 16.12.

Additionally, GSP-Phot results from the individual MARCS, A and OB are published in the Table ap_xp_supp. The parameter names are the same as in Table 16.12 except with an additional ending that names the library, e.g., teff_gspphot_marcs, teff_gspphot_a, teff_gspphot_ob, etc.

Table 16.12: Publication of GSP-Phot best-library results. Each parameter also comes with lower and upper confidence levels. Quality diagnostics have no confidence levels.
ap_xp description
teff_gspphot effective temperature
logg_gspphot surface gravity
mh_gspphot global metallicity [M/H]
feh_gspphot Iron metallicity [Fe/H]
radius_gspphot stellar radius
mass_gspphot stellar mass
age_gspphot stellar age
distance_gspphot distance
azero_gspphot extinction parameter A0
ag_gspphot extinction parameter AG
abp_gspphot extinction parameter ABP
arp_gspphot extinction parameter ARP
av_gspphot extinction parameter AV
aj_gspphot extinction parameter AJ
ah_gspphot extinction parameter AH
aks_gspphot extinction parameter AKs
aw1_gspphot extinction parameter AW1
aw2_gspphot extinction parameter AW2
ebpminrp_gspphot reddening E⁢(GBP−GRP)
ebminv_gspphot reddening E⁢(B−V)
absmag_g_gspphot absolute MG magnitude
absmag_j_gspphot absolute MJ magnitude
absmag_h_gspphot absolute MH magnitude
absmag_ks_gspphot absolute MK⁢s magnitude
absmag_w1_gspphot absolute MW⁢1 magnitude
absmag_w2_gspphot absolute MW⁢2 magnitude
logposterior_gspphot mean log-posterior averaged over MCMC
loglikelihood_gspphot mean log-likelihood averaged over MCMC
logpost_spread_gspphot max−min spread of log-posterior values in MCMC
mcmcaccept_gspphot acceptance rate in MCMC
libname_gspphot name of best library

Finally, also thinned MCMC chains are provided, but only for the best-library results, not for the individual library results. While the MCMC chains used for parameter estimation within GSP-Phot have 700 samples, the provided MCMC chains for the best-library results have been thinned to a random selection of only 100 samples per source. The rationale is to save data volume. The MCMC chains are provided as DataLink products.

16.3.3.5 Method

The methodology of GSP-Phot is described in detail in Andrae et al. (2023a). Here, we only provide a brief summary of the main concepts.

GSP-Phot employs a forward model, i.e. it uses models to predict data and then optimizes the model parameters in order to fit the observed data as good as possible. Starting from stellar age, evolutionary state and [M/H], GSP-Phot uses 3D-linear interpolation over the PARSEC isochrone grid in order to obtain predictions of stellar mass, radius, effective temperature, surface gravity and absolute MG magnitude. In a second step, using the temperature, gravity, metallicity and the extinction parameter A0, GSP-Phot uses 4D-linear interpolation over the model spectrum grid (MARCS, A, or OB) in order to obtain a predicted model BP/RP spectrum. This 4D-linear interpolation also produces extinction coefficients ABP, ARP, AV as well as reddening E⁢(GBP−GRP) and E⁢(B−V), which have been computed by integrating the model SEDs (see Section 16.2.3.2).

Since BP/RP spectra are not normalized and model SEDs come with fluxes scaling with σB⁢Teff4, GSP-Phot can solve for the amplitude of the interpolated model BP/RP spectrum to match the observed BP/RP spectrum. That amplitude is by definition:

a=(R/d)2>0 (16.17)

Note that BP and RP spectra have the same amplitude. Given the radius obtained from interpolating over the PARSEC isochrones, GSP-Phot can obtain a distance estimate from the solution for the BP/RP amplitude.

With these predictions, GSP-Phot then evaluates three χ2 values. First, the quality of fitting the BP/RP spectrum is computed in BP/RP coefficient space:

χXP2=(𝒄XP−a⁢DXP†⋅𝒇XP)T⋅CXP−1⋅(𝒄XP−a⁢DXP†⋅𝒇XP) (16.18)

Here 𝒄XP denotes the XP coefficient vector, a the XP amplitude, DXP† the pseudo-inverse of the XP design matrix, 𝒇XP the sampled model spectrum, and CXP the XP coefficient covariance matrix. Second, the quality of the distance estimate d is computed using the parallax measurement:

χϖ2=(ϖ−1/dσϖ)2 (16.19)

Third, the quality of predicting the apparent G-band magnitude is computed:

χG2=(G−MG−AG−5⋅log⁡d+5σG)2 (16.20)

The total combined quality is then given by:

χ2=Hδ⁢(χBP2)+Hδ⁢(χRP2)+χϖ2+χG2 (16.21)

Here Hδ⁢(⋅) denotes the Huber loss that is newly introduced in Gaia DR4 as discussed in Section 16.3.3.8 below. The total χ2 is then combined with the priors listed in Section 16.3.3.10 to form a log-posterior:

log-posterior=log-prior−12⁢χ2 (16.22)

This log-posterior is then minimized by first running differential evolution and then following this up with EMCEE (Foreman-Mackey et al. 2013) in order to estimate uncertainties. Estimates of stellar parameter values and their uncertainties are obtained from the EMCEE ensemble as mean values and 16th and 84th percentiles. A random subset of 100 samples from the EMCEE ensemble is also provided such that the user can propagate the uncertainties.

Each source is subjected to this processing by GSP-Phot three times, using the different libraries of model SEDs – MARCS, A and OB. Due to convergence failures, not all of the libraries manage to produce outputs all the time. From the available results, the ‘best’ library is then selected as the one achieving the highest mean log-posterior value averaged over the MCMC. As was discussed in Andrae et al. (2023a), the mean log-posterior corresponds to a Monte-Carlo estimate of the negative of the differential entropy. Consequently, by maximizing the mean log-posterior and hence minimizing the differential entropy, the best library provides the most information about the source from the point of view of information theory. However, for a given source, results from an individual library are ‘disqualified’ from the best-library selection, if one or more of the following conditions apply:

  • •

    log-posterior spread larger than 10 000 

  • •

    A0>9.95 mag (avoid pile-up at maximum value, but this will loose some sources that genuinely have higher extinctions)

  • •

    log⁡g>5.1 and |2.2⋅log⁡g−3−MG|<1 (remove artefact below main sequence)

  • •

    Teff>15000 K and MG>1.75 (remove spurious OB solutions)

  • •

    Teff>15000 K and radius<0.1  ℛ⊙ (remove spurious OB solutions)

  • •

    Teff closer than 2.5 K to minimal/maximal value (avoid pile-up at boundaries of model grids)

In that case, the results from the affected library are not removed, it is just not eligible to be selected as the best library.

16.3.3.6 Scope

GSP-Phot has processed all sources brighter than G<20 that have a parallax measurement. There are 1 082 339 439  sources with G<20, whereof 1 076 763 942  sources have a parallax. For comparison, in DR3 GSP-Phot produced results for 471 million sources with G<19. There is no real point of GSP-Phot going fainter than G>20 because the combined completeness of sources that have parallax measurements and BP/RP spectra drops dramatically towards the faint end.

16.3.3.7 Uses and limitations

When using GSP-Phot there is one aspect that needs to be kept in mind: While GSP-Phot is applied to all sources in order to produce a homogeneous catalogue, not all sources seen by Gaia are actually single stars. When applied to a source which is not actually a single star, GSP-Phot is likely to produce awkward stellar parameters. This is demonstrated for quasars and galaxies in Figure 16.8. As extended sources, galaxies in particular break the Gaia processing pipeline, which is designed for point sources. Consequently, when GSP-Phot results populate weird parts of the stellar-parameter space, it is necessary to consider the possibility that the source at hand may not actually be a single star at all.

Refer to caption
Refer to caption
Figure 16.8: Hertzsprung-Russell diagram from GSP-Phot for ten million randomly selected sources (grey histogram in the background showing logarithmic density) and highlighting as red points 20 000  randomly selected quasars (panel a) and 20 000  randomly selected galaxies (panel b). Quasar and galaxy classifications are taken from DSC (see Section 16.3.2).

Here we list the known limitations of GSP-Phot results in Gaia DR4:

  • •

    The uncertainty estimates given by the lower and upper confidence levels are systematically too small and not trustworthy. The most likely reason for this are systematic mismatches between models and real BP/RP spectra.

  • •

    The surface gravity and the radius and mass are not always self-consistent, due to interpolation errors over the isochrone grid. As is evident from Figure 16.9, there can be discrepancies between the log⁡g reported by GSP-Phot and the gravity computed from radius and mass. These interpolation errors are largest for late evolutionary states, due to the sparse sampling of isochrones towards the end of evolutionary tracks.

    Refer to caption
    Figure 16.9: Inconsistencies between log⁡g estimates and estimates or radius and mass from GSP-Phot for a random subset of 100 million sources.
  • •

    Distance estimates for LMC and SMC member stars are mostly too small because GSP-Phot converges to a solution corresponding to a nearby foreground dwarf instead of a distance luminous star. This happens in spite of the distance prior (see Section 16.3.3.10) being aware of the existence of the LMC and SMC.

16.3.3.8 Changes with respect to Gaia DR3

There have been numerous changes and modifications of GSP-Phot with respect to Gaia DR3. Here, we list the modifications which lead to significant improvements:

  • •

    The new BP/RP spectra and their BP/RP instrument model in Gaia DR4 are significantly better than in Gaia DR3. While this is no modification in GSP-Phot itself, this improvement in the input data and models has lead to a significant improvement in GSP-Phot results. In particular, metallicity estimates from GSP-Phot in Gaia DR4 are usable, which was not the case in Gaia DR3.

  • •

    In Gaia DR3, GSP-Phot interpolated the PARSEC isochrones over initial mass, whereas in Gaia DR4 the interpolation is over evolutionary state instead. The evolutionary state does a much better job of aligning the critical points of stellar evolution (e.g. Main-Sequence turn-off, blue loop, red clump) and thus yields much more reliable interpolation results (e.g. Fouesneau et al. 2022).

  • •

    In Gaia DR3, GSP-Phot initialized the ensemble of fit parameters in a small ball around the best-fit results from the Ilium algorithm (Bailer-Jones 2010). Instead, in Gaia DR4, GSP-Phot uses a random grid of 7500 parameters, and initializes the ensemble in a small ball around the best random grid point. The Ilium algorithm has been completely deactivated in Gaia DR4.

  • •

    In Gaia DR3, GSP-Phot used the χ2 on the BP/RP spectra as given in Equation 16.18. Instead, in Gaia DR4, GSP-Phot employs the Huber loss in BP/RP spectra:

    Hδ⁢(χ2)={χ2⇔χ2<δ22⁢δ⁢χ2−δ2otherwise (16.23)

    This is used in the total χ2 given in Equation 16.21. The adopted threshold was δ=5. This made GSP-Phot much less sensitive to individual outliers. In particular, the Huber loss weakens the impact of BP/RP spectra onto the total combined χ2 and thereby increases the importance of the contributions from parallax and apparent G magnitude to the total χ2.

16.3.3.9 New data products in DR4

There are some new parameters that are provided by GSP-Phot in Gaia DR4 that were not published in DR3:

  • •

    [Fe/H] and [M/H]: In Gaia DR3, GSP-Phot only produced [Fe/H] and treated it as identical to [M/H] during the isochrone interpolation. In Gaia DR4, GSP-Phot provides both [Fe/H] (used when interpolating over model SEDs) and [M/H] (used when interpolating over isochrones) separately. Note that [M/H] is the fit parameter, whereas [Fe/H] is derived using [α/Fe] tabulated in the model SEDs (Korn et al. 2026) and the relation from Salaris et al. (1993):

    [M/H]=[Fe/H]+log⁡(0.638⋅10[α/Fe]+0.362) (16.24)
  • •

    Stellar mass: GSP-Phot provides the initial mass resulting from the interpolation of the PARSEC isochrones.

  • •

    AV and E⁢(B−V): GSP-Phot provides this optical extinction and reddening for validation purposes and to make it easier for users to compare to other reference values. Neither AV nor E⁢(B−V) has been used for fitting data.

  • •

    Near-infrared extinctions and absolute magnitudes: GSP-Phot provides extinctions and absolute magnitudes for the 2MASS and WISE bands J, H, Ks, W1 and W2. The extinctions have been obtained as described in Section 16.2.3.2 and the absolute magnitudes are obtained from interpolation of the PARSEC isochrones. These additional parameters are provided for validation purposes and to simplify comparisons, e.g., by computing differences between observed near-infrared magnitudes and GSP-Phot predictions:

    Δ⁢mX=mX−MX−AX−5⋅log⁡d+5 (16.25)

    where X=J,H,K⁢s,W1,W2. An example use case is illustrated in Figure 16.10. Note that GSP-Phot never uses any near-infrared photometry in its fit, as its processing is based only on Gaia data.

    Refer to caption
    Refer to caption
    Figure 16.10: Comparison of GSP-Phot temperature residuals and residuals of near-infrared photometry for the 2MASS Ks band (panel a) and the CatWISE W1 band (panel b) for APOGEE DR17 (Abdurro’uf et al. 2022). Note that GSP-Phot does never use any near-infrared photometry in its fit.
  • •

    logpost_spread_gspphot: This is a diagnostic parameter that provides the difference between the highest and lowest log-posterior value that occurred during the MCMC. Typically, this value is between 10 and 20. If the log-posterior spread is much larger than 20, say 100, this suggests convergence problems.

16.3.3.10 List of priors

GSP-Phot has used three priors:

  • •

    Metallicity prior: This prior is a Gaussian with mean −0.5 and standard deviation of 0.3.

  • •

    Distance prior: This prior has been built from the Gaia EDR3 mock catalogue (Rybizki et al. 2020) including population IDs representing the LMC and SMC. Simulated stars from this catalogue have been binned into HEALPix pixels and within each HEALPix pixel, their distance distribution is stored in the format of percentiles. During GSP-Phot processing, the real star’s HEALPix pixel is used to access the correct percentiles, from which the prior probability is computed.

  • •

    Extinction prior: This is an exponential prior within the interval −0.1⁢mag<A0<10⁢m⁢a⁢g. The scale length of the exponential prior is given by:

    s=1+9⋅cos⁡b50⋅(1+exp⁡[−(d−100)/10]) (16.26)

    Here b denotes the Galactic latitude of the star at hand and d is the distance parameter.

These priors are the result of extensive testing.