16.3.3 GSP-Phot
Author(s): René Andrae
16.3.3.1 Goal
GSP-Phot infers fundamental stellar parameters radius, mass, age, , , atmospheric parameters , , line-of-sight extinction , and distance of all sources. For this, GSP-Phot mainly relies on the BP/RP spectra, but also uses the measured parallax and integrated -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 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)
-
•
-band mean flux value, phot_g_mean_flux
-
•
-band mean flux error, phot_g_mean_flux_error
-
•
coefficient values, this is a DataLink product
-
•
coefficient errors, this is a DataLink product
-
•
coefficient correlations, this is a DataLink product
-
•
coefficient values, this is a DataLink product
-
•
coefficient errors, this is a DataLink product
-
•
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.
| ap_xp | description |
|---|---|
| teff_gspphot | effective temperature |
| logg_gspphot | surface gravity |
| mh_gspphot | global metallicity |
| feh_gspphot | Iron metallicity |
| radius_gspphot | stellar radius |
| mass_gspphot | stellar mass |
| age_gspphot | stellar age |
| distance_gspphot | distance |
| azero_gspphot | extinction parameter |
| ag_gspphot | extinction parameter |
| abp_gspphot | extinction parameter |
| arp_gspphot | extinction parameter |
| av_gspphot | extinction parameter |
| aj_gspphot | extinction parameter |
| ah_gspphot | extinction parameter |
| aks_gspphot | extinction parameter |
| aw1_gspphot | extinction parameter |
| aw2_gspphot | extinction parameter |
| ebpminrp_gspphot | reddening |
| ebminv_gspphot | reddening |
| absmag_g_gspphot | absolute magnitude |
| absmag_j_gspphot | absolute magnitude |
| absmag_h_gspphot | absolute magnitude |
| absmag_ks_gspphot | absolute magnitude |
| absmag_w1_gspphot | absolute magnitude |
| absmag_w2_gspphot | absolute magnitude |
| logposterior_gspphot | mean log-posterior averaged over MCMC |
| loglikelihood_gspphot | mean log-likelihood averaged over MCMC |
| logpost_spread_gspphot | maxmin 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 , 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 magnitude. In a second step, using the temperature, gravity, metallicity and the extinction parameter , 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 , , as well as reddening and , 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 , 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:
| (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 values. First, the quality of fitting the BP/RP spectrum is computed in BP/RP coefficient space:
| (16.18) |
Here denotes the XP coefficient vector, the XP amplitude, the pseudo-inverse of the XP design matrix, the sampled model spectrum, and the XP coefficient covariance matrix. Second, the quality of the distance estimate is computed using the parallax measurement:
| (16.19) |
Third, the quality of predicting the apparent -band magnitude is computed:
| (16.20) |
The total combined quality is then given by:
| (16.21) |
Here denotes the Huber loss that is newly introduced in Gaia DR4 as discussed in Section 16.3.3.8 below. The total is then combined with the priors listed in Section 16.3.3.10 to form a log-posterior:
| (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
-
•
mag (avoid pile-up at maximum value, but this will loose some sources that genuinely have higher extinctions)
-
•
and (remove artefact below main sequence)
-
•
K and (remove spurious OB solutions)
-
•
K and radius0.1 (remove spurious OB solutions)
-
•
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 that have a parallax measurement. There are 1 082 339 439 sources with , whereof 1 076 763 942 sources have a parallax. For comparison, in DR3 GSP-Phot produced results for 471 million sources with . There is no real point of GSP-Phot going fainter than 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.


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 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.
Figure 16.9: Inconsistencies between 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 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:
(16.23) This is used in the total given in Equation 16.21. The adopted threshold was . 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 and thereby increases the importance of the contributions from parallax and apparent magnitude to the total .
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:
-
•
and : In Gaia DR3, GSP-Phot only produced and treated it as identical to during the isochrone interpolation. In Gaia DR4, GSP-Phot provides both (used when interpolating over model SEDs) and (used when interpolating over isochrones) separately. Note that is the fit parameter, whereas is derived using [/Fe] tabulated in the model SEDs (Korn et al. 2026) and the relation from Salaris et al. (1993):
(16.24) -
•
Stellar mass: GSP-Phot provides the initial mass resulting from the interpolation of the PARSEC isochrones.
-
•
and : 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 nor 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 , , , and . 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:
(16.25) where . 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.


Figure 16.10: Comparison of GSP-Phot temperature residuals and residuals of near-infrared photometry for the 2MASS band (panel a) and the CatWISE 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 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 . The scale length of the exponential prior is given by:
(16.26) Here denotes the Galactic latitude of the star at hand and is the distance parameter.
These priors are the result of extensive testing.