Special attention To Alberto Re: SODA erratum 3 proposal
Mark Taylor
m.b.taylor at bristol.ac.uk
Tue Feb 14 18:48:02 CET 2023
Alberto,
On Tue, 14 Feb 2023, alberto micol wrote:
> Before answering Francois’ request for my comments,
> I need to ask a question to Mark.
I'm assuming you're asking me with my taplint/votlint hat on.
> I do agree with you, Mark, that using scalar MIN and MAX values
> for a xtype=“interval" element is the least surprising semantics,
> but...
>
> Votable 1.4 seems to require that the MIN and MAX <VALUES> must be of the same arraysize as the parent parameter.
Is that true? I may be missing it but I don't see text in VOTable 1.4
that says that. I don't see anything much in the text that mandates
what has to go into the MIN/MAX value attribute, beyond a couple of
examples. It's sort of obvious for scalar numeric fields,
but far from obvious for array values. For that reason
(as far as I can remember) votlint/taplint does not attempt to
validate the MIN/MAX values - currently, you can write anything
in there and votlint/taplint will not tell you off.
If future versions of the VOTable standard are clearer about what
can go into MIN and MAX, I expect I will update the validator logic
to report non-compliance.
> Indeed ASTROPY complains if the arraysizes of the VALUES MIN and MAX are not the same as for the PARAM:
> WARNING: E02: ?:?:?: E02: Incorrect number of elements in array. Expected multiple of 2, got 1 [astropy.io.votable.converters]
So it looks like the astropy validator made a different decision about
how to validate those elements than I did.
> I understand VOTable 1.5 is supposed to change this; the new text reads:
> > When the parent of a VALUES element does have an xtype, special rules apply;
> > clients should only try to parse limits of xtyped fields when they know the xtype.
>
> The text “when they know the xtype” confuses me quite a bit. What does that mean in practice? For example:
> How will a validator understand how to validate a votable with MIN/MAX VALUES expressed with arraysizes different than its parent element,
> as suggested for the MIN MAX of an interval ?
I think the idea is that where a known xtype is present, parsers
(and validators) should interpret the MIN/MAX in accordance with
special rules about MIN/MAX that are provided along with the
xtype definition (most likely in DALI); those rules will explain
what the constraints are for that xtype. If an unrecognised xtype
is present, parsers can't make sense of MIN/MAX and shouldn't try.
In absence of xtype, MIN/MAX has to be a scalar with "obvious"
semantics.
> One could even write:
> <PARAM arraysize=“2” xtype=“interval” name=“BAND”…>
> <VALUES>
> <MIN arraysize=“” …>
> <MAX arraysize=“55” …>
> </VALUES>
> </PARAM>
> Votable 1.5 seems to allow such possibility !
No, since (a) where the interval xtype is defined there should be
rules about how to use MIN/MAX and (b) there is no arraysize
attribute defined on the MIN/MAX elements.
> In which case the validator will need to simply omit any check on those MIN MAX values, right?
> That does not seem particularly healthy.
About what one can not speak, one must remain silent.
Mark
--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk http://www.star.bristol.ac.uk/~mbt/
More information about the dal
mailing list