VOEvent v2.0, some thoughts
Rob Seaman
seaman at noao.edu
Tue Jan 22 09:34:24 PST 2008
I see this as a section in the users guide. Other options would be
XSLT and XQuery. While STC provides the obvious crying need for such,
flexible manipulation of <What> and <Why> elements will ultimately
prove more interesting from the point of view of empirical use cases.
- Rob
--
On Jan 22, 2008, at 8:49 AM, Roy Williams wrote:
>
>
> Petr Kubanek wrote:
>> Will somebody provide me with a tool which will transform complex
>> STC to
>> simple actual RA DEC I can feed to telescope and start observing?
>
> Petr
> This is what I use. It is Python.
> There is another package called W3CDate to read the date.
> Roy
>
>
>
> import xml.dom.minidom
>
> doc = xml.dom.minidom.parse(stream)
> strRA,strDec,strDate,strPointingErr = findLocationTime(doc)
>
> def findLocationTime(doc):
> strRA = ""
> strDec = ""
> strDate = ""
> strPointingErr = ""
>
> for node in doc.getElementsByTagName("ObservationLocation"):
> for innerNode in node.getElementsByTagName("C1"): # RA
> for subNode in innerNode.childNodes:
> if subNode.nodeType == node.TEXT_NODE: strRA = subNode.data
>
> for innerNode in node.getElementsByTagName("C2"): # DEC
> for subNode in innerNode.childNodes:
> if subNode.nodeType == node.TEXT_NODE: strDec = subNode.data
>
> for innerNode in node.getElementsByTagName("ISOTime"): #
> Observation Time
> for subNode in innerNode.childNodes:
> if subNode.nodeType == node.TEXT_NODE: strDate = subNode.data
>
> for innerNode in node.getElementsByTagName("Error2Radius"):
> for subNode in innerNode.childNodes:
> if subNode.nodeType == node.TEXT_NODE: strPointingErr =
> subNode.data
>
> return strRA, strDec, strDate, strPointingErr
>
> --
>
> California Institute of Technology
> 626 395 3670
>
More information about the voevent
mailing list