Package gavo :: Package protocols :: Module siap
[frames] | no frames]

Module siap

source code

Support code for the Simple Image Access Protocol.

Classes
  SIAPCutoutCore
A core doing SIAP plus cutouts.
Functions
 
parseSIAP2Geometry(aString, fieldName='POS')
parses a SIAPv2 geometry spec to a pgsphere object.
source code
 
getPGSQuery(intersect, ra, dec, sizes, prefix, sqlPars)
returns SQL for a SIAP query on pgsSIAP tables.
source code
 
dissectPositions(posStr)
tries to infer RA and DEC from posStr.
source code
 
getQuery(queriedTable, parameters, sqlPars, prefix='sia')
returns an SQL fragment for a SIAP query for bboxes.
source code
Variables
  __package__ = 'gavo.protocols'
Function Details

parseSIAP2Geometry(aString, fieldName='POS')

source code 

parses a SIAPv2 geometry spec to a pgsphere object.

Parse errors raise validation errors for fieldName.

dissectPositions(posStr)

source code 

tries to infer RA and DEC from posStr.

In contrast to base.parseCooPair, we are quite strict here and just try to cope with some bad clients that leave out the comma.

getQuery(queriedTable, parameters, sqlPars, prefix='sia')

source code 

returns an SQL fragment for a SIAP query for bboxes.

The SQL is returned as a WHERE-fragment in a string. The parameters are added in the sqlPars dictionary.

parameters is a dictionary that maps the SIAP keywords to the values in the query. Parameters not defined by SIAP are ignored.