9.4.1 Source detection
The Source Detection and Image Parameter Determination (IPD) is the first step in the crowded-field pipeline. It is largely based on the nominal IDU IPD processing, see Section 3.4.2.2 and Castañeda et al. (2015). For the crowded-field processing, this step is an iterative process, as shown in the schematic diagram of Figure 9.2. It is applied independently to each image and without an input source catalogue. This means that the pipeline regards all detections as new ones and does not omit any source detection, no matter whether the source exists as a nominal source already or not.
To be as consistent with the nominal process as possible, the nominal Point Spread Function (PSF) calibration (see Section 3.3.5) and nominal IPD fitting core routines (see Section 3.3.7) are used for the crowded-field detections. For the PSF fit, around each source only a small section of the image is considered, thus emulating a nominal Gaia readout window. Apart from the PSF fit, the crowded-field processing is not limited to the nominal Gaia readout window. Therefore for each source the environment is accurately taken into account, and the PSF fits are repeated as knowledge of the source environment improves. Each step of this process is described in more detail below.
9.4.1.1 Preprocessing
Preprocessing is done in two steps. First, the image is prepared for processing by applying calibrations and flagging potential issues. Bias and gain levels are corrected in the same way as in the nominal processing, see Section 3.4.7. Potentially problematic samples are flagged and excluded in the fit procedure. There are five reasons to exclude a sample:
-
•
Saturation – the CCD health libraries are queried to find saturated samples, see Section 3.3.3.
-
•
Hot columns – the CCD health libraries indicate hot columns, too, see Section 3.3.3.
-
•
Cosmics and cosmic tails – cosmics are detected as peaks being too sharp when compared to the PSF, hence they cannot originate from the optics. Some bright cosmics produce trailing tails with a length of a few samples that are flagged as well.
-
•
Below-bias samples – samples with flux values below times the total detection noise.
-
•
Bright-source PSF spikes – PSF spikes in the trailing along-scan direction are flagged using an empirical criterion. This flagging is applied only outside the window used for the PSF fit of the bright source, so as not to affect the fit parameters. It prevents the creation of spurious detections along the PSF spike.
Second, the background levels are determined from the calibrated image. The background is estimated on a grid sampled every samples. The background value for each grid position is the average of all grid cell samples that are consistent with a sampling from a Poisson background distribution. Between the grid points the background is spline-interpolated.
9.4.1.2 Source detection and PSF fit
The source detection and PSF fitting is done iteratively in three cycles, each consisting of one source detection run and four PSF fit runs for all detections in the image, as illustrated in Figure 9.2.
Prior to each source detection run, the scene and the background are subtracted from the observed image. The scene is an artificial image that includes the PSF fit models of all already detected sources. Source candidates are identified as local flux maxima in the resulting scene- and background-corrected image. For the very first detection run there are no detected sources yet, hence the scene is empty. Therefore in the first detection run, most source candidates in the image are found. In the subsequent iterations the already known sources are then part of the scene and thus subtracted before source detection. This enables the detection of increasingly fainter additional source candidates.
The significance of each source candidate is calculated as the cross-correlation of a sample area centred on the source location with a PSF-based kernel. Only sources with a significance larger than 3 are kept. An initial guess of the source position and flux is calculated from this samples area.
After each source detection, four global PSF fit runs are done. A global PSF fit run consists of fitting all sources in the image in the order of decreasing flux, i.e., the brighter sources are processed first and their signal is already taken into account when processing the fainter ones. For each source, a nominal readout window centred on the source is simulated. The location and size of the simulated readout window emulate a nominal Gaia observation that is used with the nominal PSF fit routines to obtain source coordinates and flux. The across-scan (AC) size of the window is fixed to six samples (twelve pixels). The along-scan (AL) size is limited by the nominal PSF reliability mask and is not larger than 9 samples (18 pixels). However, for faint sources it was further reduced to minimize the contribution from neighbouring sources. The minimum AL size of the window was six samples (twelve pixels). In case a source was already fit in a previous PSF fit run, its model PSF is removed from the scene. The sum of the remaining scene and the background is used as window background. In this way, the information about the environment of the source is taken into account when performing the PSF fit. Then the nominal PSF fit is applied to this simulated window, as described in Section 3.3.7. Once source parameters are obtained, the earlier PSF fit model of the source is replaced by the new best-fitting PSF model and added back to the scene. Outside the fitted window, the far-wing PSF model is used (Section 3.3.6). The pipeline then proceeds with the next source.
Once all sources are fit four times, the source detection is repeated – now with an updated scene taken into account – to add new sources to the list. After the source detection run, the global PSF fit cycle is repeated, going again from the brightest to the faintest source four times. New sources and sources already processed in the previous cycles are treated in the same way, except that for new sources an initial guess is made for the parameters, while for the already processed ones the results of the previous fit are used as starting values for the new fit.
With each PSF fit run the scene gets better and better defined, as with each fit iteration better defined PSF models are added back to the scene. The procedure is illustrated in Figure 9.3. It shows two close-by sources in 1D, where the background is set to zero and the PSF is a Gaussian. The black curve represents the observed ‘image’, the red curve is the result of a single source fit and the blue curve shows the scene. Initially, the scene is zero, as no sources were fit yet (panel a). The brighter source is fit (panel b), but the fit is not very accurate, as it is an attempt to fit both sources simultaneously with a single Gaussian. The PSF model of the first source is added to the scene (panel c). The fainter source is fit with the scene taken into account (panel d). This fit is also suboptimal as the bad fit of the brighter source affects it. It is added to the scene that now combines the fit models of both sources (panel d). With this, the first global fit run ends. The second global fit starts again with the brightest source. Its earlier fit model is subtracted from the scene (panel e). The new fit for the bright source takes the presence of the fainter source into account and produces a much better fit (panel f). This new fit model is added back to the scene (panel f). The earlier fit of the fainter source is subtracted from the scene (panel g) that now contains the improved model of the first source only, so that the second source can be fit much better (panel h). Its new fit replaces the old fit of the fainter source in the scene (panel h). Finally, the scene contains good PSF models for both sources.
Empirical tests showed that four global PSF fit runs are needed to get good results – further fits alter the source positions by negligible amounts only. In order to save computational time, PSF fits are repeated only in case the source parameters changed between two consecutive fits. In case the source parameters did not change, the source fit is regarded as converged and omitted in further global PSF fit runs up to the next source detection.
9.4.1.3 Detection filter
Once all source detection and PSF fit cycles are completed, the list of detections is cleaned from likely spurious ones. A detection is removed if it satisfies any of the following criteria:
-
•
The measured flux is below 50 .
-
•
The uncertainty of the estimated position in the window is above 1 pixel.
-
•
The measured along-scan position is further than 1.2 pixels away from the window centre.
-
•
The number of degrees of freedom of the fit is below 22, which means that fewer than 25 samples were used in the fit.
-
•
The measured position is located within 2 samples from the image border.
-
•
The measured position and flux are within a certain magnitude difference and spatial separation from a brighter neighbouring detection:
-
–
The detection is faint () and has a brighter neighbour ().
-
–
The detection is at least magnitudes fainter and is located within 1 pixel distance in AC direction and 4.5 to 6 samples (9 to 12 pixels) in AL direction from the brighter source.
-
–
In a few SIF CF images, stray light produced many spurious detections. Therefore, the most prominent stray light features were identified and crowded-field detections were excluded from further processing in the corresponding observing time ranges. This has also been taken into account when building the bounding polygons, see Section 9.4.3. Table 9.1 lists the image_id of those images with strong stray light features together with the time intervals that were excluded from the images. In total there are 32 images affected.
| image_id | ObmtSmStart | ObmtSmEnd |
|---|---|---|
| 1485391959245762970 | 187013438806273264 | 187013439187192560 |
| 1585354207296795033 | 192869171416161136 | 192869172880239664 |
| 1485391457204590779 | 187013438686793808 | 187013439169360464 |
| 1847067776277903115 | 108200219288621696 | 108200225577576432 |
| 1847067349465528029 | 108200215907404416 | 108200220623850720 |
| 1847067844561098970 | 108200221028506432 | 108200221714789360 |
| 1847068015252494540 | 108200217955473536 | 108200225817430048 |
| 1984910188676144955 | 116274937765384304 | 116274938177258448 |
| 2030247746985621279 | 118930784567753280 | 118930828556566656 |
| 2030247269036397677 | 118930804328353856 | 118930810224010224 |
| 2142647156280637867 | 125515100792402832 | 125515101576931056 |
| 2030247866506434766 | 118930802964047200 | 118930808663235392 |
| 2259488464910964940 | 132359580135394576 | 132359581706745552 |
| 2259488481990170843 | 132359580350786976 | 132359583100666544 |
| 2378673257685686778 | 139341384687767136 | 139341385473098736 |
| 2441011233190860955 | 142993103579481936 | 142993104148381056 |
| 2378673223560853851 | 139341384654706064 | 139341385636269264 |
| 3000549993998997724 | 175770580654505088 | 175770582814828032 |
| 3000550062282266827 | 175770581118670240 | 175770583080490144 |
| 2909070516676720986 | 170411748126004704 | 170411751269881088 |
| 3065864184137529580 | 179596626864924768 | 179596629212093184 |
| 3000550130565535946 | 175770581184077152 | 175770582754269568 |
| 3065864286545558347 | 179596627550284544 | 179596629097154112 |
| 3124598165074106589 | 183037240294727424 | 183037245190904224 |
| 3124598250403027150 | 183037238418961440 | 183037244291719520 |
| 3200675584528373946 | 187493831379661472 | 187493832554321184 |
| 3124598284561438943 | 183037236477617760 | 183037243945064864 |
| 3200675686936500427 | 187493831282075424 | 187493834999786976 |
| 3200675789378181309 | 187493829225210112 | 187493834703899616 |
| 3200675738174118076 | 187493830151190144 | 187493835653933728 |
| 3200675806457387214 | 187493832198415904 | 187493833156420576 |
| 3290107244562897099 | 192732654573528960 | 192732655335432064 |
9.4.1.4 TransitId update
Throughout Gaia, each source transit is assigned a unique transit_id that is constructed from the observation time and across-scan image position of the window (see the description in transit_id). It regularly happens that a source detected in a SIF CF image is processed by nominal Gaia as well. To avoid the nominal and the crowded-field detection getting the same transit_id, all transit_ids of crowded-field detections are verified to not exist in the nominal Gaia pipeline already. In case a crowded-field transit_id is found to be already assigned to a nominal detection, the crowded-field source transit_id is altered. In this case, the OBMT counter (which is encoded in the transit_id) is raised by one for the crowded-field transit_id to ensure that all transit_ids are unique throughout Gaia.