gaia-dpci / GaiaXPy

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

Estimate the number of GaiaXPy queries to the Archive (GACS) #106

Closed druzm closed 3 months ago

druzm commented 4 months ago

It's been discussed internally that having the ability to estimate the number of queries to the Archive (GACS) launched from within GaiaXPy would be desirable.

GaiaXPy interacts with the Archive in two different ways, via a lists of sources, and via ADQL queries. It's been concluded that marking the queries launched from a list of sources is not possible with the existing Astroquery API, but marking the ADQL queries can be done by adding a comment to the queries themselves. This would allow to at least gather some partial statistics.

The suggestion is to use the following in ADQL queries:

SELECT source_id
FROM gaiadr3.gaia_source
WHERE
-- This query was launched from within GaiaXPy
parallax IS NOT NULL
AND random_index <= 100

The package version could be added to the message as well.

druzm commented 3 months ago

Fixed by #107