gelsa.esa.euclid_archive#

Queries against the Euclid science archive (TAP).

Wrap a logged-in connection in EuclidArchive and ask it for products:

from astroquery.esa.euclid.core import EuclidClass from euclid_archive import EuclidArchive

Euclid = EuclidClass(environment=’IDR’) Euclid.login(credentials_file=’password’) archive = EuclidArchive(Euclid)

frames = archive.query_sir_frames(ra, dec) rows = archive.query_mosaic(tile_index)

Every query goes through _cached_launch_job(), so repeating one costs nothing and results survive a kernel restart. The query text is the cache key: keep it byte for byte if an existing cache entry is to be reused.

The survey tables - the combined spectra and the MER catalogues - need a login. Their schema (dr1 or catalogue) is found with a test query, see EuclidArchive.survey_schema; the product tables are in dr1.

Functions

clear_query_cache([disk])

Drop cached query results, forcing the next queries to hit the archive again.

object_id_to_radec(object_id)

Extract RA, Dec from object_id

Classes

EuclidArchive(connection[, ...])

Product queries against one archive connection.

gelsa.esa.euclid_archive.clear_query_cache(disk=True)[source]#

Drop cached query results, forcing the next queries to hit the archive again.

Also removes the on-disk cache unless disk=False.

gelsa.esa.euclid_archive.object_id_to_radec(object_id)[source]#

Extract RA, Dec from object_id

class gelsa.esa.euclid_archive.EuclidArchive(connection, schema_preference=None, survey_schema=None)[source]#

Bases: object

Product queries against one archive connection.

The survey tables (combined spectra and MER catalogues) are looked for in each schema of schema_preference in turn, and the first one that answers a test query is used for all of them (see survey_schema). The product tables (mosaics, segmentation maps, SIR frames, MER final catalogue) are in product_schema.

property survey_schema#

the first in schema_preference where a test query on mer_catalogue_deep_survey succeeds.

The test runs once per instance and bypasses the query cache, so a cached answer cannot hide the tables moving to another schema.

Type:

Schema of the survey tables

property connection#

The astroquery EuclidClass the queries run on.

query(adql)[source]#

Run an ADQL query through the cache.

query_mer_catalog_by_tile(tile_index, patch_id=None, processing_mode=None, purpose=None)[source]#

Query path to MER final catalogue tile.

query_mer_catalog_by_radec(ra, dec, patch_id=None, survey='deep', radius_deg=0.3)[source]#

Query path to MER final catalogue tile.

load_tile_image(tile, patch_id=None, filter='NIR_J', processing_mode=None, purpose=None)[source]#

Load an image by tile index, filter and optional patch ID.

Returns image, segmap, wcs

query_sir_combined_spectra_by_radec(ra, dec, patch_id=None, survey='deep', radius_arcsec=0.3)[source]#

The radius is in arcseconds here, not degrees.