5.3.1 Crowding treatment
Author(s): Giorgia Busso
The first step in the crowding treatment of a transit is to establish its crowding status. This is done with the crowding evaluation (Section 5.3.1.2) which calculates the mutual position between the processed source and the neighbours, using a precomputed scene (see Section 5.3.1.1) containing the predicted observing time and AC coordinate in the focal plane for all objects in the source catalogue throughout the entire period covered by Gaia DR4.
Four cases are distinguished: (i) blend, when the sources are in the same window; (ii) contamination, when the neighbour is outside the window but its tail is inside; (iii) blend and contamination, which is a combination of the previous cases from different sources; and (iv) isolated, when no flux, or only a negligible amount, from the neighbour is inside the window. In Gaia DR4, the deblending process was executed for the first time (see Section 5.3.1.3), while the decontamination was not treated. Clearly, if a transit is isolated no further crowding processing is needed.
5.3.1.1 Scene
The scene is the computation of predicted observing time and AC coordinate in the focal plane for all objects in the source catalogue based on the satellite attitude as provided by AGIS (Section 4.1) and covering the entire time range of the Cycle 04 processing. This includes predicted observations for both FoVs. Each predicted observation is called a scene item.
For a given time range, the scene is computed following three main stages:
-
•
sky coverage computation: uses the attitude and scanning law to determine which HEALPix pixels on the sky are swept by the focal plane during the time range;
-
•
source selection: reads the source catalogue for the HEALPix pixels identified in the previous step;
-
•
observation prediction: computes the predicted observing time and AC pixel coordinate for both the BP and RP CCDs. This is done in two stages: i) a rough guess which propagates the source sky coordinates on the focal plane field angles and it is refined through an iterative process; ii) a further refined prediction which uses a full geometric mode to retrieve the predicted observing time, the AC pixel coordinates, and the CCD row assignment.
It can happen that a source falls outside the CCD boundaries or the refined prediction fails to converge, or the sky coverage computation fails because of gaps in the attitude. The failure can happen only for one of the photometers or for both, in which case the source is discarded entirely.
Note that the scene only contains sources that appear in the Gaia source catalogue. Because of this, and of the possible failures described above, some cases of contamination or blending may not be detected.
5.3.1.2 Crowding evaluation
For each transit the scene was interrogated to assess whether some of the surrounding scene items were blending or contaminating the current transit. The blending assessment is simply based on the relative distance between the transit window and the scene items: for Gaia DR4 a window slightly bigger than the acquired BP/RP window, is considered, adding 5 pixels on each side in the AL direction and 2 pixels on each side in the AC direction. The contamination assessment instead requires some knowledge of the distribution of the contaminating light surrounding a source: if the contaminating flux is bigger than 1 % of the total flux of the target source, then the transit is flagged as contaminated.
Transits around bright sources (transits that were not cross-matched to any source because believed to be spurious detections in the surroundings of bright objects) were used to characterize the AL and AC profiles of the contamination. The AL profile turned out to be quite complicated and was fitted using splines, while in the AC direction a linear interpolation in magnitude was deemed sufficient. These profiles were used to pre-compute look-up tables containing the AL leading and trailing extents (in OBMT nanoseconds) and the AC leading and trailing extents (in pixels), for each photometer (BP or RP), CCD row, source magnitude and colour of the contaminating source.
5.3.1.3 Deblending
The deblending module addresses the case where two or more sources fall within the same transit window. For such transits, the observed spectrum is a superposition of the spectra of all contributing sources, and the aim of the processing is to separate the contributions to obtain a clean spectrum for the target source. The module achieves this through a global non-linear least-squares fit over a set of selected transits, constrained by a basis-function representation of each source’s spectrum.
An example of a blended source is shown in Figure 5.3, where different transits are shown with different colours, and the different degrees of blending, depending on the mutual position of the sources in the transit window, are evident.
Not all transits evaluated as blended undergo the deblending treatment: sometimes the difference in magnitude between the sources and their relative position are such that the blending flux is negligible and applying the deblending could be harmful, as the resulting flux uncertainties might be bigger than the blending flux itself. Once the set of transits that can be deblended is identified, a subset of clean transits is selected: these are the transits for the same target source which were evaluated as non-blended or with a minimal amount of contaminating flux and are essential for constraining the spectral shape common to all transits of the target source.
The result of the fit for each source and photometer is then the deblended spectrum for each blended transit, carrying the deblended flux and uncertainty arrays for the target source.
The target source transits that undergo deblending are used to generate the mean spectrum for the target source only when an insufficient number of non-blended transits is available. The deblending is performed separately for BP and RP.
5.3.1.4 Truncation reconstruction
Truncation can arise when two (or more) sources have been assigned a window but they are so close that their windows overlap. At the moment of the acquisition each transit is assigned a priority which depends on the magnitude and the field of view: brighter sources have higher priority and if the overlapping windows come from different fields of view, the preceding field of view has higher priority over the following one. For the transit with the higher priority, the acquired window is preserved as a whole, for the other(s) the window(s) is truncated with the result that part of the spectrum is missing.
Truncation can also happen when the source falls close to the edge of the CCD, so that part of the window falls outside the CCD.
Truncation is always applied by macrosample, i.e., the missing samples are always a multiple of 4. Two types of truncation are distinguished, depending on which dimension of the acquired window is affected:
-
•
AC truncation, which removes some pixel columns and is reconstructed using an AC LSF depending on the pseudo-wavelength where truncation occurs;
-
•
AL truncation, which removes some samples and is reconstructed using pre-computed LSF templates used to model the spectral profile in the along scan direction.
Both AC LSF and AL templates were calculated on the Cycle 04 transits. Examples of AL template profiles are shown in Figure 5.4 and examples of AC LSF profiles are shown in Figure 5.5.


Truncated transits are classified by severity. A truncation is considered severe and unrecoverable if the missing portion is too large relative to the total window.
The recovery proceeds in two steps on transits that have been already partially calibrated, i.e., the differential dispersion function and the geometric calibration have been applied, and the bias and background have been subtracted. First, an AL LSF template is fitted to the observed (truncated) spectrum samples along the AL direction using a least-squares Levenberg–Marquardt algorithm. Second, the AC LSF profile is used to reconstruct the flux in the missing columns from the fitted AL template.
An example of truncation reconstruction is shown in Figure 5.6.
The two types of truncation are not equivalent in terms of which downstream products can be generated from the recovered spectrum: in the case of AC truncation, the reconstruction is only performed to produce an integrated flux while the epoch spectrum is provided in its truncated form, i.e., with a number of samples smaller than 60, and does not contribute to the generation of the mean spectrum; in the case of the AL reconstruction, the integrated flux is produced if the recovered spectrum covers the required wavelength range, while only the non-truncated part of the epoch spectrum can contribute to the generation of the mean spectrum.