EinsteinProbeClass#

class astroquery.esa.emds.einsteinprobe.EinsteinProbeClass(auth_session=None, tap_url=None)[source]#

Bases: EmdsClass

Einstein Probe TAP client.

This module provides access to Einstein Probe data through the EMDS multi-mission TAP and data services. It builds on the generic EMDS client and configures mission-specific defaults, such as the observation catalogue and table schema.

Set the session, alternative TAP url, initial parameter for the TAP connection

Parameters:
auth_sessionpyvo.auth.authsession.AuthSession, optional, default None

Authentication session to manage login

tap_urlstr, optional, default None

In case an alternative URL for the TAP needs to be defined

Returns:
A list of table objects

Attributes Summary

ESA_ARCHIVE_NAME

LOGIN_URL

LOGOUT_URL

REQUEST_PARAMETERS

TAP_URL

THRESHOLD

Class to init ESA TAP Module to communicate with {ESA_ARCHIVE_NAME} Science Archive

TIMEOUT

cache_location

tap

Initialize {ESA_ARCHIVE_NAME} TAP connection

Methods Summary

__call__(*args, **kwargs)

init a fresh copy of self

clear_cache()

Removes all cache files.

create_cone_search_query(ra, dec, ra_column, ...)

download_product(filename, *[, table, ...])

Download a single data product file.

download_products(products, *[, path, ...])

Download all products from a table returned by get_products().

get_job(jobid)

Returns the job corresponding to an ID from ISLA TAP.

get_job_list(*[, phases, after, last, ...])

Returns all the asynchronous jobs stored in ISLA TAP.

get_metadata(table)

Gets the specified table from ISLA TAP

get_observations(*[, target_name, ...])

Query the observation catalogue for this mission.

get_products(*[, observation_id, columns, ...])

Retrieve data products associated with Einstein Probe observations.

get_table(table)

Gets the specified table from ISLA TAP

get_tables(*[, only_names])

Return the tables available for this mission.

list_missions()

Retrieve the list of missions available in the EMDS ObsCore view.

login(*[, user, password])

Performs a login in ISLA TAP.

logout()

Performs a logout in ISLA TAP.

query_table(table_name, *[, columns, ...])

Query a set of columns from a specific table in ISLA TAP, using filters defined by the user

query_tap(query, *[, async_job, ...])

Launches a synchronous or asynchronous job to query the ISLA TAP

reset_cache_location()

Resets the cache location to the default astropy cache

Attributes Documentation

ESA_ARCHIVE_NAME: str = 'EinsteinProbe Space Archive (EPSA)'#
LOGIN_URL: str = 'https://emds.esac.esa.int/service/login'#
LOGOUT_URL: str = 'https://emds.esac.esa.int/service/logout'#
REQUEST_PARAMETERS = {}#
TAP_URL: str = 'https://emds.esac.esa.int/service/tap'#
THRESHOLD = 1e-05#

Class to init ESA TAP Module to communicate with {ESA_ARCHIVE_NAME} Science Archive

Subclasses must define:

ESA_ARCHIVE_NAME: str TAP_URL: str LOGIN_URL: str LOGOUT_URL: str TIMEOUT (Optional) = 60 REQUEST_PARAMETERS = {} THRESHOLD = 1e-5

TIMEOUT = 60#
cache_location#
tap#

Initialize {ESA_ARCHIVE_NAME} TAP connection

Returns:
A TAPService object connected to {ESA_ARCHIVE_NAME} TAP

Methods Documentation

__call__(*args, **kwargs)#

init a fresh copy of self

clear_cache()#

Removes all cache files.

create_cone_search_query(ra, dec, ra_column, dec_column, radius)#
download_product(filename, *, table=None, output_filename=None, path='', cache=False, verbose=False)[source]#

Download a single data product file.

The product is retrieved from the EMDS data service using its filename and saved locally.

Parameters:
filenamestr

Product filename stored in the mission tables (unique identifier).

tablestr, optional

