IrsaClass¶
- class astroquery.ipac.irsa.IrsaClass[source]¶
Bases:
BaseVOQueryAttributes Summary
Methods Summary
list_catalogs(*[, full, filter, ...])Return information of available IRSA catalogs.
list_collections(*[, servicetype, filter])Return information of available IRSA SIAv2 collections to be used in
query_siaqueries.list_columns(catalog, *[, full])Return list of columns of a given IRSA catalog.
query_region([coordinates, catalog, ...])Queries the IRSA TAP server around a coordinate and returns a
Tableobject.query_sia(*[, pos, band, time, pol, ...])Use standard SIA2 attributes to query the IRSA SIA service.
query_ssa(*[, pos, radius, band, time, ...])Use standard SSA attributes to query the IRSA SSA service.
query_tap(query, *[, async_job, maxrec])Send query to IRSA TAP.
Attributes Documentation
- sia¶
- ssa¶
- tap¶
Methods Documentation
- list_catalogs(*, full=False, filter=None, include_metadata_tables=False, cache=False)[source]¶
Return information of available IRSA catalogs.
- Parameters:
- fullbool
If True returns the full schema as a
Table. If False returns a dictionary of the table names and their description.- filterstr or None
If specified we only return catalogs when their catalog_name or the short description contains the filter string (case-insensitive). Note this may not be all the relevant catalogs from a given mission, do consult the unfiltered list when in doubt.
- include_metadata_tablesbool
If True returns not just the catalogs but all table holdings including the image metadata tables. These are not suitable for spatial queries with e.g.
query_region.
- list_collections(*, servicetype=None, filter=None)[source]¶
Return information of available IRSA SIAv2 collections to be used in
query_siaqueries.- Parameters:
- servicetypestr or None
Service type to list collections for. Returns all collections when not provided. Currently supported service types are: ‘SIA’, ‘SSA’.
- filterstr or None
If specified we only return collections then their collection_name contains the filter string.
- Returns:
- collectionsA
Tableobject. A table listing all the possible collections for IRSA SIA queries.
- collectionsA
- list_columns(catalog, *, full=False)[source]¶
Return list of columns of a given IRSA catalog.
- Parameters:
- catalogstr
The name of the catalog.
- fullbool
If True returns the full schema as a
Table. If False returns a dictionary of the column names and their description.
- print_catalogs()[source]¶
Deprecated since version 0.4.10: The print_catalogs function is deprecated and may be removed in a future version. Use list_catalogs instead.
- query_region(coordinates=None, *, catalog=None, spatial='Cone', radius=<Quantity 10. arcsec>, width=None, polygon=None, get_query_payload=False, columns='*', async_job=False, verbose=False, cache=True)[source]¶
Queries the IRSA TAP server around a coordinate and returns a
Tableobject.- Parameters:
- coordinatesstr,
astropy.coordinatesobject Gives the position of the center of the cone or box if performing a cone or box search. Required if spatial is
'Cone'or'Box'. Ignored if spatial is'Polygon'or'All-Sky'.- catalogstr
The catalog to be used. To list the available catalogs, use
list_catalogs().- spatialstr
Type of spatial query:
'Cone','Box','Polygon', and'All-Sky'. Defaults to'Cone'.- radiusstr or
Quantityobject, [optional for spatial is'Cone'] The string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used. Defaults to 10 arcsec.- widthstr,
Quantityobject [Required for spatial is'Box'.] The string must be parsable by
Angle. The appropriateQuantityobject fromastropy.unitsmay also be used.- polygonlist, [Required for spatial is
'Polygon'] A list of
(ra, dec)pairs (as tuples), in decimal degrees, outlining the polygon to search in. It can also be a list ofastropy.coordinatesobject or strings that can be parsed byastropy.coordinates.ICRS.- get_query_payloadbool, optional
If
Truethen returns the dictionary sent as the HTTP request. Defaults toFalse.- columnsstr, optional
Target column list with value separated by a comma(,)
- async_jobbool, optional
if True query is run in asynchronous mode
- coordinatesstr,
- Returns:
- tableA
Tableobject.
- tableA
- query_sia(*, pos=None, band=None, time=None, pol=None, field_of_view=None, spatial_resolution=None, spectral_resolving_power=None, exptime=None, timeres=None, publisher_did=None, facility=None, collection=None, instrument=None, data_type=None, calib_level=None, target_name=None, res_format=None, maxrec=None, **kwargs)[source]¶
Use standard SIA2 attributes to query the IRSA SIA service.
- Parameters:
- possingle or list of tuples
angle units (default: deg) the positional region(s) to be searched for data. Each region can be expressed as a tuple representing a CIRCLE, RANGE or POLYGON as follows: (ra, dec, radius) - for CIRCLE. (angle units - defaults to) (long1, long2, lat1, lat2) - for RANGE (angle units required) (ra, dec, ra, dec, ra, dec … ) ra/dec points for POLYGON all in angle units
- bandscalar, tuple(interval) or list of tuples
(spectral units (default: meter) the energy interval(s) to be searched for data.
- timesingle or list of
Timeor compatible strings the time interval(s) to be searched for data.
- polsingle or list of str from
pyvo.dam.obscore.POLARIZATION_STATES the polarization state(s) to be searched for data.
- field_of_viewsingle or list of tuples
angle units (default arcsec) the range(s) of field of view (size) to be searched for data
- spatial_resolutionsingle or list of tuples
angle units required the range(s) of spatial resolution to be searched for data
- spectral_resolving_powersingle or list of tuples
the range(s) of spectral resolving power to be searched for data
- exptimesingle or list of tuples
time units (default: second) the range(s) of exposure times to be searched for data
- timeressingle of list of tuples
time units (default: second) the range(s) of temporal resolution to be searched for data
- publisher_didsingle or list of str
specifies the unique identifier of dataset(s). It is global because it must include information regarding the publisher (obs_publisher_did in ObsCore)
- collectionsingle or list of str
name of the collection that the data belongs to
- facilitysingle or list of str
specifies the name of the facility (usually telescope) where the data was acquired.
- instrumentsingle or list of str
specifies the name of the instrument with which the data was acquired.
- data_type‘image’|’cube’
specifies the type of the data
- calib_levelsingle or list from enum
pyvo.dam.obscore.CALIBRATION_LEVELSspecifies the calibration level of the data. Can be a single value or a list of values- target_namesingle or list of str
specifies the name of the target (e.g. the intention of the original science program or observation)
- res_formatsingle or list of strings
specifies response format(s).
- max_recordsint
allows the client to limit the number or records in the response
- **kwargscustom query parameters
single or a list of values (or tuples for intervals) custom query parameters that a specific service accepts. The values of the parameters need to follow the SIA2 format and represent the appropriate quantities (where applicable).
- Returns:
- Results in
Tableformat.
- Results in
- query_ssa(*, pos=None, radius=None, band=None, time=None, collection=None)[source]¶
Use standard SSA attributes to query the IRSA SSA service.
- Parameters:
- pos
SkyCoordclass or sequence of two floats the position of the center of the circular search region. assuming icrs decimal degrees if unit is not specified.
- raidus
Quantityclass or scalar float the radius of the circular region around pos in which to search. assuming icrs decimal degrees if unit is not specified.
- band
Quantityclass or sequence of two floats the bandwidth range the observations belong to. assuming meters if unit is not specified.
- time
Timeclass or sequence of two strings the datetime range the observations were made in. assuming iso 8601 if format is not specified.
- collectionstr
Name of the collection that the data belongs to.
- pos
- Returns:
- Results in
Tableformat.
- Results in
- query_tap(query, *, async_job=False, maxrec=None)[source]¶
Send query to IRSA TAP. Results in
TAPResultsformat. result.to_qtable inQTableformat- Parameters:
- querystr
ADQL query to be executed
- async_jobbool, optional
if True query is run in asynchronous mode
- maxrecint, optional
maximum number of records to return
- Returns:
- result
TAPResults TAP query result.
- result.to_table
Table TAP query result as
Table- result.to_qtable
QTable TAP query result as
QTable
- result