16.3.6 ESP-ELS
Author(s): Yves Frémat
16.3.6.1 Goal
ESP-ELS identifies the BP/RP spectra of seven classes of emission-line stars (ELS): Be stars, Herbig Ae/Be, T Tauri, active M dwarfs, Wolf-Rayet WC and WN stars, and planetary nebulae. The selection and classification were based on the probability of H being in emission and on the use of two random forest classifiers trained on synthetic libraries and on observed BP/RP data from reference ELS. In addition, the module also provided a spectral-type tag (i.e. O, B, A, F, G, K, M, UCD, AGBC, WD) which was used to select the targets to be processed by the ESP-ELS and ESP-HS software packages. The module processed those targets brighter than G=18.25. Information on the processing of the ELS is also provided in Frémat et al. (2026).
16.3.6.2 Training data and models
The ESP-ELS used a combination of four random forest classifiers (RFC, Figure 16.12), each trained on a different set of synthetic and observed spectra.
RFC1/RFC2: Spectral type tagging
The spectral type tagging is used by ESP-HS to select O, B, and A-type stars independently of GSP-Phot’s parametrization. It is also used by the ESP-ELS when labelling highly reddened WR stars to avoid Carbon stars.
The classifier was trained on the BP and RP internally calibrated sampled spectra prepared by SMSgen. The considered wavelength domain varies from 350 to 640 nm in BP and from 640 to 1100 nm in RP, each normalized to its respective total flux. The colours and were also included among the training features. Two classifier versions were produced: RFC1, which includes the reddened absolute magnitude as an additional feature, and RFC2, which does not.
| spectral type | lower | upper |
|---|---|---|
| O | 30 000 | 60 000 |
| B | 10 164 | 30 000 |
| A | 7 300 | 10 164 |
| F | 6 200 | 7 300 |
| G | 5 100 | 6 200 |
| K | 3 900 | 5 100 |
| M | 2 700 | 3 900 |
| UCD | 2 700 | 2 700 |
| WD | empirical training | |
| AGBC | empirical training | |
The O, B, A, F, G, K, M, UCD (Ultra Cool Dwarfs) tags are trained on the complete set of available synthetic spectra and simulations. The domain covered by each of the tags is provided in Table 16.17. The spectral type tagging of Carbon rich Asymptotic Giant Branch stars (AGBC tag) and White Dwarfs (WD) is trained on observed BP/RP data. For the AGBC stars, we started from the sample of Suh (2021). For the WDs, we adopted the list of Gentile Fusillo et al. (2021) selecting targets with a probability of being WD and .
RFC3: Probability of having H in emission
The probability of having H emission in the RP band is used by ESP-ELS to identify ELS, other than WR stars and PNe, having strong H emission. The classifier was trained on synthetic RP spectra covering 630 - 750 nm, with a Gaussian emission component added to the H wavelength range. See also Frémat et al. (2026) for further information on the classifier and the adopted probability threshold.
RFC4: Identification of Wolf-Rayet stars and planetary nebulae
Wolf-Rayet stars and planetary nebula have very specific emission features (excluding H emission) that distinguish them from other stellar sources. RFC4 was therefore trained on these features extracted from the observed BP/RP data of known WC (wC label), WN (wN label) and PN (PlanetaryNebula label) targets to specifically identify these objects. The ’other’ classes of stars were represented by synthetic spectra (with no emission features) and observed spectra of Be, T Tauri, Herbig Ae/Be, and dMe stars. More details are provided in Frémat et al. (2026).
RFC5: Labelling of (mainly) H emitters
If the target shows strong H emission but is not identified as a WR star or PN, it is further classified by RFC5. The classifier assigns one of the following labels: beStar, HerbigStar, RedDwarfEmStar, and TTauri. It was trained on parts of the BP/RP spectrum normalized at their edges centred on the same emission features as for RFC4, and on the astrophysical parameters determined by GSP-Phot for these stars.
16.3.6.3 Inputs
ESP-ELS processes targets brighter than . The module input is made of the BP and RP spectra sampled over 120 samples per passband prepared by SMSgen. The data are only considered when it results from the co-addition of more than 10 transits in both passbands, and that the SNR integrated over the two passbands is sufficiently high ().
The astrophysical parameters (, , and ) derived by GSP-Phot are provided to the module without any filtering or post-processing applied. These APs are adopted to classify and correct the H pseudo-equivalent width (pEW) for spectral line and molecular band blends. Therefore, the module also requires a grid of pre-calculated H pEWs measured on the BP/RP simulations of non-ELS stars (i.e. synthetic spectra, Section 16.2.3) and tabulated as a function of , , , and .
16.3.6.4 Outputs
The results of the module are stored in two different tables. The spectral type tag information, as well as the H pseudo equivalent width and emission probability of H are stored in the ap_xp table. The results of the ELS labelling can be found in the ap_emission table.
In the first instance, ESP-ELS measures the H pEW (ew_espels_halpha) and its uncertainty (ew_espels_halpha_uncertainty). The adopted definition is such that the pEW should be negative when emission is present in the H domain. The value expected for a non-ELS equivalent of the star with same APs and derived on the simulated data is also derived (ew_espels_halpha_model). A quality flag (flags_espels_halpha) indicates if the model value was subtracted from the measurement (’1’) or not (’0’). While for Gaia DR3 the correction was applied for cooler stars, in Gaia DR4 ew_espels_halpha is left uncorrected and the quality flag should always be ’0’.
In addition, a first classifier trained on BP/RP simulations provides an estimate of the probability that H emission is present (ew_espels_halpha_probability). The probability varies from zero to one, with zero expected when there is no significant emission.
A second set of classifiers (RFC1/RFC2) determines the approximate spectral type of the target (spectraltype_espels). If the parallax and magnitude are not available, the module switches from RFC1 (spectraltype_espels_processmode = ‘0’) to RFC2 (spectraltype_espels_processmode = ‘1’). The adopted tag list is: UCD, M, K, G, F, A, B, O, AGBC, WD. This classification is based on a random forest algorithm that provides, per spectral type tag, a probability that is used to perform a quality assessment (flags_espels_spectraltype). Usually, its value ranges from 1 to 5 and is based on the first (p1) and second (p2) highest probability. The robustness of the spectral-type classification was further tested through Monte Carlo perturbations of the BP/RP spectra. For each source, a set of 50 simulated spectra was generated by adding random noise consistent with the flux uncertainties. The random forest classifier was then applied to each realization, producing an ensemble of predicted spectral types. If the spectral type obtained from the unperturbed spectrum occurred in less than 50% of the Monte Carlo realizations, the classification was considered not robust against noise and received a quality flag of ’6’. The spectra of targets tagged as ’AGBC’ were analysed to measure the band-head strength of the C and CN molecular bands, following the method described in Gaia Collaboration et al. (2023c) used to identify the golden sample of carbon stars. ’AGBC’ targets fulfilling these criteria were assigned a quality flag of ’0’. The full list of values taken by flags_espels_spectraltype is as follows:
-
1:
p1 and p2
-
2:
p1 and p2
-
3:
p1 and p2
-
4:
p1 and p2
-
5:
p1
-
6:
classification not stable against noise perturbations
-
0:
golden candidate C star.
The RFC4 classifier estimates the probability that a source is a carbon-rich Wolf–Rayet star (wC), a nitrogen-rich Wolf–Rayet star (wN), a planetary nebula (PlanetaryNebula), or any other type of object. The corresponding probability distributions used to assign these classes are stored in the following fields (the probability of any other class is the complement of the sum of the given probabilities):
-
-
Wolf Rayet WC stars (classprob_espels_wcstar)
-
-
Wolf Rayet WN stars (classprob_espels_wnstar)
-
-
planetary nebula (classprob_espels_pne).
When significant H emission was detected, classifier RFC5 was applied to allocate one label among: beStar, HerbigStar, RedDwarfEmStar, or TTauri. The corresponding probabilities are stored in:
-
-
Be stars (classprob_espels_bestar)
-
-
Herbig Ae/Be stars (classprob_espels_herbigstar)
-
-
T Tauri stars (classprob_espels_ttauristar)
-
-
active M dwarf stars (classprob_espels_dmestar)
The ELS class label having received the highest probability is saved in classlabel_espels. The procedure used to make the classification is indicated in classlabel_espels_mode, which takes value ’1’ or ’2’ (Section 16.3.6.5). A quality assessment based on the difference () between the two highest probability values is provided by the flag flags_espels_classlabel and takes the following values:
-
0:
-
1:
-
2:
-
3:
-
4:
16.3.6.5 Method
The module relies on five random-forest classifiers. These classifiers are applied to the BP/RP data (spectroscopy and photometry) and astrometry in the order shown in Figure 16.12. An estimate of the pseudo-equivalent width of H was obtained by drawing a linear pseudo-continuum between 646 and 670 nm, and then summing (where is the flux in a sample divided by the interpolated pseudo-continuum) over all samples within this interval. As a reference, the corresponding value measured on synthetic spectra (i.e. with no H emission) is also provided in the catalogue. This estimate, obtained by adopting the astrophysical parameters provided by GSP-Phot, can be helpful especially when analysing the H domain of stars cooler than 5000 K. The RFC4 classifier was applied to all incoming BP/RP spectra of sufficient quality. It identified candidate Wolf–Rayet stars (WC and WN) and planetary nebulae. If a spectrum was not classified as one of these types and significant H emission was detected, the RFC5 classifier was subsequently applied to assign a class among Be stars, T Tauri stars, Herbig Ae/Be stars, and active M dwarfs. The decision on the presence in the spectra of H emission was based on the probability derived by RFC3 in order to favour a clean sample of H emitters. More information on the methods applied and on the use of the H probability can be found in Frémat et al. (2026).
16.3.6.6 Scope
Results are usually provided for stars brighter than magnitude , with BP/RP spectra obtained over more than 10 transits, and of sufficient quality. No ELS class label is stored in the catalogue when no significant emission features were found.
16.3.6.7 Uses and limitations
Quality flags provided with the spectral type tags and ELS class labels can be used for target selection with thresholds depending on the scientific goals to achieve. The formal uncertainties on the H pseudo equivalent width are expected to be underestimated by a factor . These do not take into account the systematics due to e.g. molecular band blending, which affects stars cooler than 5000 K. Corrections are available in the catalogue and can be subtracted from the measured values to reduce the offsets. However, these strongly rely on the quality of the synthetic spectra and on the assumed astrophysical parameters. See also (Frémat et al. 2026) for a more detailed discussion on the results of the ESP-ELS module.
16.3.6.8 Changes with respect to DR3
-
•
The value saved in ew_espels_halpha is not corrected. One can apply the correction by subtracting ew_espels_halpha_model from it.
-
•
The Gaia DR3 ’CSTAR’ spectral-type tag was renamed ’AGBC’. The criteria described in Gaia Collaboration et al. (2023c) were applied to the BP/RP spectra to flag the ’golden C-star candidates’ within the sample of AGBC targets.
-
•
The ’WD’ spectral-type tag was introduced to help clean the results of the ESP-HS algorithm.
-
•
A probability for H being in emission is provided and used to identify the H emitters. In Gaia DR3, we used the H pEW to make the identification.
-
•
Two independent classifiers are used to label the ELS. RFC4 is used to identify WC, WN and planetary nebula from all other classes (with or without emission). Class probabilities are provided for WC, WN, and PN; the probability of the star belonging to any other class is given by the complement of the sum of these three probabilities. RFC5 is used to label targets exhibiting significant H emission. The considered classes are beStar, HerbigStar, RedDwarfEmStar, and TTauri, and the sum of their corresponding class probabilities is 1.