TWiki> IVOA Web>STCInVOTable (revision 15)EditAttach

STC in VOTable"> Embedding STC in VOTable

[Scroll down to see the current discussion. The current draft of the note is at http://vo.ari.uni-heidelberg.de/docs/note_stc.pdf; note, however, that using INFO as a carrier element for the utypte-value pairs was badly misguided (see note at the very bottom). -- MarkusDemleitner 2010-03-18]

At the Garching Interop, Markus has uttered some gripes with version 1.1-20090612 of the Note specifying how to embed STC in VOTables. He's volunteered to work on the note to fix what he thinks is broken.

This page is intended as a discussion space for the proposed changes (and possibly others as well). Please give every suggested change a level-3 heading.

Change 1: Reverse References

Instead of having utype and ref on FIELD, put groups into the AstroCoords group:

<GROUP ID="lltoush_coo" ref="lltoush"
     utype="stc:AstroCoords">
   <GROUP ref="alpha"
     utype="stc:AstroCoords.Position2D.Value2.C1" />
   <GROUP ref="rv"
     utype="stc:AstroCoords.Redshift.Value" />
 </GROUP>

(or use FIELDrefs that, I'm told, can now take utypes as well).

Rationale:

  • Keep STC information confined to STC groups (helps libraries)
  • Don't clobber utype and ref on FIELDs to preserve them for other, less generic purposes

Impact on Functionality:

As far as I can see, None. You need one AstroCoords group per what set of coordinates either way. -- MD

Comments

I agree with this proposed change. As a matter of fact, it is the way STC was intended to function in VOTable (albeit as an imported schema, not through utypes). See the examples I post at the bottom of the page.

-- ArnoldRots - 01 Dec 2009

I agree and think that FIELDref-s SHOULD be used. Is most logical way to add extra information about a field. The utype on the field is then freed up for pointing into other possibly more samntically meaningful models, such as "is a position of a galaxy".

-- GerardLemson - 11 Mar 2010

Change 2: Flat systems

Just have all utype/value (belonging to one coordinate system definition) params as direct children of the AstroCoordSystem group.

<GROUP ID="lltoush" utype="stc:AstroCoordSystem">
  <PARAM arraysize="*" datatype="char" value="VELOCITY"
     utype="stc:AstroCoordSystem.RedshiftFrame.value_type" />
  <PARAM arraysize="*" datatype="char" value="ICRS"
     utype="stc:AstroCoordSystem.SpaceFrame.CoordRefFrame" />
</GROUP>

Rationale

  • Flat is better than nested (try python -c 'import this').
  • The additional nesting adds no information, probably don't really help implementations or humans on parsing and complicate writing.

Impact on Functionality

None that I can see. Were these groups meant a service for humans? -- MD

Comment

I don't think this will work, except for the simplest tables.It does not allow for multiple coordinate systems, reusing coordinate systems, or using elements that contain AstroCoordSystem elements. See the CSC example that I will be posting at the bottom of the page.

-- ArnoldRots - 01 Dec 2009

Uh -- I notice I was not particularly clear. There is one group each for every AstroCoordSystem, of course. I'm just suggesting to drop the subgroups within (XFrame). For the CSC example, I can't see where that would fail, and actually, it should not in any setting, by virtue of the data model requriring zero or one of each XFrame and the frame name being a part of the utype already. -- MD 2009-12-02

Change 3a: Do not abuse xml namespace declarations

Don't pretend the stc: in the utype has anything to do with an XML namespace.

So, strike the xmlns:stc declaration on VOTABLE:

<VOTABLE version="1.2" xmlns:xsi="http://www.w3.org/2
 xmlns="http://www.ivoa.net/xml/VOTable/v1.2">

Rationale

  • While syntactically legal, declaring namespaces that are not used within the document is a dangerous practice -- XML tools can and do discard these. Also, the stc in the namespace declaration has, from an XML point of view, nothing to do with the stc in the utype attribute value since that value is not declared as to hold a QName.
  • The "package name" is supposed to be the fixed thing (to keep utypes opaque). This is incompatible with XML namespaces.

Impact on Functionality

The VOTable has no way to define which version of the STC data model the utypes refer to. I would say this is desirable since versioned meanings will lead to hell either way, but see Change 3b for a fix. -- MD

Comment

I have no(t yet an) opinion on this. It does sound reasonable.

-- ArnoldRots - 01 Dec 2009

Change 3b: Define DM Version using utypes

In every AstroCoordSystem group, declare what version of the DM you are using. We may make that optional or a strong recommendation or something like that.

The version of the AstroCoords group would be implied via its ref.

<GROUP ID="lltoush" utype="stc:AstroCoordSystem">
  <PARAM utype="stc:" value="http://.../stc-v1.30#"/>
  <PARAM arraysize="*" datatype="char" value="VELOCITY"
     utype="stc:AstroCoordSystem.RedshiftFrame.value_type" />

Rationale

  • This provides a link to exact data model used to define the utypes used.
  • Some mechanism like this will be employed by the utype group.

Impact on Functionality

  • We/someone should maintain explanations for all the utypes at the URLs resulting from glueing together the model URI and the de-packaged utype.

Comment

Sounds reasonable; but you need a name and a datatype as well.

-- ArnoldRots - 01 Dec 2009

Change 4: Only allow string values

Define that all STC PARAMs are datatype="char" arraysize="*".

Rationale

  • As far as I can see, there are no very reliable serialization rules for param values in VOTable anyway -- MD
  • Provides the easiest way to unambiguously define the utype serialization by pointing to the STC-X schema. -- MD
  • Without this, libraries have to keep a mapping from "known utypes" to their types. This is not hard, but not very nice either. We'd have to derive the type/serialization rules from STC-X either way. -- MD

Impact on Functionality

  • It's much easier to pass STC info through correctly, e.g., if a tool only understands a subset of STC.
  • For tools knowing a certain utype, probably none; they'll have some custom way of de-/serializing their internal values anyway. -- MD

Comment

I haven't thought about the repercussions of this, yet. On the face of it, it sounds not unreasonable, but on the other hand, since the data type has to be given as a parameter, I don't see allowing more data types as much of a complication. I only wish that PARAM were more reasonable in the types it allows - particularly 'string' would be useful - and, of course, ISO-8601.

-- ArnoldRots - 01 Dec 2009

CSC Cone Serch Examples

As it so happened, I had recently prepared the STC-specific stuff for a VOTable 1.1/1.2 that presents data returned by a simple cone search query to the Chandra Source Catalog. Then I modified that one to comply with Changes 1 and 3 above. There is nothing like a real life example to bring out the problems smile I think it shows what is problematic about Change 2. Here are the Version 1.1 and the MD-modified Version of the example.

-- ArnoldRots - 01 Dec 2009


Revision, Draft 1

I have prepared a revision of the note, and while doing so I realized that things become quite a bit simpler if the utype-value pairs are serialized into INFOs rather than PARAMs. Otherwise, it more or less reflects the changes proposed here. You check out the document from svn at http://svn.ari.uni-heidelberg.de/svn/gavo/stcvotable/trunk/ (read-only). For commit privileges, contact me.

-- MarkusDemleitner - 21 Jan 2010

Revision, Draft 2

After some feedback from Arnold, I've prepared a second draft. Some contentious points remaining below.

The current draft is at http://vo.ari.uni-heidelberg.de/docs/note_stc.pdf (and the (ugly) sources are still in the svn mentioned above).

-- MarkusDemleitner - 17 Feb 2010

Issues left in Draft 2

STC container

Arnold's suggestion is to give the AstroCoordSystem and the AstroCoords groups have a common parent. So, instead of having

<group utype="stc:AstroCoordSystem" id="sys1"/>
[other stuff]
<group utype="stc:AstroCoords" ref="sys1"/>

you would have

<group utype="???">
<group utype="stc:AstroCoordSystem" id="sys1"/>
<group utype="stc:AstroCoords" ref="sys1"/>
</group>

Still, constructs like

<group utype="???">
<group utype="stc:AstroCoordSystem" id="sys1"/>
</group>
[other stuff]
<group utype="???">
<group utype="stc:AstroCoords" ref="sys1"/>
</group>

would be allowed.

Comment Markus: I don't really like this -- It creates an additional element for no apparent benefit since you still need to resolve the references. If, on the other hand, we'd abandon referencing completely, it would definitely be worth it, but people may resent the idea of not being able to reuse coordinate system definitions within a VOTable (though probably only a small fraction of the existing VOTables would actually suffer from not being able to do so). So, from me: Either referencing or top-level STC container.

Comment Arnold: It keeps the STC stuff neatly together and if there ever is a need to add the observer's location, it can be done. It does make it easier to interpret the information in terms of an STC metadata object, which will come in handy when we finally have an STC library. And I don't particularly care for scattered metadata.

Comment

Inventing an additional parent element doesn't look necessary to me - especially since you are still allowed to scatter the information and put the AstroCoords and AstroCoordSystem information separately. I vote for the version without a parent.

-- KristinRiebe - 10 Mar 2010

Epoch

Should an epoch like B1950.0 be encoded as

<info utype="stc:AstroCoords.Position.Epoch" value="B1950.0"/>

or as

<info utype="stc:AstroCoords.Position.Epoch" value="1950.0"/>
<info utype="stc:AstroCoords.Position.Epoch.whatever" value="B"/>

Comment Arnold: Epoch is a number, not a string. If there were a limited number of values, one might consider to represent them with an enumerated list of strings, but that is not the case. It is a foolish hack to represent a numeric value with a string parameter; this a properly a numeric quantity with an attribute that says whether it is Julian or Besselian.

Comment Markus: Splitting that perfectly understandable literal has negligible benefits at considerable cost. Plus, the votable schema already contains an appropriate type (astroYear). So, I can see no reason to double the amount of serialization and handling effort.

Comment

I agree with Markus - aren't Astronomical epochs practically always written with a leading character? So they should be defined as type astroYear and thus no confusion with numbers/strings can occur. Besides, it looks more concise and simpler to understand.

-- KristinRiebe - 10 Mar 2010

Referencing

Should the referencing between AstroCoords groups and AstroCoordSystem groups be done using VOTable referencing, viz.,

<group utype="stc:AstroCoordSystem" id="sys1"/>
[other stuff]
<group utype="stc:AstroCoords" ref="sys1"/>

or rather using utypes, viz.,

<group utype="stc:AstroCoordSystem">
   <info utype="stc:AstroCoordSystem.id" value="sys1"/>
</group>
[other stuff]
<group utype="stc:AstroCoords">
   <info utype="stc:AstroCoords.coord_system_id" value="sys1"/>
</group>

Comment Arnold: If STC provides a referencing mechanism to tie its components together, that should be used to do so, not a VOTable mechanism. And if you encapsulate the whole thing in an STC container (see above), it is the natural, neatly self-contained way to do it.

Comment Markus: STC doesn't really provide a referencing mechanism. There's some mechanism in STC-X but, e.g., none in STC-S. We really, really should use native referencing. Referencing is messy to get right without additional complications of having two different identifier systems (e.g., you need to get referential integrity and uniqueness right, and you need to catch cases when they are violated, and you need to tell the user that something went wrong, etc). Self-containedness is nice, but not at the cost of doubling the implementation effort in a tricky spot. So: Since we're writing VOTables, we should be using VOTable's referencing.

Comment

I vote for the first version - since VOTable's referencing system is doing a good job here, more complications (even if they could achieve self-containedness) are not necessary.

-- KristinRiebe - 10 Mar 2010

Carrier element trouble

During discussions at the 5th EuroVO tech forum, it was noticed that the choice of the carrier element for the utype/value pairs (INFO) was bad since INFOs are not allowed within groups, plus they require name attributes, so even if they went to, e.g., RESOURCEs (which can take INFOs), they are not the optimal carriers for key/value-pairs.

So, we need a new carrier element. Candidates are:

  • PARAM -- like before revision. Somewhat suboptimal since you need name (which is not needed) and datatype/arraysize (which is always char/* here), so you have about as much scaffolding as content.
  • GROUP -- could have a utype, but not a value. We'd thus need some kludge to enter values, so GROUPs are probably out.
  • keep INFO and use RESOURCE containers -- RESOURCEs are not allowed within TABLEs, so we'd have to move everything around quite a bit.
  • Change the VOTable schema to allow INFO in GROUP or have a special element to communicate key/value pairs or whatever.

My feeling is that ruefully returning to PARAMs and biting the bullet of the scaffolding attributes is the easiest and therefore best way. More opinions? -- MarkusDemleitner 2010-03-18

Edit | Attach | Watch | Print version | History: r25 | r17 < r16 < r15 < r14 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r15 - 2010-03-18 - MarkusDemleitner
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback