Release Notes

Archival copies of GTC

In addition to the github repository, each release of GTC is archived automatically in Zenodo. The most recent release is always at (https://doi.org/10.5281/zenodo.3982925) and previous releases can be accessed from that point. Archived releases are a snapshot of project files belonging to a release without additional information about version history.

Version 1.5.0 (2024-02-27)

  • Support for storing and retrieving Archive objects in XML is provided. Functions persistence.dump_xml(), persistence.dumps_xml(), persistence.load_xml(), and persistence.loads_xml() have been added to the persistence module.

  • Support for using Python pickle to store and retrieve data from archives will be removed from GTC with the release of version 2.0. This means that persistence.load(), persistence.loads(), persistence.dumps(), and persistence.dump() will be no longer be available. Deprecation warnings have been added.

  • A static copy-constructor method copy() has been added for archives. This function duplicates the contents of another Archive object. The copy() method can be used, for example, after an archive has been loaded from a deprecated record format. In that case, the loaded archive is not in a state that can be re-stored (in a different format); however, a copy generated by copy() can be stored. This provides a mechanism to update archives stored in deprecated formats.

  • XML and JSON schemas that describe the structure of archive serialisation records are provided. The schemas are stored in a subfolder (/schema) of the GTC installation.

Version 1.4.1 (2023-08-02)

  • The straight-line regression functions that apply weights in type_a now attribute a default number of degrees of freedom to fitted parameters. The default value depends on the type of regression algorithm and may be overridden by specifying a number of degrees of freedom when calling the function.

Version 1.4.0 (2022-07-19)

Version 1.3.8 (2022-04-01)

  • A bug in function reporting.sensitivity() has been corrected. The function now returns zero when the independent term (x) in the argument has a standard uncertainty of zero. Previously, for example, an exception would be raised if the argument x was an uncertain complex number with a real or imaginary component having zero standard uncertainty. The docstring has been updated to explain the function’s behaviour in more detail.

  • Some improvements to the validation of arguments in the regression functions in type_a and type_b.

Version 1.3.7 (2022-02-24)

  • The property uid has been added to lib.UncertainReal and lib.UncertainComplex. For an lib.UncertainReal, this returns the unique identifier of an elementary uncertain number and, when defined, the unique identifier associated with an intermediate uncertain number (otherwise it returns None). Analogous behaviour is defined for an lib.UncertainComplex.

  • The namedtuple named_tuples.Influence has an attribute uid for the unique identifier of an uncertain-number influence. The function reporting.budget() returns a sequence of Influence objects, each of which now has a unique identifier. This is intended to permit indexing of arbitrary information about uncertain numbers held in other data structures.

  • The idiom shown for using reporting.budget() has changed in the documentation. Previously, the pair of Influence attributes was expanded. Now, a temporary variable is assigned to each Influence item during iteration and then the required attributes are selected.

  • A new section in the documentation under reporting has been added to provide an example that uses the new uid feature.

  • The documentation in straight_line_functions.rst has been updated and some details corrected.

Version 1.3.6 (2021-09-06)

  • When loading an uncertain-number archive from a file or string, if there is an existing intermediate Node registered with the context that is indistinguishable from another in the archive, then the existing Node will be used and no error is raised. Node objects are considered indistinguishable if their labels, uncertainties and degrees of freedom are the same.

  • The string format of an uncertain real number now begins with a space, if the value is positive, or a negative sign.

  • The string format of an uncertain complex number now always shows the sign (+ or -) of the real component

Version 1.3.5 (2021-08-19)

Version 1.3.4 (2021-05-14)

  • reporting.budget() now expects explicit keyword arguments for all options, instead of positional arguments (the names of the previous positional arguments are now the keywords).

  • reporting.budget() takes a new key word intermediate

  • function.implicit() has been added. This finds the uncertain-number solution x to a user-defined function \(fn(x,...) = 0\).

Version 1.3.3 (2021-02-16)

  • Fixed an issue with merging uncertain numbers. The function type_a.merge() now has a tolerance parameter, which is used to determine whether the arguments a and b have equivalent values.

Version 1.3.2 (2020-09-16)

  • Fixed an issue with restoration of archived uncertain numbers. A RuntimeError arose if two uncertain numbers, originally created in the same context, were restored to different archive objects in a new common context.

  • An attempt to create a file or string representation of an empty archive raises a RuntimeError

  • Docstrings for add() and extract() now mention the option of using the name as a look-up key (like a mapping)

Version 1.3.1 (2020-08-21)

  • Fixed an issue with the r attribute of uncertain complex numbers, which returns the correlation coefficient between real and imaginary components: the calculation was incorrect (however, core.get_correlation() gave the correct result).

  • Fixed an issue with the calculation of the variance-covariance matrix for an uncertain complex number with finite degrees of freedom: the matrix element for the variance of the real component was sometimes incorrectly returned for the variance of the imaginary component as well.

Version 1.3.0 (2020-07-28)

Version 1.2.1 (2020-04-01)

  • Fixed issue #18 - calculate the inverse of a matrix with uncertain elements

  • Revised the documentation for the persistence module

Version 1.2.0 (2019-10-16)

  • Functions to perform straight-line regressions are included in modules type_a and type_b.

  • The regression functions in type_a act on sequences of numerical data in the conventional sense (i.e., only the values of data are used; if the data include uncertain number objects, the associated uncertainty is ignored). The residuals are evaluated and may contribute to the uncertainty of the results obtained, depending on the regression method.

  • The regression functions in type_b act on sequences of uncertain-numbers, propagating uncertainty into the results obtained. In most cases, the regression functions in this module are paired with a function of the same name in type_a. For example, type_a.line_fit() and type_b.line_fit() both perform an ordinary least-squares regression. The uncertain-numbers for the intercept and slope obtained from type_a.line_fit() are correlated and have uncertainties that depend on the fitting residuals. On the other hand, the intercept and slope obtained by type_b.line_fit() depend on the uncertain-number data supplied, and does not take account of the residuals.

  • The function type_a.merge() may be used to combine results obtained from type-A and type-B regressions performed on the same data.

  • A number of example calculations are included from Appendix H of the Guide to the expression of uncertainty in measurement (GUM).

  • A number of example calculations are included from the 3rd Edition (2012) of the EURACHEM/CITAC Guide: Quantifying Uncertainty in Analytical Measurement (CG4).

  • There are several examples of applying GTC to linear calibration problems, including the use of regression functions in type_a and type_b.

Version 1.1.0 (2019-05-30)

  • Mathematical functions in the core module (sin, sqrt, etc) can be applied to Python numbers as well as uncertain numbers (previously these functions raised an exception when applied to Python numbers).

  • There is a new array-like class to hold collections of uncertain numbers. UncertainArray is based on numpy.ndarray, which provides excellent support for manipulating stored data. Standard mathematical operations in the core module can be applied to UncertainArray objects.

  • A function reporting.sensitivity() calculates partial derivatives (sensitivity coefficients).

Version 1.0.0 (2018-11-16)

The initial release of the Python code version of the GUM Tree Calculator.

The source code was derived from the stand-alone GUM Tree Calculator version 0.9.11, which is available from the MSL web site . The new version has made some significant changes to the data structures used, with accompanying changes to the underlying algorithms.

The application programmer interface in GTC 1.0.0 remains very close to that provided in GTC 0.9.11, although not all functions in GTC 0.9.11 are available yet. It is our intention to provide the remainder in forthcoming releases.

The most significant change has been to the method of storing uncertain numbers. The archive module in GTC 0.9.11 was replaced in GTC 1.0.0 by the persistence module. So, archives created using GTC 0.9.11 are not interchangeable with GTC 1.0.0.