h5md-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h5md-user] Finalization of units module


From: Pierre de Buyl
Subject: Re: [h5md-user] Finalization of units module
Date: Fri, 20 Dec 2013 14:47:55 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Dec 20, 2013 at 12:00:22AM +0100, Felix Höfling wrote:
> Such an attribute seems useful to ensure backwards compatibility in
> the future. Otherwise, we could only extend the set of units in
> future versions (and could have no contradicting symbols like hour
> and Planck's constant).
> 
> The selection of non-SI-units in udunits appears a bit random, I'm
> not sure whether we should stick verbatim to this library. For the
> SI base and derived units, everything is fine though. We could
> restrict to this set of units, which would be denoted by the value
> "SI" for the system attribute. However, I'm afraid that many people
> will dislike the idea to strictly stick to SI.
> 
> Other non-SI units may be added later (with appropriately extended
> values of the system attribute).
> 
> As an alternative, we may give up direct interoperability with
> udunits. Then, the current status would still be a useful
> description of units which IMO covers most of the research with
> molecular data in physics, chemistry, and biology. Maybe udunits
> could even receive an update to support the missing symbols.
> 
> I'll be on vacation from tomorrow on, so please go ahead and choose
> whatever appears more practical.

The attribute has been added. "SI" is thus taken :-)

I also cleaned up a little the units list to avoid name clashes or otherwise
unclear situations.

I attach a modified udunits2 database that happily understands all that is found
in the 'units' module. For those who have lua-units installed, the following
line should replace the corresponding in the original h5md.lua file.

local system = units.read_xml('udunits-h5md/udunits2.xml')

There is a commented-out line, however: -- assert(U"C"== N"coulomb") does not
pass :-/

For those using the command-line udunits2:
udunits2 udunits-h5md/udunits2.xml
reads the custom database instead and leaves you at the program prompt.

Cheers,

Pierre


Attachment: udunits-h5md.tgz
Description: application/gtar-compressed


reply via email to

[Prev in Thread] Current Thread [Next in Thread]