cabaret.GaiaQuery.get_flux_table

cabaret.GaiaQuery.get_flux_table#

static GaiaQuery.get_flux_table(center: tuple[float, float] | SkyCoord | None = None, radius: float | Angle | None = None, bounds: tuple[float, float, float, float] | None = None, filter_bands: Filters | str | Sequence[Filters | str] = Filters.G, dateobs: datetime | None = None, limit: int = 100000, timeout: float | None = None, tap_source: GaiaTAPSource | GaiaSQLiteSource | str | None = None, allow_nulls: bool = False, keep_mag: bool = False) Table[source]#

Query and return a Table with all columns expressed as physical fluxes.

Identical to query() but additionally:

  • applies proper-motion correction when dateobs is given, and

  • converts supported magnitude columns to photons/s/m² using _mag_to_photons() and renames them (e.g. "j_m""j_flux" and "phot_g_mean_mag""g_flux").

Parameters:
  • center (tuple or astropy.coordinates.SkyCoord) – The sky coordinates of the center of the FOV.

  • radius (float or astropy.units.Quantity) – The radius of the FOV in degrees.

  • bounds (tuple or None) – Field-of-view bounds specified as (ra_min, ra_max, dec_min, dec_max) in degrees. RA values are interpreted modulo 360 (degrees) and may be given so that ra_min <= ra_max for a contiguous RA interval, or ra_min > ra_max to indicate an interval that wraps across RA=0 (for example (350.0, 10.0, -5.0, 5.0)). Declination bounds must satisfy -90 <= dec_min <= dec_max <= 90.

  • filter_bands (Filters, str, or sequence thereof, optional) – One or more filter bands. Default is Filters.G.

  • dateobs (datetime.datetime or None, optional) – Observation date for proper-motion correction. Default is None.

  • limit (int, optional) – Maximum number of sources to retrieve. Default is 100000.

  • timeout (float or None, optional) – Query timeout in seconds. Default is None (no timeout).

  • tap_source (GaiaTAPSource, GaiaSQLiteSource, str, or None, optional) – Query backend to use. Accepts a GaiaTAPSource, GaiaSQLiteSource, TAP URL, sqlite:///... URI, or .db/.sqlite/.sqlite3 path. Default is GaiaQuery.DEFAULT_TAP_SOURCE.

  • allow_nulls (bool, optional) – Forwarded to query(). If True, rows with NULL magnitude values are included in the result. Default is False.

  • keep_mag (bool, optional) – If True, retain the original magnitude column (e.g. "phot_g_mean_mag") alongside the converted flux column (e.g. "g_flux"). Default is False.

Returns:

Table with columns ra, dec, pmra, pmdec, and one flux column per requested band, all in photons/s/m². Gaia band columns are renamed from "phot_<b>_mean_mag" to "<b>_flux" (e.g. "g_flux"); 2MASS band columns are renamed from "<band>_m" to "<band>_flux" (e.g. "h_flux"). When keep_mag=True, the original magnitude columns are also present.

Return type:

astropy.table.Table

Examples

>>> from cabaret.queries import GaiaQuery, Filters
>>> from astropy.coordinates import SkyCoord
>>> center = SkyCoord(ra=10.68458, dec=41.26917, unit='deg')
>>> table = GaiaQuery.get_flux_table(
...     center, radius=0.1, filter_bands=[Filters.G, Filters.H, Filters.KS],
...     limit=10, timeout=30,
... )