|
|
International Virtual Observatory Alliance |
Linear STC
Version 1.00
IVOA Note 2005-03-01
This version:
http://www.ivoa.net/Documents/Notes/LinearSTC/LinearSTC-20050301.html
Latest version:
http://www.ivoa.net/Documents/latest/LinearSTC.html
Previous version(s):
None
Author(s):
Arnold Rots (CfA/SAO)
An attempt at defining a linear syntax that allows simple specification of STC metadata
This is a Note. The first release of this document was 2005-03-01.
This is an IVOA Note expressing suggestions from and opinions of the authors. It is intended to share best practices, possible approaches, or other perspectives on interoperability with the Virtual Observatory. It should not be referenced or otherwise interpreted as a standard specification.
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, and Alex Szalay.
The STC metadata design for the Virtual Observatory has been implemented in XML Schema. For documentation, see: http://www.ivoa.net/Documents/latest/STC. That design is complete and self-consistent, but may seem bewilderingly complex to the novice user; and, anyway, XML certainly does not lend itself to easy human readability.
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 representation is highly desirable to achieve that purpose.
We propose that a complete STCDescription (AstroCoordSystem, AstrCoords, and AstroCoordArea) 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 proposed in this document is based on a simple recipe:
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 XML into linear STC 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.
Let us take the query example from Appendix B.5 of the STC Working Draft version 1.20:
|
Verbose version |
Economy version |
Comments |
|
TimeInterval TimeFrame Name Time TimeScale TT BARYCENTER
StartTime TimeScale TT 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 2 Circle unit=deg Center 148.9 69.1 Radius 2.0 Position2D unit=deg Name RA,Dec unit=deg 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 unit=Angstrom LoLimit 4000 HiLimit 7000 Spectral unit=Angstrom Name Lambda Resolution 300 Resolution 600 |
SpectralInterval BARYCENTER A 4000 7000 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 1900-01-01 Circle ICRS 148.9 69.1 2.0 SpectralInterval A 4000 7000
It may be of interest to note that, had there also been a stop time (say, 2000-01-01), the phrase could have been composed as follows:
TimeInterval 1900-01-01 2000-01-01 Circle ICRS 148.9 69.1 2.0 SpectralInterval A 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.
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”.
I have added a Box shape to the region definition – because it is so convenient and such a pain to figure out in terms of vertices on a sphere. The linear syntax will be:
Box <Xcenter> <Ycenter> <Xsize> <Ysize>
In spherical coordinates the sides of the box will be great circles. It is defined in terms of the size of a cross through the center, parallel to the axes, with great circle sides perpendicular to the cross at its end points.
This mechanism is primarily intended to make simple cases easy to express; initially it will be restricted to those easy cases and will not support:
We shall refer to a Linear STC 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.
TimeInterval [fillfactor <fill>]
[<timescale>] [<refpos>]
[<start> <stop> ...]
[Time <time>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
StartTime [fillfactor <fill>]
[<timescale>] [<refpos>] <start>
[Time <time>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
StopTime [fillfactor <fill>]
[<timescale>] [<refpos>] <stop>
[Time <time>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
Time [<timescale>] [<refpos>]
[<time>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [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>]
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 <freq>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
Spectral [<refpos>]
[<pos>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
Notes:
RedshiftInterval [fillfactor <fill>]
[<refpos>] [<type>] [<dopplerdef>]
[<lolimit> <hilimit> ...]
[Redshift <rs>] [unit <unit>] [Error <error>
[<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
Redshift [<refpos>]
[<rs>] [<type>] [<dopplerdef>]
[unit <unit>] [Error <error> [<error>]]
[Resolution <resln> [<resln>]] [PixSize <pixsiz>
[<pixsiz>]]
Notes: