skip to main content

gaia data release 4 documentation

4.1 Introduction

4.1.7 Error model: GoF statistics, weighting and outlier elimination

Important note: The information on goodness-of-fit statistics, weighting and outlier elimination in Gaia DR4 has changed with respect to Gaia DR3 in several significant ways. The changes are summarized in Table 4.2 and will be explained in the present subsection.

More generally, since the introduction of the basic astrometric model (Lindegren et al. (2012)) a number of detailed modifications have been implemented. The observation weight factors ωℓ introduced in Lindegren et al. (2012) represent a kind of non-linearity and were introduced to make the solutions robust against outliers. A variety of down-weighting methods are implemented within AGIS to give outliers a low weight (e.g. Huber downweight, see also Lindegren et al. (2012)), but the final iterations for all sources are always implemented using the Heaviside step function to give the end user clarity and to produce source statistics that can be easily reproduced by others. In particular, the step function gives a well-defined value for the degree of freedom of the parameter adjustment for each individual source.

The estimation of the statistical weight of each observation and the detection and removal of outliers in the solution are outlined below. More details are given in Appendix C of Hernandez et al. (2026). Another simplification is that we neglect the AC observations in the source update block of AGIS while still computing their weights to eliminate outliers in the attitude and calibration blocks.

The core astrometry in Gaia DR4 includes goodness-of-fit (GoF) statistics that provide information on the quality of the solution for a given source, namely astrometric_chi2_al, ruwe, astrometric_gof_al and astrometric_excess_noise. These fields were given also in Gaia DR3, and retain their nominal meaning in Gaia DR4; however, in Gaia DR4 the last three have been rescaled in a way that will, in most cases, make them more relevant for their intended purpose. This section describes how this was done. Table 4.2 gives an overview of the various GoF statistics in Gaia DR2, DR3, and DR4, and their interrelations.

All four quantities are given in gaia_source, all_source_astrometry and bright_source_astrometry, while only the first and last can be defined for crowded_field_source

Table 4.2: Notations for some GoF statistics, and their names in Gaia DR2, DR3, and DR4.
Description Notation Eq. Field in DR2 and DR3 Field in DR4
chi-square χ2 (4.10) astrometric_chi2_al astrometric_chi2_al
unit weight error (UWE) u (4.13) – –
standard score z (4.15) astrometric_gof_al (DR2) –
source excess noise ϵ (4.21 ) astrometric_excess_noise agis_source_excess_noisea)
significance of ϵ D (4.22) astrometric_excess_noise_sig –
scaled (renormalised) UWE uS (4.17) ruwe –
scaled standard score zS (4.18) astrometric_gof_al (DR3) –
rescaled UWE uR (4.20) – ruwe
rescaled standard score zR (4.19) – astrometric_gof_al
rescaled source excess noise ϵR (4.23) – astrometric_excess_noise
significance of ϵR DR (4.24) – – b)
Notes. The three panels show, from top to bottom, the formal, scaled, and rescaled statistics. a) This field only appears in the epoch_astrometry table. b) Not given, but in practice equivalent to max⁡(0,zR).

4.1.7.1 Chi-square, ruwe, and standard score

The AL chi-square of the solution is given by

χ2=∑lRl2⁢wlσ~l2, (4.10)

where Rl and wl are the residuals and downweights in the secondary solution, σ~l is the formal AL uncertainty of the observation, and the sum is taken over the AL observations l of the source. The formal uncertainty of the observation is a combination of the centroid uncertainty from the IDU-DIPD and of the calibration,

σ~l2=σIPD,l2+ϵcal,l2, (4.11)

where ϵcal,l is the calibration excess noise, a statistical estimate of the RMS modelling errors in the calibration model. It is computed using the methodology developed for the attitude excess noise (Section 5.2.5 in Lindegren et al. 2012), but introducing dependencies with time, FoV, CCD and the magnitude of the source observed. More details are given in (Section 3.4.3 in Hernandez et al. 2026).

In the secondary solution, wl is set to 1 or 0 depending on whether the observation was accepted or not (Section 4.4.3); thus, nobs=∑l1 (=astrometric_n_obs_al) is the total number of AL observations considered in the solution, ngood=∑lwl (=astrometric_n_good_obs_al) is the number actually used, and

ν=ngood−N (4.12)

is the number of degrees of freedom, with N=6 the number of parameters solved. The unit weight error (UWE) is then

u=χ2/ν. (4.13)

In the idealised case when the data are fully consistent with the standard source model, and the errors are independent normal variates with zero mean and variance σl2+ϵcal2, we expect χ2 to follow the chi-squared distribution with ν degrees of freedom; in particular E⁢(χ2)=ν and Var⁢(χ2)=2⁢ν. The distribution of u under the same assumptions is complicated, but asymptotically (for large ν) we have E⁢(u)≃1 and Var⁢(u)≃1/(2⁢ν). Because the distributions of χ2 and u depend on ν, it is convenient to transform them to a standard score z, which under the same assumptions will have a standard normal distribution 𝒩⁢(0,1), and hence E⁢(z)=0, Var⁢(z)=1. The exact transformation is

z=Φ−1⁢(Fχ2⁢(χ2;ν)), (4.14)

where Fχ2 is the cumulative chi-squared distribution and Φ−1 is the inverse cumulative standard normal distribution. When ν is not very small, Equation 4.14 can be approximated by means of elementary functions, and we use the well-known cube-root transformation (Wilson and Hilferty (1931))

z=(χ2/ν)1/3−(1−2/9⁢ν)2/9⁢ν=𝒢⁢(u;ν) (4.15)

where

𝒢⁢(u;ν)=9⁢ν2⁢[u2/3−1+29⁢ν] (4.16)

denotes the transformation used to ‘gaussianise’ the UWE. In Gaia DR2 this z was given as astrometric_gof_al.

Refer to caption
Figure 4.3: Distribution of the different versions of the standard score for Gaia DR4 sources with 10<G<11 mag. See text for further explanation.

In Gaia DR2 and DR3 it was noted that the distributions of the u and z deviated much more from the expected distributions, especially for red and blue stars, than could reasonably be explained by the presence of a binaries and other problematic sources. This was clearly an undesirable effect of residual calibration errors, and the remedy used was to scale the UWE by an empirical function of magnitude and colour,

uS=uu0⁢(G,C), (4.17)

where u0⁢(G,C) was estimated as the 41st percentile of u for sources of a given magnitude and colour index C=GBP−GRP. This uS is the renormalised unit weight error given in the field ruwe of Gaia DR2 and DR3. In Gaia DR3, the field astrometric_gof_al instead contained, for consistency, the gaussianised quantity

zS=𝒢⁢(uS;ν). (4.18)

For Gaia DR4 a similar procedure was used to calculate uS, except that C=ν^eff was used as colour argument in Equation 4.17, and that u0 was estimated from the 39th percentile of z for G>13, and from the 32nd percentile of z for G<13. These percentiles were found to be convenient proxies for the mode of z at all magnitudes.

However, in Gaia DR4 the field called ruwe was redefined to contain the rescaled quantity uR obtained by a further transformation. The background to this is illustrated in Figure 4.3, showing three successive versions of the standard score for the 0.66 million sources with 10<G<11 with complete core astrometry in Gaia DR4. The thin blue envelope shows the distribution of the standard score z according to Equation 4.15. This is essentially what would have been given as astrometric_gof_al if we still followed the Gaia DR2 recipe. Owing to the unmodelled calibration errors, it has a mode at z≃3.5, and if one were to apply a nominal criterion such as z>3 to filter out ‘bad’ sources, 76% of the sources would have been rejected. The thick red envelope shows the distribution of the scaled standard score zS Equation 4.18 for the same sample. The mode is now at zS≃0, as was the goal of the scaling in Equation 4.17. If we had followed the Gaia DR3 recipe, this is what astrometric_gof_al would contain. It is clearly much better than z; for example only 28% of the sample has zS>3. But the core of the distribution is still significantly wider than the expected normal distribution of unit standard deviation, shown by the dashed curve. This suggests that zS overestimates the ‘true’ standard score. To rectify this, the following rescaling was applied,

zR=zSz0⁢(G), (4.19)

where z0⁢(G) is the function shown in Figure 4.4. The resulting distribution, shown by the filled grey histogram, looks more reasonable and has zR>3 for 20% of the sample. The function z0⁢(G) was numerically determined by fitting the negative flank of the rescaled distribution to the expected unit width normal distribution, as can be seen in Figure 4.3. The required scaling of 𝒩⁢(0,1) suggests that 72% of this particular sample agrees (in some sense) with the standard source model – this percentage is found to increase almost monotonically with magnitude up to 95% for faint sources.

Refer to caption
Figure 4.4: Function z0⁢(G) used in Equation 4.19. Linear interpolation is used between the data points, and constant values are assumed for G≤7 and G≥21.

The quantity given as ruwe in several tables of Gaia DR4 is the rescaled UWE obtained by the inverse cube-root transformation

uR=𝒢−1⁢(zR;ν). (4.20)

The somewhat convoluted path to the GoF statistics in Gaia DR4 is summarised in the following graph:
blablabla [Uncaptioned image]

4.1.7.2 Source excess noise

The source excess noise (field astrometric_excess_noise in several tables of Gaia DR4) is an alternative way to quantify the discrepancy between the observations of a source and the fitted standard model, taking into account the formal uncertainties σ~l (Equation 4.11) of the individual observations. Whereas the UWE (or ruwe) can be interpreted as a dimensionless, multiplicative correction to the uncertainties, the source excess noise ϵ is a non-negative, additive correction, expressed as an angle in mas. ϵ=0 indicates a perfect fit. The source excess noise may be useful in cases where the model misfit can be given a physical interpretation, for example in terms of the angular extent of the object or of its astrometric orbit.

The procedure for fitting the standard source model to the AL observations is outlined in Section 4.4.3. In the final iteration, the downweight factors wl are kept fixed (at 0 or 1), and the source parameters are adjusted to minimise the quantity

Q=∑lRl2⁢wlσ~l2+ϵ2, (4.21)

using the smallest value of ϵ for which the minimised Q≤ν. Comparison with Equation 4.10, Equation 4.13, and Equation 4.15 shows that ϵ=0 if χ2≤ν, u≤ν≃1, or z≤2/9⁢ν≃0. Gaia DR2 and Gaia DR3 also gave the significance of ϵ, computed as

D={0if χ2≤ν,(χ2−ν)/2⁢νotherwise. (4.22)

The transformation of u and z discussed above was motivated by the empirical fact that the formal uncertainties σ~l in Equation 4.10) are generally underestimated, leading to an overestimation of χ2. The same effect will result in an overestimation of ϵ in Equation 4.21 when ϵ>0. In Gaia DR4, having replaced u and z by their rescaled equivalents uR and zR, it is desirable to make a corresponding transformation of ϵ for consistency. Unfortunately, there is no strict procedure for this based on the summary statistics calculated in the secondary solutions; it would require going back to the individual observations, which was not deemed worthwhile. However, on the assumption that all the accepted AL observations of a given source have approximately the same σ~l, a rescaled source excess noise can be derived as

ϵR={0if u≤1 or u≤u0⁢(G,C),ϵ⁢u2−u0⁢(G,C)2u2−1otherwise. (4.23)

This statistic is given as astrometric_excess_noise in Gaia DR4. The significance of ϵR can be obtained by inserting uR2⁢ν for χ2 in Equation 4.22; the result is

DR={0if uR≤1,(uR2−1)⁢ν/2otherwise. (4.24)

Under the (null) hypothesis that uR2⁢ν has the chi-squared distribution with ν degrees of freedom, we have E⁢(uR2)=1 and Var⁢(uR2)=2/ν. It is then clear that DR, for positive values, is simply a crude approximation of the standard score, for which zR provides a much better approximation. The statistic DR is therefore not given in Gaia DR4; if an equivalent statistic is needed, one may use max⁡(0,zR).

While Gaia DR4 gives ϵR as astrometric_excess_noise in the various astrometric source tables, the original (unscaled) value ϵ is also provided, but only in the epoch astrometry table. It is preserved to make it possible to reproduce the AGIS solution for a particular source from its epoch astrometry. The total variance of an observation must then be taken as

σ~l2+ϵ2=(centroid_pos_error_al)2+(agis_source_excess_noise)2. (4.25)

Naturally, if an alternative source model (e.g. an orbital solution) is fitted to the data, the source excess noise term should be omitted or re-evaluated.