astro.services.vo package

Submodules

astro.services.vo.AwVO module

class astro.services.vo.AwVO.AccessVOResource(inp_dic, out_file='inpVORes.vot')

Bases: object

getData(ra_c, dec_c, size1, size2=0.0)
make_SourceList(name='SDSS')
make_fits(fits_name, name='SDSS')
exception astro.services.vo.AwVO.AccessVOResourceError

Bases: Exception

class astro.services.vo.AwVO.VOResourceDic(inp_tree)

Bases: object

getItem(inp)
printConeSearch()
printSIA()
printlist()
class astro.services.vo.AwVO.VOResourceDicError

Bases: object

class astro.services.vo.AwVO.XMLTree(inp_file)

Bases: object

output_tree(node, c_nodeName='root', level=0)
exception astro.services.vo.AwVO.XMLTreeError

Bases: Exception

astro.services.vo.AwVO.cast_rec(inp_v, inp_f)
astro.services.vo.AwVO.find_field(inp_f, inp_v)

astro.services.vo.HtmlVOConeSearch module

astro.services.vo.HtmlVOConeSearch.B1950_J2000(x, y)
astro.services.vo.HtmlVOConeSearch.ConeSearchError(Exception)
class astro.services.vo.HtmlVOConeSearch.HtmlVOConeSearch(args)

Bases: common.services.general.HtmlBase.HtmlBase

LVCast(inp_field)
LVCastField(inp_field)
conesearch(area=None, attributes=None, slid=None)

do the conesearch and generate the output HTML or VOTABLE

conesearch_project(ra_c, dec_c, rad_c, ra_min, ra_max, dec_min, dec_max, verb, project_inp=None, instrument_inp=None)

do the conesearch and generate the output HTML or VOTABLE

getContentType()
getExtinction(ra_c, dec_c, sr, verb, inp_project='')
getHtml()
getLVCatalogue(ra_c, dec_c, sr, verb)
get_dec()
get_instruments(inp_arr)
get_projects(inp_arr)
get_ra()
get_radius()
select_intersection(ra_min, ra_max, dec_min, dec_max, instrument=None, project=None)
astro.services.vo.HtmlVOConeSearch.J2000_B1950(x, y)
astro.services.vo.HtmlVOConeSearch.UCD_print(inp_f)
astro.services.vo.HtmlVOConeSearch.get_area(i_ra, i_dec, i_sr)
astro.services.vo.HtmlVOConeSearch.inside(x1, x2, xinp)
astro.services.vo.HtmlVOConeSearch.mult_matrix(x, y)

astro.services.vo.HtmlVOConeSearchPlastic module

astro.services.vo.HtmlVOConeSearchPlastic.B1950_J2000(x, y)
astro.services.vo.HtmlVOConeSearchPlastic.ConeSearchError(Exception)
class astro.services.vo.HtmlVOConeSearchPlastic.HtmlVOConeSearch(args)

Bases: common.services.general.HtmlBase.HtmlBase

LVCast(inp_field)
LVCastField(inp_field)
conesearch(area=None, attributes=None, slid=None)

do the conesearch and generate the output HTML or VOTABLE

conesearch_project(ra_c, dec_c, rad_c, ra_min, ra_max, dec_min, dec_max, verb, project_inp=None, instrument_inp=None)

do the conesearch and generate the output HTML or VOTABLE

getContentType()
getHtml()
getLVCatalogue(ra_c, dec_c, sr, verb)
get_dec()
get_instruments(inp_arr)
get_projects(inp_arr)
get_ra()
get_radius()
select_intersection(ra_min, ra_max, dec_min, dec_max, instrument=None, project=None)
astro.services.vo.HtmlVOConeSearchPlastic.J2000_B1950(x, y)
astro.services.vo.HtmlVOConeSearchPlastic.get_area(i_ra, i_dec, i_sr)
astro.services.vo.HtmlVOConeSearchPlastic.inside(x1, x2, xinp)
astro.services.vo.HtmlVOConeSearchPlastic.mult_matrix(x, y)

astro.services.vo.HtmlVODataSearch module

class astro.services.vo.HtmlVODataSearch.HtmlVOSIAP(args)

Bases: common.services.general.HtmlBase.HtmlBase

conesearch(area=None, attributes=None, slid=None)

do the conesearch and generate the output HTML or VOTABLE

getHtml()
get_dec()
get_projects(inp_arr)
get_ra()
get_radius()
astro.services.vo.HtmlVODataSearch.get_area(i_ra, i_dec, i_sr)
astro.services.vo.HtmlVODataSearch.get_chiparea(InpChip)
astro.services.vo.HtmlVODataSearch.inside(x1, x2, xinp)
astro.services.vo.HtmlVODataSearch.make_row(InpImg)

make a row for image

astro.services.vo.HtmlVODataSearch.putrangex(xinp)
astro.services.vo.HtmlVODataSearch.putrangey(x1, x2, xinp)

