On 2009-02-28 11:26-0800 Alan W. Irwin wrote: > Despite (or because of) all the C programming I have been doing recently, I > far prefer programming in Python, so my next steps are to get the new time > API working in Python, and then use example 29 in Python as a test bed for > my about-to-be-implemented leap second changes to libqsastime. My goal is to > make a rigourous test of all possibilities by adding plots to example 29 of > leap second details near historical epochs with a positive discontinuity > (e.g., 2009-01-01) and a negative discontinuity (e.g., 1961-08-01) with both > TAI and UTC as the independent variables.
As of revision 9662, the leap-interval changes for libqsastime have been implemented for btimeqsas and strfqsas. This allows users to transform from continuous TAI to broken-down time results and formatting, but does not (yet) allow the user to transform from broken-down UTC to continuous TAI. The 29th python example has now been expanded to demonstrate these capabilities. The detailed plots of TAI-UTC near epochs where both positive and negative leap intervals occurred look correct with TAI as the independent variable. I urge anybody who is interested in leap-interval shenanigans to look at the plots now generated by python example 29. You run such plots in the installed examples directory by running, e.g., python/x29 -dev xwin When a leap interval is removed from UTC (that has happened twice in the early history of UTC), there is a corresponding shift in the UTC labelling of the independent TAI variable so labels from the missing UTC interval are not used (which is the correct result). In the more normal case when a positive leap interval (now the leap interval is a second, but in the early history of UTC it was always much smaller than that), the UTC labelling of the independent TAI variable does not repeat. Instead, for epochs when the leap-interval is being inserted, the results are normalized so that the seconds result is 60 (as a flag that a leap second is being inserted for the epoch in question). This labelling treatment corresponds to how a leap day is labelled using February 29. I believe most users want their time handling to be done correctly, but they prefer it to be done by libraries rather than struggling with, e.g., leap seconds, themselves. Thus, I am quite pleased with these python example 29 results because I think they demonstrate correct libqsastime and PLplot time handling for the case of both positive and negative leap intervals with TAI as the independent variable. As soon as I have finished the leap-interval changes for ctimeqsas in libqsastime (which will allow broken-down UTC to be transformed to continous TAI), then I plan to expand python example 29 to demonstrate that capability as well with UTC being the independent variable. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel