An STC "when" and "where" example

Arnold Rots arots at head.cfa.harvard.edu
Fri Mar 25 11:36:23 PST 2005


I had promised an example of the STC section of a VOEvent, expressed
both in STC-S and STC-X.
It's appended.

  - Arnold

--------------------------------------------------------------------------
Arnold H. Rots                                Chandra X-ray Science Center
Smithsonian Astrophysical Observatory                tel:  +1 617 496 7701
60 Garden Street, MS 67                              fax:  +1 617 495 7356
Cambridge, MA 02138                             arots at head.cfa.harvard.edu
USA                                     http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------



TaxTimeEvent
============

Here is the STC description of an imaginary event observed at KPNO,
in the band 4400-4800 Angstrom, at 2005-04-15T23:58:55 (UTC) +/- 5 sec,
in a circle with radius 1 degree centered on a particular position in
the sky.


STC-S Description
=================

The STC-S (string) description of the event is simple, fully
transparent to the client, and yet complete:

ObsDataLocation
ObservatoryLocation
Position GEO_D TOPOCENTER SPHER3 248.4056 31.9586 2158
ObservationLocation
Time UTC TOPOCENTER 2005-04-15T23:58:55 Error 5
Position ICRS TOPOCENTER 148.88821 69.06529 Error 1.0 1.0
Spectral TOPOCENTER 460 unit nm Resolution 40


STC-X Description
=================

The XML description is far more detailed and spells everything out
explicitly, but does not really contain more information.  Note that I
took some liberties by changing units and timescales.
The full XML document is appended at the bottom, but first I show the
"sufficient information" version, leaving out the pieces that the
client may skip.
Here it is assumed that clients know where Kitt Peak is and don't need
to parse the entire ObservatoryLocation element: the ID says it all.
Similarly, "ICRS-TT-WAVELENGTH" tells us enough about the coordinate
system in use to describe the event.

(While working on this example, I realized that I need to make the
AstroCoordArea element optional in ObservationLocation, and make the
ID attribute of this element also optional)


"Sufficient Information" XML
----------------------------

This is not valid XML, but it removes some of the stuff that is
implied by certain ID values and that never changes, to make the
information particular to this event more visible.

A client really only needs to parse the lines marked with "==>", while
the server (which presumably fills these events into an existing
template) only needs to insert information in the lines marked with "*".
But all the detailed information is there for anyone who needs to
extract the data from first principles.


<ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.20.xsd" xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.20" xmlns:reg="http://www.ivoa.net/xml/STC/STCregion/v1.20" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

==> <ObservatoryLocation ID="KPNO"/>
==> <ObservationLocation ID="TaxTimeEvent">
==>     <AstroCoordSystem ID="ICRS-TT-WAVELENGTH-TOPO"/>
        <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO">
==>         <crd:Time unit="s">
                <crd:Name>Time</crd:Name>
                <crd:TimeInstant>
==>                 <crd:Timescale>TT</crd:Timescale>
==>*                <crd:ISOTime>2005-04-15T23:59:59</crd:ISOTime>
                </crd:TimeInstant>
==>*            <crd:Error>5.0</crd:Error>
            </crd:Time>
==>         <crd:Position2D unit="deg">
                <crd:Name>RA,Dec</crd:Name>
==>*            <crd:Value2>148.88821 69.06529</crd:Value2>
                <crd:Error2PA>
==>*                <crd:Size>1.0 1.0</crd:Size>
==>*                <crd:PosAngle>0.0</crd:PosAngle>
                </crd:Error2PA>
            </crd:Position2D>
==>         <crd:Spectral unit="Angstrom">
                <crd:Name>Wavelength</crd:Name>
==>*            <crd:Value>4600</crd:Value>
==>*            <crd:Resolution>400</crd:Resolution>
            </crd:Spectral>
        </crd:AstroCoords>
    </ObservationLocation>
</ObsDataLocation>



Full XML document
-----------------

<?xml version="1.0" encoding="UTF-8"?>
<ObsDataLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.20.xsd" xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.20" xmlns:reg="http://www.ivoa.net/xml/STC/STCregion/v1.20" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ObservatoryLocation ID="KPNO">
        <AstroCoordSystem ID="ICRS-TT-TOPO">
            <TimeFrame>
                <Name>Time</Name>
                <TimeScale>TT</TimeScale>
                <TOPOCENTER/>
            </TimeFrame>
            <SpaceFrame>
                <Name>GeoLongLatAlt</Name>
                <GEO_D/>
                <TOPOCENTER/>
                <SPHERICAL coord_naxes="3"/>
            </SpaceFrame>
        </AstroCoordSystem>
        <crd:AstroCoords coord_system_id="KPNO">
            <crd:Position3D unit="deg deg m">
                <crd:Name>LongLatElev</crd:Name>
                <crd:Value3>248.4056 31.9586 2158</crd:Value3>
            </crd:Position3D>
        </crd:AstroCoords>
    </ObservatoryLocation>
    <ObservationLocation ID="TaxTimeEvent">
        <AstroCoordSystem ID="ICRS-TT-WAVELENGTH-TOPO">
            <TimeFrame>
                <Name>Time</Name>
                <TimeScale>TT</TimeScale>
                <TOPOCENTER/>
            </TimeFrame>
            <SpaceFrame>
                <Name>Equatorial</Name>
                <ICRS/>
                <TOPOCENTER/>
                <SPHERICAL coord_naxes="2"/>
            </SpaceFrame>
            <SpectralFrame>
                <Name>Wavelength</Name>
                <TOPOCENTER/>
            </SpectralFrame>
        </AstroCoordSystem>
        <crd:AstroCoords coord_system_id="ICRS-TT-WAVELENGTH-TOPO">
            <crd:Time unit="s">
                <crd:Name>Time</crd:Name>
                <crd:TimeInstant>
                    <crd:Timescale>TT</crd:Timescale>
                    <crd:ISOTime>2005-04-15T23:59:59</crd:ISOTime>
                </crd:TimeInstant>
                <crd:Error>5.0</crd:Error>
            </crd:Time>
            <crd:Position2D unit="deg">
                <crd:Name>RA,Dec</crd:Name>
                <crd:Value2>148.88821 69.06529</crd:Value2>
                <crd:Error2PA>
                    <crd:Size>1.0 1.0</crd:Size>
                    <crd:PosAngle>0.0</crd:PosAngle>
                </crd:Error2PA>
            </crd:Position2D>
            <crd:Spectral unit="Angstrom">
                <crd:Name>Wavelength</crd:Name>
                <crd:Value>4600</crd:Value>
                <crd:Resolution>400</crd:Resolution>
            </crd:Spectral>
        </crd:AstroCoords>
        <AstroCoordArea coord_system_id="ICRS-TT-WAVELENGTH-TOPO" ID="Area"/>
    </ObservationLocation>
</ObsDataLocation>



More information about the voevent mailing list