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: Tue, 14 Jan 2014 13:32:47 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Jan 14, 2014 at 09:57:42AM +0100, Felix Höfling wrote:
> Am 13.01.2014, 22:39 Uhr, schrieb Peter Colberg <address@hidden>:
> 
> >Following external pressure to publish or perish, I revised the units
> >module by defining the "SI" unit system to encompass SI base units,
> >SI derived units, and SI prefixes [1].
> >
> >[1] http://www.bipm.org/en/si/si_brochure/general.html
> >
> >I also updated the test case in lua-units [2].
> >
> >[2] http://git.colberg.org/lua-units/tree/examples/h5md.lua
> >
> >The solution will make everybody unhappy. For the use of non-SI units,
> >the unit attribute can still be written using a scalar prefix and an
> >SI unit. Alternatively, the values can be converted to an SI unit
> >using the cv_convert_* functions [3] of the udunits2 library.
> >
> >[3] 
> >http://www.unidata.ucar.edu/software/udunits/udunits-2.2.2/doc/udunits/udunits2lib.html#Value-Conversion
> >
> 
> The BIPM brochure is a good basis, probably the best one. Thanks for
> implementing it and for cleaning up my list!
> I think that the current implementation of "SI strict" makes many
> people happy and indeed deserves to be called version 1.0.
> 
> We don't need it now, but just to remember: The brochure also says
> in ch. 4 what the "extended" set of units is, including natural
> units and CGS system. (It even resolves the conflict between "hour"
> and Planck's constant by using \hbar instead of h.) For abstract
> unit systems, it would be sufficient to specify the physical
> dimension instead of a "unit", which could be done using the symbols
> in http://www.bipm.org/en/si/si_brochure/chapter1/1-3.html.
> 

Please find attached:
1. A python program to generate the xml file for use with udunits2. This program
is not very elegant, I checked the resulting xml file and it seems to work as
intended.
2. The resulting xml file.
3. Usage:
python generate_units_xml_file.py | iconv -t ASCII > h5md_units_SI.xml

This use of udunits2 is purely for (i) convenience and (ii) a practical way to
test the uses of the unit system. It does not mean in any way that we should
follow udunits2 practice in the development of H5MD. This is quite clear now
that Peter used the BIPM data to generate the unit list.

Pierre

PS I don't like "publish or perish" and I hope that the current state of H5MD is
"good" and not "good enough so let's be done with it". Also, if we want any
realistic use for H5MD 1.0 should come soon enough :-)

Attachment: generate_units_xml_file.py
Description: Text Data

Attachment: h5md_units_SI.xml
Description: application/xml


reply via email to

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