SIAQuery

class pyvo.dal.SIAQuery(baseurl, pos=None, size=None, format=None, intersect=None, verbosity=None, session=None, **keywords)[source]

Bases: pyvo.dal.DALQuery

a class for preparing an query to an SIA service. Query constraints are added via its service type-specific methods. The various execute() functions will submit the query and return the results.

The base URL for the query, which controls where the query will be sent when one of the execute functions is called, is typically set at construction time; however, it can be updated later via the baseurl to send a configured query to another service.

In addition to the search constraint attributes described below, search parameters can be set generically by name via dict semantics.

The typical function for submitting the query is execute(); however, alternate execute functions provide the response in different forms, allowing the caller to take greater control of the result processing.

initialize the query object with a baseurl and the given parameters

Parameters:
baseurl : str

the base URL for the SIA service

pos : SkyCoord class or sequence of two floats

the position of the center of the rectangular search region. assuming icrs decimal degrees if unit is not specified.

size : Quantity class or up to 2 floats.

the full rectangular size of the search region along the RA and Dec directions. converted if it’s a iterable containing scalars, assuming decimal degrees.

size : Quantity class or scalar float

the size of the rectangular region around pos. assuming icrs decimal degrees if unit is not specified.

format : str

the image format(s) of interest. “all” (default) indicates all available formats; “graphic” indicates graphical images (e.g. jpeg, png, gif; not FITS); “metadata” indicates that no images should be returned–only an empty table with complete metadata; “image/*” indicates a particular image format where * can have values like “fits”, “jpeg”, “png”, etc.

intersect : str

a token indicating how the returned images should intersect with the search region; recognized values include:

COVERS select images that completely cover the search region
ENCLOSED select images that are complete enclosed by the region
OVERLAPS select any image that overlaps with the search region
CENTER select images whose center is within the search region
verbosity : int

an integer value that indicates the volume of columns to return in the result table. 0 means the minimum set of columsn, 3 means as many columns as are available.

session : object

optional session to use for network requests

**keywords :

additional parameters can be given via arbitrary case insensitive keyword arguments. Where there is overlap with the parameters set by the other arguments to this function, these keywords will override.

Attributes Summary

format the image format(s) of interest.
intersect a token indicating how the returned images should intersect with the search region; recognized values include:
pos the position of the center of the rectangular search region as a SkyCoord instance.
size the size of the rectangular region around pos as a Quantity instance.
verbosity an integer value that indicates the volume of columns to return in the result table.

Methods Summary

execute(self) submit the query and return the results as a SIAResults instance

Attributes Documentation

format

the image format(s) of interest. “all” (default) indicates all available formats; “graphic” indicates graphical images (e.g. jpeg, png, gif; not FITS); “metadata” indicates that no images should be returned–only an empty table with complete metadata; “image/*” indicates a particular image format where * can have values like “fits”, “jpeg”, “png”, etc.

intersect

a token indicating how the returned images should intersect with the search region; recognized values include:

COVERS select images that completely cover the search region
ENCLOSED select images that are complete enclosed by the region
OVERLAPS select any image that overlaps with the search region
CENTER select images whose center is within the search region
pos

the position of the center of the rectangular search region as a SkyCoord instance.

size

the size of the rectangular region around pos as a Quantity instance.

verbosity

an integer value that indicates the volume of columns to return in the result table. 0 means the minimum set of columsn, 3 means as many columns as are available.

Methods Documentation

execute(self)[source]

submit the query and return the results as a SIAResults instance

Raises:
DALServiceError

for errors connecting to or communicating with the service

DALQueryError

for errors either in the input query syntax or other user errors detected by the service

DALFormatError

for errors parsing the VOTable response