SIAQuery

class pyvo.dal.sia.SIAQuery(baseurl, version='1.0')[source]

Bases: pyvo.dal.query.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 class attribute, std_parameters, list the parameters defined by the SIA standard.

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

Attributes Summary

allowed_intersects
dec the declination part of the position constraint (default: None).
format the desired format of the images to be returned. This will be in
intersect the search constraint that controls how images that overlap the
pos the position (POS) constraint as a 2-element tuple denoting RA and
ra the right ascension part of the position constraint (default: None).
size a 2-element tuple giving the size of the rectangular search region
std_parameters
verbosity an integer indicating the amount of metadata (i.e. columns) that will

Attributes Documentation

allowed_intersects = ['COVERS', 'ENCLOSED', 'CENTER', 'OVERLAPS']
dec

the declination part of the position constraint (default: None). If this is set but ra has not been set yet, ra will be set to 0.0.

format

the desired format of the images to be returned. This will be in the form of a MIME-type (e.g. “image/fits”) or one of the following special values. (Lower case are accepted when setting.)

Special Values:

ALL all formats available
GRAPHIC any graphical format (e.g. JPEG, PNG, GIF)
GRAPHIC-ALL all graphical formats available
METADATA no images reqested; only an empty table with fields properly specified

In addition, a value of “GRAPHIC-fmt[,fmt]” where fmt is graphical format type (e.g. “jpeg”, “png”, “gif”) indicates that a graphical format is desired with a preference for _fmt_ in the order given.

intersect

the search constraint that controls how images that overlap the search region are selected. Allowed (case-insensitive) 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 (POS) constraint as a 2-element tuple denoting RA and declination in decimal degrees. This defaults to None.

ra

the right ascension part of the position constraint (default: None). If this is set but dec has not been set yet, dec will be set to 0.0.

size

a 2-element tuple giving the size of the rectangular search region along the right-ascension and declination directions, measured in decimal degrees.

std_parameters = ['POS', 'SIZE', 'INTERSECT', 'NAXIS', 'CFRAME', 'EQUINOX', 'CRPIX', 'CRVAL', 'CDELT', 'ROTANG', 'PROJ', 'FORMAT', 'VERB']
verbosity

an integer indicating the amount of metadata (i.e. columns) that will be returned by a query where 0 is the minimum amount and 3 is the maximum available.