VOEvent v2.0, some thoughts
Petr Kubanek
petr at iaa.es
Tue Jan 22 07:51:55 PST 2008
Well, and if some feed you minor planet orbit? I need to get minor axis
etc. and possibly transform that to RA DEC for my telescope location
(mind the parallax, it is sometimes important).
Petr
Roy Williams napsal(a):
>
>
> 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
More information about the voevent
mailing list