|
International
Virtual
Observatory Alliance |
STC-S:
Space-Time Coordinate (STC) Metadata Linear String Implementation
Version 0.10
IVOA Working Draft 30 May 2012
This version:
http://www.ivoa.net/Documents/WD/STC-S/STC-S-20120529.html
Latest version:
http://www.ivoa.net/Documents/latest/STC-S.html
Previous version(s):
http://www.ivoa.net/Documents/Notes/STC-S/STC-S-20071205.html
http://www.ivoa.net/Documents/Notes/STC-S/STC-S-20050315.html
http://www.ivoa.net/Documents/Notes/LinearSTC/LinearSTC-20050301.html
http://www.ivoa.net/Documents/Notes/STC-S/STC-S-20090724.html
Author(s):
A. H. Rots
This standard defines a linear string serialization that allows a simple specification of STC metadata for a subset of the STC model.
This is
a Working Draft. This document was first released as a Note, most recently on 2009-10-30.
This is an IVOA Working Draft for review by IVOA
members and other interested parties. It is a draft document and may be
updated, replaced, or obsoleted by other documents at any time. It is
inappropriate to use IVOA Working Drafts as reference materials or to cite them
as other than “work in progress”.
A list of current IVOA Recommendations and other technical documents can be found at http://www.ivoa.net/Documents/.
I
gladly acknowledge helpful discussions with Jim Gray, Wil O’Mullane, Alex
Szalay, Jim Cant, and Markus Demleitner.
2 Definition
of STC-S as Derived from STC-X
3 How
to Apply the Derivation: Query Example
4 A
few Conventions and Restrictions
A.2 Simple
and Compound Regions
A.3 STC-S
and STC-X Serializations
Changes from Previous Versions
The
There is an obvious need for a syntax that allows humans to specify and interpret STC metadata objects in a way that is as intuitive as possible without being sloppy – essentially a minimalist approach. This is especially true for queries and resource descriptions. A linear string representation provides a standard serialization that will achieve that purpose; we refer to it as STC-S.
The STC-S syntax is derived from the STC-X serialization. This derivation process is defined in the next section and illustrated in the one following.
By necessity, there will be restrictions compared to the XML serialization of the STC model (STC-X); these are enumerated in Section 4.
The last section of this standard provides a formal definition of the STC-S syntax.
This standard specifies how a complete STCDescription (AstroCoordSystem, AstrCoords, and AstroCoordArea) element from STC-X can be represented by a single phrase consisting of one or more sub-phrases, with each sub-phrase specifying the STC information for one coordinate frame. Each sub-phrase starts with the type of the CoordArea element assuming the additional role of Frame Identifier. If there is no CoordArea element, the Coord element type fulfills this role. It is followed by the associated coordinate frame specification (ReferenceFrame, ReferencePosition, etc.), the remaining CoordArea elements, and the Coords elements. Since the Frame Identifiers are unique, no additional punctuation or parenthesizing is required.
The syntax in this document is based on a simple recipe that explains how to derive it from an STC-X instance:
As will become apparent, this second rule leads to very considerable economy (and thereby transparency) in what otherwise would be a very verbose construct.
One should note that this definition allows transforming STC-X (XML) into STC-S and vice versa. A transformation and a subsequent inverse transformation are not guaranteed to produce a result that is identical to the original, but it should be equivalent.
STC-S will be case-insensitive except for strings expressing units.
The procedure of deriving the STC-S serialization from its STC-X counterpart is illustrated by using the Query example from Appendix B.5 of the STC Recommendation, version 1.33. The first two steps from the previous section yield the “verbose verson”, the third step transforms it into the “economy version” which is the STC-S product:
Verbose version |
Economy version |
Comments |
TimeInterval TimeFrame Name Time TimeScale TT BARYCENTER
StartTime ISOTime |
StartTime TT BARYCENTER |
StartTime indicates that we are talking about time and a TimeInterval, TT is uniquely a TimeScale, and the format implies ISOTime |
Region SpaceFrame Name Equatorial ICRS BARYCENTER SPHERICAL coord_naxes=2 Circle unit=deg Center 148.9 69.1 Radius 2.0 Position2D unit=deg Name RA,Dec Resolution2 0.0001 0.0001 Resolution2 0.0003 0.0003 Size2 0.5 0.5 Size2 0.67 0.67 PixSize2 0.00005 0.00005 PixSize2 0.00015 0.00015 |
Circle ICRS BARYCENTER 148.9 69.1 2.0 Resolution 0.0001 0.0001 0.0003 0.0003 Size 0.5 0.5 0.67 0.67 PixSize 0.00005 0.00005 0.00015 0.00015 |
Circle uniquely implies a SpaceFrame and a Region, and the order of its parameters is fixed; ICRS implies spherical 2-D coordinates; and the two pairs of numbers for Resolution, Size, and PixSize implies upper and lower limits |
SpectralInterval SpectralFrame Name Wavelength BARYCENTER Spectral unit=Angstrom LoLimit 4000 HiLimit 7000 Spectral unit=Angstrom Name Lambda Resolution 300 Resolution 600 |
SpectralInterval BARYCENTER 4000 7000 unit Angstrom Resolution 300 600 |
SpectralInterval implies a SpectralFrame; its unit implies Wavelength |
If the reference positions and time scale do not matter, and one does not care about the Resolutions, Sizes, and PixSizes, the sum-total becomes simply:
StartTime TT BARYCENTER 1900-01-01
Circle ICRS BARYCENTER 148.9 69.1 2.0
Resolution 0.0001 0.0001 0.0003 0.0003
Size 0.5 0.5 0.67 0.67
PixSize 0.00005 0.00005 0.00015 0.00015
SpectralInterval BARYCENTER Angstrom 4000 7000 Resolution 300 600
It may be of interest to note that, had there also been a stop time (say, 2000-01-01) and one did not care about resolutions, sizes, and pixel sizes, the phrase could simply have been composed as follows:
TimeInterval TT BARYCENTER 1900-01-01 2000-01-01
Circle ICRS BARYCENTER 148.9 69.1 2.0
SpectralInterval BARYCENTER Angstrom 4000 7000
A missing required element, if its value or name is not
implied by anything else in the phrase, should be interpreted as UNKNOWN or nil; i.e., “don’t care” in the context of a query. nil means
“unspecified”, i.e., a missing element in
Default units (“deg”, “m”, “s”, “m/s”, “Hz”) may be omitted.
To conform with common abuse, “J2000” and “FK5” will both be interpreted as “FK5 J2000”; “B1950” and “FK4” will be interpreted as “FK4 B1950”.
The STC-S serialization is primarily intended to make simple cases easy to express; it will be restricted to those easy cases and will not support:
We shall refer to an STC-S expression as a phrase. A phrase is a linear concatenation of one or more sub-phrases. Each sub-phrase pertains to a particular coordinate frame and they shall be concatenated in the following order:
Time Space Spectrum Redshift
A sub-phrase is a linear concatenation of one, two, or three sub-phrase components in the order:
CoordinateFrame CoordinateArea Coordinates
A sub-phrase component is a linear concatenation of one or more words, the first of which is the sub-phrase component identifier. However, the CoordinateArea identifier (or, if CoordinateArea is absent, the Coordinates identifier) is moved in front of the CoordinateFrame sub-phrase component and serves as the sub-phrase identifier.
Words are the names of elements or attributes, or their values
Sub-phrase component identifiers are unique within each sub-phrase and sub-phrase identifiers are unique within each phrase. Words, components, and sub-phrases are separated by whitespace.
Optionally, compound sub-phrases may be recognized for compound Regions. Under those rules the CoordinateArea operational identifier (Union, Intersection, Not, or Difference) precedes the CoordinateFrame component which, in turn, is followed by two or more (if applicable) CoordinateArea components; any CoordinateArea identifier may be preceded by the negation operator Not. The arguments for the compound region operators must be enclosed in parentheses. For Union and Intersection the argument may contain two or more elements; for Difference it must contain exactly two; and for Not it must contain only one. The enclosure in parentheses is merely intended to allow nesting and avoid ambiguities.
TimeInterval [fillfactor <fill>] [<timescale>] [<refpos>]
[<start> <stop> ...]
[Time <time>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
StartTime [fillfactor <fill>] [<timescale>] [<refpos>]
<start>
[Time <time>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
StopTime [fillfactor <fill>] [<timescale>] [<refpos>]
<stop>
[Time <time>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Time [<timescale>] [<refpos>]
[<time>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Notes:
PositionInterval [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] [<lolimit> <hilimit> ...]
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
AllSky [fillfactor <fill>] <frame> [<refpos>]
[<flavor>]
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Circle [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] <pos> <radius>
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Ellipse [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] <pos> <radius> <radius>
<posangle>
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Box [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] <pos> <bsize>
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Polygon [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] [<pos> ...]
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Convex [fillfactor <fill>] <frame> [<refpos>]
[<flavor>] [<hspace> ...]
[Position <pos>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Position <frame> [<refpos>]
[<flavor>] [<pos>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
[<Velocity sub-phrase>]
Notes:
SpectralInterval [fillfactor <fill>] [<refpos>]
[<lolimit> <hilimit> ...]
[Spectral <spec>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Spectral [<refpos>] [<spec>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Notes:
RedshiftInterval [fillfactor <fill>] [<refpos>] <type>
[<dopplerdef>]
[<lolimit> <hilimit> ...]
[Redshift <rs>] [unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Redshift [<refpos>] [<type>]
[<dopplerdef>] [<rs>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [Size <size> [<size>]]
[PixSize <pixsiz> [<pixsiz>]]
Notes:
STC-S allows, within the restrictions listed in Section 4, a simple character string to represent any type of STC metadata information, such as:
Positions
Times and time ranges
Spectral metadata
Redshift and Doppler velocity information
Spatial regions – simple or compound
Or any combination of these – and many more.
For instance, this string defines a volume in observing coordinate space:
TimeInterval
TT GEOCENTER 2011-01-01 2012-03-30 Resolution 0.2
PositionInterval ICRS GEOCENTER 170 -20
190 10 Resolution 0.0001
SpectralInterval GEOCENTER 4.95 5.0 unit
GHz Size 0.05
A single point in Time and Space:
Time
TDB BARYCENTER MJD 50814.0
Position ICRS BARYCENTER 147.3 69.3
A simple region:
Circle
ICRS TOPOCENTER 147.6 69.9 0.4
Two compound regions:
Union
ICRS TOPOCENTER
(Polygon 147.8 69.2 147.4 69.2 147.3
69.4 147.9 69.4
Polygon 147.9 69.7 147.6 69.7 147.5
69.9 148.0 69.9)
and:
Union ICRS TOPOCENTER
(Circle 180 10 20
Circle 190 20 20
Intersection
(Circle 120 -10 20
Difference
(Circle 130 -10 20
Circle 125 -10 2
)
Not
(Circle 118 -8 3)
)
)
The following comprehensive example:
TimeInterval TT GEOCENTER 1996-01-01T00:00:00
1996-01-01T00:30:00
Time MJD 50814.0 Error 1.2 Resolution
0.8 PixSize 1024.0
Circle ICRS GEOCENTER 179.0 -11.5 0.5 Position 179.0
-11.5
Error 0.000889 Resolution 0.001778 Size
0.000333 0.000278
PixSize 0.000083 0.000083
Spectral BARYCENTER 1420.4 unit MHz Resolution 10.0
RedshiftInterval
BARYCENTER VELOCITY OPTICAL 200.0 2300.0
Redshift 300.0 Resolution 0.7 PixSize
0.3
is the equivalent of this STC-X expression:
<?xml version="1.0"
encoding="UTF-8"?>
<CatalogEntryLocation xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.30.xsd
stc-v1.30.xsd" xmlns="http://www.ivoa.net/xml/STC/stc-v1.30.xsd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AstroCoordSystem id="ID_2">
<TimeFrame id="ID_23">
<TimeScale>TT</TimeScale>
<GEOCENTER/>
</TimeFrame>
<SpaceFrame id="ID_93">
<ICRS/>
<GEOCENTER/>
<SPHERICAL coord_naxes="2"/>
</SpaceFrame>
<SpectralFrame id="ID_101">
<BARYCENTER>
<PlanetaryEphem>JPL-DE405</PlanetaryEphem>
</BARYCENTER>
</SpectralFrame>
<RedshiftFrame value_type="VELOCITY" id="ID_102">
<DopplerDefinition>OPTICAL</DopplerDefinition>
<BARYCENTER>
<PlanetaryEphem>JPL-DE405</PlanetaryEphem>
</BARYCENTER>
</RedshiftFrame>
</AstroCoordSystem>
<AstroCoords id="ID_103" coord_system_id="ID_2">
<Time unit="s">
<Name>Time</Name>
<TimeInstant>
<MJDTime>50814.0</MJDTime>
</TimeInstant>
<Error>1.2</Error>
<Resolution>0.8</Resolution>
<Size>1024.0</Size>
<PixSize>1024.0</PixSize>
</Time>
<Position2D unit="deg">
<Name>Position</Name>
<Name1>RA</Name1>
<Name2>Dec</Name2>
<Value2>
<C1>179.0</C1>
<C2>-11.5</C2>
</Value2>
<Error2Radius pos_unit="arcsec">3.2</Error2Radius>
<Resolution2Radius pos_unit="arcsec">6.4</Resolution2Radius>
<Size2>
<C1>1.2</C1>
<C2>1.0</C2>
</Size2>
<PixSize2 unit="arcsec">
<C1>0.3</C1>
<C2>0.3</C2>
</PixSize2>
</Position2D>
<Spectral unit="MHz">
<Name>Frequency</Name>
<Value>1420.4</Value>
<Resolution spectral_unit="MHz">10.0</Resolution>
</Spectral>
<Redshift vel_time_unit="s" unit="km">
<Name>Doppler velocity</Name>
<Value>300</Value>
<Resolution>0.7</Resolution>
<Size>1000</Size>
<PixSize>0.3</PixSize>
</Redshift>
</AstroCoords>
<AstroCoordArea id="ID_172" coord_system_id="ID_2">
<TimeInterval>
<StartTime>
<ISOTime>1996-01-01T00:00:00</ISOTime>
</StartTime>
<StopTime>
<ISOTime>1996-01-01T00:30:00</ISOTime>
</StopTime>
</TimeInterval>
<Circle>
<Center>
<C1>179</C1>
<C2>-11.5</C2>
</Center>
<Radius>0.5</Radius>
</Circle>
<RedshiftInterval vel_time_unit="s" unit="km">
<LoLimit>200</LoLimit>
<HiLimit>2300</HiLimit>
</RedshiftInterval>
</AstroCoordArea>
</CatalogEntryLocation>
The example in Section 3:
StartTime TT BARYCENTER 1900-01-01
Circle ICRS BARYCENTER 148.9 69.1 2.0
Resolution 0.0001 0.0001 0.0003 0.0003
Size 0.5 0.5 0.67 0.67
PixSize 0.00005 0.00005 0.00015 0.00015
SpectralInterval BARYCENTER Angstrom 4000 7000 Resolution 300 600
was derived from the following STC-X element:
<?xml version="1.0"
encoding="UTF-8"?>
<!--
This
STC metadata description specifies a query:
Find
all images, within 2 degrees from a certain position, that
have these
properties:
spatial resolution: between 0.0001 and 0.003 degrees
size: between 30 and 40 arcmins on the side
pixelsize: between 0.00005 and 0.00015 degrees
covering a band of 300 to 600 Angstrom
in
the spectral range 4000 to 7000 A
taken since 1900.0
AstroCoordSystem
specifies the coordinate system used in this query.
AstroCoordArea
specifies where to look in coordinate space
AstroCoords
specifies the (ranges of) properties along the coordinates
-->
<SearchLocation xmlns="http://www.ivoa.net/xml/STC/stc-v1.30.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/STC/stc-v1.30.xsd
http://hea-www.harvard.edu/~arots/nvometa/v1.30/stc-v1.30.xsd">
<AstroCoordSystem id="TT-ICRS-BARY">
<TimeFrame>
<Name>Time</Name>
<TimeScale>TT</TimeScale>
<BARYCENTER/>
</TimeFrame>
<SpaceFrame>
<Name>Equatorial</Name>
<ICRS/>
<BARYCENTER/>
<SPHERICAL coord_naxes="2"/>
</SpaceFrame>
<SpectralFrame>
<Name>Wavelength</Name>
<BARYCENTER/>
</SpectralFrame>
</AstroCoordSystem>
<AstroCoords coord_system_id="TT-ICRS-BARY">
<Position2D unit="deg">
<Name>RA,Dec</Name>
<Resolution2>
<C1>0.0001</C1>
<C2>0.0001</C2>
</Resolution2>
<Resolution2>
<C1>0.0003</C1>
<C2>0.0003</C2>
</Resolution2>
<Size2>
<C1>0.5</C1>
<C2>0.5</C2>
</Size2>
<Size2>
<C1>0.67</C1>
<C2>0.67</C2>
</Size2>
<PixSize2>
<C1>0.00005</C1>
<C2>0.00005</C2>
</PixSize2>
<PixSize2>
<C1>0.00015</C1>
<C2>0.00015</C2>
</PixSize2>
</Position2D>
<Spectral unit="Angstrom">
<Name>Lambda</Name>
<Resolution>300</Resolution>
<Resolution>600</Resolution>
</Spectral>
</AstroCoords>
<AstroCoordArea id="M81" coord_system_id="TT-ICRS-BARY">
<TimeInterval>
<StartTime>
<ISOTime>1900-01-01T00:00:00</ISOTime>
</StartTime>
</TimeInterval>
<Circle unit="deg">
<Center>
<C1>148.9</C1>
<C2>69.1</C2>
</Center>
<Radius>2</Radius>
</Circle>
<SpectralInterval unit="Angstrom">
<LoLimit>4000</LoLimit>
<HiLimit>7000</HiLimit>
</SpectralInterval>
</AstroCoordArea>
</SearchLocation>
Note
From V1.00 to V1.10:
From V1.30 to V1.32:
From V1.32 to V1.33
Working Draft V0.10
A.
H. Rots, Space-Time Coordinate Metadata
for the Virtual Observatory, http://www.ivoa.net/Documents/latest/STC.html
A.
H. Rots, STC-X: Space-Time Coordinate
(STC) Metadata XML Implementation
http://www.ivoa.net/Documents/latest/STC-X.html
A.
H. Rots, STC-Model: Space-Time
Coordinate (STC) Metadata Model
http://www.ivoa.net/Documents/latest/STC-Model.html