<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt">Hi Norman, Markus, Sébastien,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Based on the discussion so far I’m disinclined to try to introduce a change in astropy to support Sun, although as a data provider it may still be the best option for us for a handful of columns. As Markus
said, it is unlikely to be handled automatically by a client. I don’t see a way for astropy to map it to a concrete unit, but I suppose it could be of limited use to a human.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Regarding astropy units,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Re astropy's VOUnits validation: is that <</span><span style="font-size:12.0pt">
</span><span style="font-size:12.0pt"><a href="https://kbarbary-astropy.readthedocs.io/en/latest/index.html">https://kbarbary-astropy.readthedocs.io/en/latest/index.html</a> >? It has occurred to me to add a Python version of the Unity library, alongside
the Java and C versions. A basic implementation, with the same limited functionality as the C library, would be fiddly rather than hard. Do you think that would be of interest to anyone?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">That link is a bit old. This one
<a href="https://docs.astropy.org/en/stable/units/index.html">https://docs.astropy.org/en/stable/units/index.html</a> points to the latest docs for astropy units support. Although I’m not an expert in either astropy.units or astronomical units in general,
I’ve been impressed so far by this astropy.units which recognizes a number of different text formats (including CDS, Fits and VOUnit). I especially like how it’s integrated with Quantity objects and arithmetic in general. This tutorial shows some of that:
<a href="https://learn.astropy.org/tutorials/quantities.html">https://learn.astropy.org/tutorials/quantities.html</a>.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">I will continue to focus on the astropy units because of the integration mentioned above and the natural ties to pyvo, but an alternate implementation (Python version of Unity) could certainly be interesting.
I do intend to try some experiments to compare the Unity VOUnit support to that of astropy (at least for the purposes of validation), but that can be done with the current Unity (I’ll probably run via a Stilts script). If there is a lot of divergence then
that will raise new questions, but I’m hoping the differences are subtle.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Tom<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Norman Gray <norman.gray@glasgow.ac.uk><br>
<b>Date: </b>Wednesday, May 25, 2022 at 12:47 PM<br>
<b>To: </b>Tom Donaldson <tdonaldson@stsci.edu><br>
<b>Cc: </b>"semantics@ivoa.net" <semantics@ivoa.net><br>
<b>Subject: </b>Re: VOUnit for solar density or metallicity?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">External Email - Use Caution<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Tom, hello.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">On 25 May 2022, at 16:40, Tom Donaldson wrote:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Thank you for the responses! I think I am content with continuing to use Sun as the most reasonable available unit to describe the FIELDs we have, but I am less clear on why it would
be considered valid according to the standard.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> Sun is a valid vounit symbol. It is described in the current Recommendation, and this<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> should not change in version 1.1 currently in preparation. The problem comes from the<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> validator that ignored Sun, but this should get fixed, see :<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><a href="https://urldefense.com/v3/__https:/heptapod.host/nxg/unity/-/issues/11__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cL2m8smlA$">https://urldefense.com/v3/__https://heptapod.host/nxg/unity/-/issues/11__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cL2m8smlA$</a>
<<a href="https://urldefense.com/v3/__https:/heptapod.host/nxg/unity/-/issues/11__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0C37XentP6REz1B5JpwoHuwQX6BYnX6-RUFiwlrFqMrpjaGG3s9iZpejm7qfPwwfoyVpyN8bKvrduzFJYMfRBJHzQu6Qc2LBgKed$">https://urldefense.com/v3/__https:/heptapod.host/nxg/unity/-/issues/11__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0C37XentP6REz1B5JpwoHuwQX6BYnX6-RUFiwlrFqMrpjaGG3s9iZpejm7qfPwwfoyVpyN8bKvrduzFJYMfRBJHzQu6Qc2LBgKed$</a>><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> My reading of the document is that Sun appears in Tables 5 and 14. The wording around and within those tables does suggest that it is a VOUnit. However appendix C.4, which is the
normative definition of the grammar, does not refer to either of those tables so would seem to say that Sun could not be recognized by the grammar.<o:p></o:p></span></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Ah yes, it does appear in Table 5, too (Sect.2.8), and almost all of Sect.2 is normative. That's definitely an error. I'm fairly sure I have unit-tests in Unity that were intended
to match these tables, but either I wasn't sufficiently systematic about assembling those, or else the table changed after the test-cases were written, and one way or another I omitted 'Sun', at least.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">(The test cases are at <<a href="https://urldefense.com/v3/__https:/heptapod.host/nxg/unity/-/blob/branch/default/src/grammar/testcases.csv__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cJYP3Lfcw$">https://urldefense.com/v3/__https://heptapod.host/nxg/unity/-/blob/branch/default/src/grammar/testcases.csv__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cJYP3Lfcw$</a>
> , which isn't actually quite a CSV file, and is in a home-made format which prefers density over legibility *cough*).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">So it's a straight inconsistency that 'Sun' is normatively present in Table 5 and normatively absent in Table 2.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">A problem here is that Sect. 2 is a mix of specification and commentary. Perhaps we should mark Sects. 2.7 and 2.8 (and contained tables) as 'informative'. Even if so, informative
sections should be at least consistent with normative ones.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> I note that essentially all of the other units mentioned in Table 5 are also present in Table 2 which is referenced by the grammar definition. Was Sun left out of Table 2 on purpose
or an error? Should C.4 have referenced more tables? (or most likely, am I just misreading the document?) Although all of section 2 is labelled “normative”, and section 2.8 contains Table 5, the wording there is just ambiguous enough to me that if I were
implementing a validator I would probably favor the more explicit appendix C.4.<o:p></o:p></span></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Agreed, and the first paragraph of C.4 was indeed intended to be read as excluding everything other than Tables 2 and 8.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">So Sun was indeed left out of Table 2 both accidentally and on purpose. I meant to leave it out, but also meant to raise on-list the question of whether it should go back in, but
accidentally forgot (apologies, all!).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">I've added to the document issues list at <<a href="https://urldefense.com/v3/__https:/github.com/ivoa-std/VOUnits/issues__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cLj-2Rtzw$">https://urldefense.com/v3/__https://github.com/ivoa-std/VOUnits/issues__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cLj-2Rtzw$</a>
><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #B5C4DF 4.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-right:0in" id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE">
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> I’m not just asking to be pedantic (and to decide whether to surround our Sun with single quotes). It turns out that astropy’s VOUnit validation also does considers Sun to be unknown
(but does recognize all the other units in Table 5 that are also in Table 2). Before starting an issue or PR with astropy regarding Sun, I want to make sure that it is indeed “officially” recognized by the standard.<o:p></o:p></span></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">'Pedantic' is my middle name.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">So this means I now have two suggestions:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> 1. We decide that 'Sun' either is or isn't a 'known unit'.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"> 2. We mark Sects. 2.7 and 2.8, and Tables 4--7 as 'informative' rather than normative (but still make them consistent with Table 2).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Re astropy's VOUnits validation: is that <<a href="https://urldefense.com/v3/__https:/kbarbary-astropy.readthedocs.io/en/latest/_modules/astropy/units/format/vounit.html__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cK4XKNS4g$">https://urldefense.com/v3/__https://kbarbary-astropy.readthedocs.io/en/latest/_modules/astropy/units/format/vounit.html__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cK4XKNS4g$</a>
>? It has occurred to me to add a Python version of the Unity library, alongside the Java and C versions. A basic implementation, with the same limited functionality as the C library, would be fiddly rather than hard. Do you think that would be of interest
to anyone?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">All the best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Norman<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">--<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">Norman Gray : <a href="https://urldefense.com/v3/__https:/nxg.me.uk__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cIPfBeY7Q$">https://urldefense.com/v3/__https://nxg.me.uk__;!!CrWY41Z8OgsX0i-WU-0LuAcUu2o!0w5Oy6BVKRk3Tf1s_lVQPYvVSr5JgAhXbcYHmEv9tk58puqqPvDwVOQ4Plqk9R23h505YDnYAyt40mKpEcl79cIPfBeY7Q$</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">SUPA School of Physics and Astronomy, University of Glasgow, UK<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
</div>
</body>
</html>