Table to query for (filepath, filename). If not provided, defaults to the obscore table for Einstein Probe.

output_filenamestr, optional

Local filename for the downloaded file. Defaults to None.

pathstr, optional

Local directory where the file will be saved. Default is current working directory.

cachebool, optional

Use astroquery cache (if supported by your downloader).

verbosebool, optional

Verbose download output.

Returns:
str

Local file path returned by esautils.download_file.

download_products(products, *, path='', cache=False, cache_folder=None, verbose=False, params=None)#

Download all products from a table returned by get_products().

Parameters:
productsTable

Table returned by get_products(). The table must contain the access_url and obs_publisher_did columns.

pathstr, optional

Local directory where the downloaded files will be stored. If not provided, files are downloaded to the current working directory. Ignored if cache=True.

cachebool, optional

If True, store the downloaded files in the Astroquery cache. Default is False.

cache_folderstr, optional

Subdirectory within the Astroquery cache where files will be stored. Only used if cache=True.

verbosebool, optional

If True, print progress messages during download. Default is False.

paramsdict, optional

Additional parameters passed to the HTTP request.

Returns:
list of str

List of local file paths for the downloaded products.

get_job(jobid)#

Returns the job corresponding to an ID from ISLA TAP. Note that the user must be able to see the job in the current security context.

Parameters:
jobidstr, mandatory

ID of the job to view

Returns:
JobSummary corresponding to the job ID
get_job_list(*, phases=None, after=None, last=None, short_description=True)#

Returns all the asynchronous jobs stored in ISLA TAP. Note that the user must be able to see the job in the current security context.

Parameters:
phaseslist of str

Union of job phases to filter the results by.

afterdatetime

Return only jobs created after this datetime

lastint

Return only the most recent number of jobs

short_descriptionflag - True or False

If True, the jobs in the list will contain only the information corresponding to the TAP ShortJobDescription object (job ID, phase, run ID, owner ID and creation ID) whereas if False, a separate GET call to each job is performed for the complete job description

Returns:
A list of Job objects
get_metadata(table)#

Gets the specified table from ISLA TAP

Parameters:
tablestr, mandatory
full qualified table name (i.e. schema name.table name)
Returns:
A table object
get_observations(*, target_name=None, coordinates=None, radius=1.0, columns=None, get_metadata=False, output_file=None, **filters)#

Query the observation catalogue for this mission.

This method queries the mission-specific observation catalogue configured for this client and returns observation-level metadata as an Astropy table. Queries can be restricted using a cone search (by target name or coordinates) and additional column-based filters.

Parameters:
target_name: str, optional

Name of the target to be resolved against SIMBAD/NED/VIZIER

coordinates: str or SkyCoord, optional

coordinates of the center in the cone search

radius: float or quantity, optional, default value 1 degree

radius in degrees (int, float) or quantity of the cone_search

columnsstr or list of str, optional, default None

Columns from the table to be retrieved. They can be checked using get_metadata=True

get_metadatabool, optional, default False

Get the table metadata to verify the columns that can be filtered

output_filestr, optional, default None

file name where the results are saved. If this parameter is not provided, the jobid is used instead

**filtersstr, optional, default None

Filters to be applied to the search. The column name is the keyword and the value is any value accepted by the column datatype. They will be used to generate the SQL filters for the query. Some examples are described below, where the left side is the parameter defined for this method and the right side the SQL filter generated: obs_collection=”EPSA” -> obs_collection = ‘EPSA’ target_name=”AT 2023%” -> target_name ILIKE ‘AT 2023%’ dataproduct_type=[“img”, “pha”] -> dataproduct_type = ‘img’ OR dataproduct_type = ‘pha’ dataproduct_type=[“img”, “pha”] -> dataproduct_type IN (‘img’, ‘pha’) t_min=(“>”, 60000) -> t_min > 60000 s_ra=(80, 82) -> s_ra >= 80 AND s_ra <= 82

Returns:
An astropy.table containing the query results, or the metadata table when get_metadata=True
get_products(*, observation_id=None, columns=None, custom_filters=None, get_metadata=False, output_file=None, **filters)[source]#

