SSAQuery

class pyvo.dal.SSAQuery(baseurl, pos=None, diameter=None, band=None, time=None, format=None, request='queryData', session=None, **keywords)[source]

Bases: DALQuery

a class for preparing an query to an SSA service. Query constraints are added via its service type-specific properties and methods. Once all the constraints are set, one of the various execute() functions can be called to 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.

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
baseurlstr

the base URL for the SSA service

posSkyCoord class or sequence of two floats

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

diameterQuantity class or scalar float

the diameter of the circular region around pos in which to search. assuming icrs decimal degrees if unit is not specified.

bandQuantity class or sequence of two floats

the bandwidth range the observations belong to. assuming meters if unit is not specified.

timeTime class or sequence of two strings

the datetime range the observations were made in. assuming iso 8601 if format is not specified.

formatstr

the image format(s) of interest. “all” 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.

sessionobject

optional session to use for network requests

**keywords

additional case insensitive 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

band

the bandwidth range the observations belong to.

diameter

the diameter of the circular region around pos as a Quantity instance.

format

the image format(s) of interest.

pos

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

request

the type of service operation which is being performed

time

the datetime range the observations were made in.

Methods Summary

execute()

submit the query and return the results as a SSAResults instance

Attributes Documentation

band

the bandwidth range the observations belong to.

diameter

the diameter of the circular region around pos as a Quantity instance.

format

the image format(s) of interest. “all” 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.

pos

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

request

the type of service operation which is being performed

time

the datetime range the observations were made in.

Methods Documentation

execute()[source]

submit the query and return the results as a SSAResults 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