astro.services.vo.HtmlVODefault module

File HtmlProcess.py Author WJ Vriernd (wjvriend@astro.rug.nl) Date Apr 2005

class astro.services.vo.HtmlVODefault.HtmlVODefault(args)

Bases: common.services.general.HtmlBase.HtmlBase

getHtml()
initializeTemplate(tmpl)

initialize the template, filling vars known before processing

astro.services.vo.HtmlVORegistry module

File HtmlProcess.py Author WJ Vriernd (wjvriend@astro.rug.nl) Date Apr 2005

class astro.services.vo.HtmlVORegistry.HtmlVORegistry(args)

Bases: common.services.general.HtmlBase.HtmlBase

getContentType()
getHtml()
initializeTemplate(tmpl)

initialize the template, filling vars known before processing

astro.services.vo.HtmlVOSIAP module

class astro.services.vo.HtmlVOSIAP.HtmlVOSIAP(args)

Bases: common.services.general.HtmlBase.HtmlBase

conesearch(area=None, attributes=None, slid=None)

do the conesearch and generate the output HTML or VOTABLE

getContentType()
getHtml()
get_dec()
get_instruments(inp_arr)
get_projects(inp_arr)
get_ra()
get_radius()
make_SIAP_VOTABLE(sls, name)
select_intersection_circle(img_name, ra_min, ra_max, dec_min, dec_max, instrument=None, project=None)
astro.services.vo.HtmlVOSIAP.get_area(i_ra, i_dec, i_sr)
astro.services.vo.HtmlVOSIAP.get_chiparea(InpChip)
astro.services.vo.HtmlVOSIAP.get_coo(inp)
astro.services.vo.HtmlVOSIAP.get_size(inp)
astro.services.vo.HtmlVOSIAP.inside(x1, x2, xinp)
astro.services.vo.HtmlVOSIAP.isinside(dec_min, dec_max, min_dec, max_dec)
astro.services.vo.HtmlVOSIAP.make_SIAP_HEADER()
astro.services.vo.HtmlVOSIAP.make_row(InpImg)

make a row for image

astro.services.vo.HtmlVOSIAP.putrangex(xinp)
astro.services.vo.HtmlVOSIAP.putrangey(x1, x2, xinp)
astro.services.vo.HtmlVOSIAP.remove_badch(inp_text)

astro.services.vo.Poly module

class astro.services.vo.Poly.Edge(P1, P2)

Bases: object

len()
class astro.services.vo.Poly.Point(x, y)

Bases: object

class astro.services.vo.Poly.Polygon(P)

Bases: object

addPoint(P)
checkInside(P)
getPoint(num)
class astro.services.vo.Poly.Vector(P1, P2)

Bases: object

len()
astro.services.vo.Poly.angleVector(V1, V2)

astro.services.vo.VORes module

class astro.services.vo.VORes.RegDB(fileVO='Registry/VOmain', fileVOContact='Registry/VOContact', fileVORelationship='Registry/VORelationship', fileVOContentType='Registry/VOContentType', fileVOContentLevel='Registry/VOContentLevel', fileVOInterface='Registry/VOInterface', fileVOInterfaceParam='Registry/VOInterfaceParam', fileVOInterfaceResult='Registry/VOInterfaceResult', fileVOSubject='Registry/VOSubject', fileVOSpectralCoverage='Registry/VOSpectralCoverage', fileVOSIA='Registry/VOSIA')

Bases: object

DBclose()
DBopen()
DBopennew(o_type)
newwriteVO(VORes)
readVO(VOarr)
read_file(rec_arr, inp_rdr)
updateVO(inp_arr)
writeVO(VORes)
class astro.services.vo.VORes.VORes(res_type)

Bases: object

printVO()
setContact(contactName, contactEmail, contactPhone=None, contactAddress=None)
setContentLevel(inp_val)
setContentType(inp_val)
setDescription(descr)
setInterface(inp_iID, inp_qtype, inp_itype, inp_URLtype, inp_URL)
setInterfaceParam(inp_iID, inp_param)
setInterfaceResult(inp_iID, inp_param)
setPublisher(inp_publisher, inp_publisherID)
setRelationship(rtype, relatedID, relatedName)
setSIAAttr(inp_siatype)
setSource(inp_s)
setSpectralCoverage(inp_s)
setStatus(cr_Time, up_Time, status)
setSubject(inp_s)
setTitle(inp_title, inp_shortName, inp_ID)
setreferenceURL(inp_URL)
update_record(inp_record)
exception astro.services.vo.VORes.VOResError

Bases: Exception

class astro.services.vo.VORes.VOResXML(inp, out_str='', encoding='UTF-8', vi_loc='http://www.ivoa.net/xml/RegistryInterface/v1.0', vr_loc='http://www.ivoa.net/xml/VOResource/v1.0', vs_loc='http://www.ivoa.net/xml/VODataService/v1.0', sia_loc='http://www.ivoa.net/xml/SIA/v1.0', xsi_loc='http://www.w3.org/2001/XMLSchema-instance', schema_loc='http://www.ivoa.net/xml/VOResource/v1.0')

