gaia-dpci / GaiaXPy

Gaia BP/RP spectra package
BSD 3-Clause "New" or "Revised" License
37 stars 9 forks source link

Update synthetic photometry handling for sources that are missing a spectrum from one of the two photometers #79

Closed druzm closed 10 months ago

druzm commented 10 months ago

For DR3, spectra for about 220M sources was published. Data for both photometers, BP and RP, was available for all sources except one (with source ID 5405570973190252288).

To generate synthetic photometry from this data in a particular system, GaiaXPy requires a file (included with the package if the system corresponds to one of the built-in systems) containing all the relevant details or values of said system. Each system file contains, among others, the band names, and a sampled mean wavelength as the mean value of the wavelength range covered by each band.

The decision regarding the generation of photometry for sources with a missing spectrum (considering other sources that could be missing a spectrum in one of the two photometers in the future) was to only generate photometry for the bands that had mean wavelength in the range covered by the existing spectrum. This is between 330 and 643 nm for BP, and between 635 and 1020 for RP. The flux/mag and flux error for bands with mean wavelengths outside the range covered by the existing data bands would be set to NaN.

Continuing the development towards the next data release, a different decision has been made. The photometry of an object with a missing spectrum will always be NaN for all bands in all systems. The output will contain an entry for the corresponding source with a NaN in all columns containing synthetic photometry values, so that users can see that the photometry has been generated, as it could be confusing if the results were simply omitted.

In the case of the existing source with a missing band and system Johnson-Cousins (JKC in GaiaXPy, see overlap in image below), this implies that the current output:

            source_id  Jkc_mag_U  Jkc_mag_B  Jkc_mag_V  Jkc_mag_R  Jkc_mag_I
  5405570973190252288        NaN        NaN        NaN  20.566642  18.151107

  In further releases of GaiaXPy, will become:

            source_id  Jkc_mag_U  Jkc_mag_B  Jkc_mag_V  Jkc_mag_R  Jkc_mag_I
  5405570973190252288        NaN        NaN        NaN        NaN        NaN

The same applies for the columns containing flux and flux error.

This difference also implies a change in the converter tool. See Issue #78.

overlapped_bands

druzm commented 10 months ago

Fixed by commit 90a523b.