[VOUnit] How to express the unit of a dimensionless quantity?

Alberto Micol amicol at eso.org
Thu Mar 7 12:55:39 CET 2024


Regarding the special unit string '1', 
taplint (at least the version I'm using) returns the following: 

> This is STILTS taplint, 3.4-8/ba1522571 (2023-04-20)
>
> W-UUC-VUNE-2 Questionable unit "1"; Not legal VOUnits string (BAD_SYNTAX): unity parser error at character 2: syntax error in 15 columns: dbo.espresso_rv.ccf_continuum, ...
>

It is a Warning and not an Error, but the text reads quite strongly...
Would a more recent version of STILTS fix this?

Alberto
PS: The mentioned ccf_continuum column is for the continuum expressed in number of electrons,
for which I decided to set:
 unit = '1'
 ucd = 'meta.number;phys.electron' 
I hope I got the ucd right! Comments on that?


On 07.03.24, 12:23, "Mark Taylor" <m.b.taylor at bristol.ac.uk <mailto:m.b.taylor at bristol.ac.uk>> wrote:


[This email was sent from outside of ESO from the address (M.B.Taylor at bristol.ac.uk <mailto:M.B.Taylor at bristol.ac.uk>). If it looks suspicious, please report it to phishing at eso.org <mailto:phishing at eso.org>.]


On Thu, 7 Mar 2024, Norman Gray via semantics wrote:


> Sect.2.2 notes that the empty string is not a valid 'units string', but if you want to put that into the 'units' column of your database, this standard isn't going to forbid you -- it's your database, after all -- but a units parser is obliged to report that as an invalid string.
> 
> Sect.2.8 is therefore proposing a good practice, namely to put an empty string in this column of the database, rather than some other flag, which might cause confusion or uncertainty in future. That is, it's suggesting which particular invalid units string might be the best choice in this location. An empty string shouldn't cause confusion, since the database owners presumably know that the column is a non-unit object, and the fact that there's a 'units' field associated with it, which requires a value, is merely an artefact of schema design.


FWIW neither votlint nor taplint will report an error for the case of
an empty string where a (otherwise unconstrained) VOUnit string is
expected, on the grounds that an empty string looks like a decision
not to supply a unit rather than a malformed attempt to supply a unit.


--
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk <mailto:m.b.taylor at bristol.ac.uk> https://www.star.bristol.ac.uk/mbt/ <https://www.star.bristol.ac.uk/mbt/>







More information about the semantics mailing list