Bases: astro.services.vo.VORes.VORes, astro.services.vo.VORes.myXMLGenerator

VOResXMLOut()
class astro.services.vo.VORes.myXMLGenerator(out_str, encoding='UTF-8')

Bases: xml.sax.handler.ContentHandler

characters(content)
endElement(name)
endElementNS(name, qname)
endPrefixMapping(prefix)
ignorableWhitespace(content)
processingInstruction(target, data)
startDocument()
startElement(name, attrs)
startElementNS(name, qname, attrs)
startPrefixMapping(prefix, uri)
astro.services.vo.VORes.ret_VOID(VO_inparr, VO_retarr, VOID)
astro.services.vo.VORes.ret_VOProject(VO_inparr, VO_retarr, VO_awproject)
astro.services.vo.VORes.ret_VOResType(VO_inparr, VO_retarr, VO_restype)
astro.services.vo.VORes.ret_VOReskey(VO_inparr, VO_retarr, VO_key)

astro.services.vo.VOTable module

class astro.services.vo.VOTable.VOTable

Bases: object

getBinary()
getData()
getDataArray(num_arr=1)
getDataFields()
getFITS()
initNode(node)
putVOTable(inp, filename=None)
putVOTableDictionary(inp)
putVOTableSourceList(inp)
exception astro.services.vo.VOTable.VOTableError

Bases: Exception

class astro.services.vo.VOTable.XMLNode

Bases: object

getNodebyName(inp_name)
getbyName(inp_name)
initNode(node, level=0)
exception astro.services.vo.VOTable.XMLNodeError

Bases: Exception

astro.services.vo.VOTable.make_SIAP_TABLE(sls)
astro.services.vo.VOTable.remove_badch(inp_text)

astro.services.vo.voHtmlTemplate module

File HtmlTemplate.py Author WJ Vriernd (wjvriend@astro.rug.nl) Date Dec 2004

class astro.services.vo.voHtmlTemplate.HtmlTemplate(p_TemplateFile, template_string='')

Bases: object

Html Template class reads a template file and substitutes variables with values where variables can be placed inside repeating blocks

Example 1 HTML Template: <html>…${VAR}…</html> PYTHON: SetVariable( ‘VAR’, ‘TEST’) # will replace ${VAR} with TEST HTML output: <html>…TEST…</html>

Example 2 HTML Template: <html> ${_BEGIN_BLOCK}${VAR}${_END_BLOCK} </html> PYTHON: BeginBlock(‘BLOCK’) SetBlockVariable(‘VAR’, ‘TEST 1’) UpdateBlock() SetBlockVariable(‘VAR’, ‘TEST 2’) UpdateBlock() SetBlockVariable(‘VAR’, ‘TEST 3’) UpdateBlock() EndBlock() HTML output: <html> TEST 1 TEST 2 TEST 3 </html>

[THIS IS IMPLEMENTED BUT NEEDS DOCUMENTATION] SEE PROCESS_TARGETVIEW.HYTML.TMPL FOR EXAMPLE what is not working at the moment, but should be implemented - lists in lists (in lists …)

beginBlock(p_BlockName)

initialize a block

endBlock()

copy the filled blocks to the html file

getHtml()

return the content(html)

insertBlock(block_name, block_content)

insert block_content into the template where block_name

insertRepeatingBlock(repeating_block)

insert repeating block in template

openTemplateFile(p_TemplateFile)

open a template file and read content

saveHTML(filename)

save the the html to a file

setBlockVariable(p_varName, p_varValue)

set a variable within this block

setVariable(p_varName, p_varValue)

setVariable will replace the variable in the template file with the given value

setVariableList(p_varNames, p_varValues)

setVariableList will replace the variables in the template file with the given values

updateBlock()

update the block template

astro.services.vo.voHtmlTemplate.beginblock(name)

return begin block name as used in template

astro.services.vo.voHtmlTemplate.endblock(name)

return end block name as used in template

astro.services.vo.voHtmlTemplate.get_begin_end(content, p_BlockName)

get the begin and end position of block

astro.services.vo.voHtmlTemplate.varname(var_name)

return var name as used in template

class astro.services.vo.voHtmlTemplate.voRepeatingBlock(name, template)

Bases: object

beginBlock(p_BlockName)

initialize a repeating block

insertBlock(block_name, block_content)

insert block_content into the template where block_name

insertRepeatingBlock(repeating_block)

insert repeating block in template

removeBlock(block_name, block_content)

remove block_content from the template where block_name

setBlockVariable(p_varName, p_varValue)

set a variable within this block

updateBlock()

copy the current filled block to the content

Module contents