Retrieve data products associated with Einstein Probe observations.

This method queries the mission product catalogue and returns product-level information. It ensures that the filename and filepath columns required for downloading products are included in the results.

Parameters:
observation_idstr, optional

Observation identifier to restrict the query (e.g. a specific observation).

columnsstr or list of str, optional

Columns to retrieve. If provided as a list, filename and filepath will be appended if missing. If not provided, a minimal useful set is used.

custom_filtersstr, optional

Additional ADQL conditions appended to the WHERE clause.

get_metadatabool, optional

If True, return metadata (columns) instead of results.

output_filestr, optional

If provided, save results to this file.

**filters

Column-based filters passed through to query_table method.

Returns:
astropy.table.Table
get_table(table)#

Gets the specified table from ISLA TAP

Parameters:
tablestr, mandatory

full qualified table name (i.e. schema name + table name)

Returns:
A table object
get_tables(*, only_names: bool = False)#

Return the tables available for this mission.

By default, only tables belonging to the mission-specific schema(s) are returned. Set only_names=True to return table names instead of table objects.

Parameters:
only_namesbool, optional

If True, return table names as strings. If False, return table objects.

Returns:
list

Table names (str) if only_names=True, otherwise table objects.

list_missions()#

Retrieve the list of missions available in the EMDS ObsCore view.

This method returns the distinct values of the obs_collection field from the ivoa.ObsCore view, where obs_collection typically identifies the mission or data collection associated with each observation.

Returns:
astropy.table that contains the distinct mission identifiers present in ObsCore.
login(*, user=None, password=None)#

Performs a login in ISLA TAP. TAP+ only User and password shall be used

Parameters:
userstr, mandatory, default None

Username. If no value is provided, a prompt to type it will appear

passwordstr, mandatory, default None

User password. If no value is provided, a prompt to type it will appear

logout()#

Performs a logout in ISLA TAP. TAP+ only

query_table(table_name, *, columns=None, custom_filters=None, get_metadata=False, async_job=False, output_file=None, output_format='votable', **filters)#

Query a set of columns from a specific table in ISLA TAP, using filters defined by the user

Parameters:
table_namestr, mandatory

name of the table where this query will be executed

columnslist of str or str, optional, default ‘None’

columns from the table to be retrieved

custom_filtersstr, optional, default ‘None’

No SQL filters defined by the user E.g. ADQL Intersect filter

get_metadata: bool, optional, default False

If set to true, the method will return an astropy.Table containing the available columns for this table, including the description, units, ucd, utype and data type

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

output_filestr, optional, default None

file name where the results are saved

output_formatstr, optional, default ‘votable’

results format

Users can defined more parameters, using the column names. They will be
used to generate the SQL filters for the query. Some examples are described below,
where the left side is the parameter defined for this method and the right side the
SQL filter generated:
StarName=’star1’ -> StarName = ‘star1’
StarName=’star*’ -> StarName ILIKE ‘star%’
StarName=’star%’ -> StarName ILIKE ‘star%’
StarName=[‘star1’, ‘star2’] -> StarName = ‘star1’ OR StarName - ‘star2’
ra=(‘>’, 30) -> ra > 30
ra=(20, 30) -> ra >= 20 AND ra <= 30
Returns:
An astropy.table object containing the results
query_tap(query, *, async_job=False, output_file=None, output_format='votable', verbose=False)#

Launches a synchronous or asynchronous job to query the ISLA TAP

Parameters:
querystr, mandatory

query (adql) to be executed

async_jobbool, optional, default ‘False’

executes the query (job) in asynchronous/synchronous mode (default synchronous)

output_filestr, optional, default None

file name where the results are saved. If this parameter is not provided

output_formatstr, optional, default ‘votable’

results format

verbose: bool, optional, default False

To log the query when executing this method.

Returns:
An astropy.table object containing the results
reset_cache_location()#

Resets the cache location to the default astropy cache