Change History

Version 0.9.11

This release does not introduce new features, but it corrects some bugs in release 0.9.10. The documentation has been reviewed. Windows XP is no longer supported.

Changes to existing functions and classes

  • core.result returns a reference to a new uncertain number object, which is a clone of the argument. This avoids a subtle problem that can arise in the calculation of uncertainty components with respect to intermediate results in a calculation. An entry in the FAQ section has been added to briefly demonstrate the use of result.
  • number_strings.to_string now takes an optional parameter for the imaginary unit (i or j)
  • The unary + operator can now be applied to uncertain complex numbers. The operator creates a new uncertain complex number object that is a clone of the argument (i.e., the same behaviour as the + operator applied to uncertain real numbers)
  • Fixed a problem with the banner appearing in command line operation. When GTC was called with one or more files to execute on the command line, and when the interactive flag was set (-i), so that GTC would remain in interactive mode after executing the files, the GTC banner and version number would appear on the console. This is undesirable, because the modules may generate output, so the banner has been suppressed in such cases.

Third party packages included

  • xlwt : version 1.3.0
  • xlrd : version 1.1.0
  • xlutils : version 2.0.0
  • openpyxl : version 2.4.8
  • pyRTF : version 0.45

Version 0.9.10

New functions and classes

  • The class type_a.BiasedIndication as been added. This can be used to correct simple instrument indications for bias using a type-A estimate of the correction term required. In statistical terminology, the uncertain number represents a ‘prediction interval’ for a future indication.

Changes to existing functions and classes

  • A flag dependent is provided when calling core.ureal and core.ucomplex. This should be set True if the uncertain number may be correlated with others.
  • core.set_correlation will issue a warning if used with uncertain number arguments that have not been created with the dependent flag set True. In future releases, this will be a requirement.
  • core.result is an alias for archive:result.
  • reporting.sensitivity is deprecated. This function will not be available in future and there is no equivalent functionality.
  • core.component and reporting.u_component issue warnings when asked for a component of uncertainty in an uncertain number with respect to another uncertain number that is not elementary and has not been declared using core.result. In future releases, this will be a requirement.
  • Uncertain numbers can now be used in Boolean expressions. Uncertain numbers are True when the value is non-zero
  • A bug in the function linear_algebra.transpose and the associated object attribute T has been corrected.
  • The function reporting.budget now returns an empty sequence if the object passed to it has no components of uncertainty (previously a RuntimeError was raised).
  • A bug has been corrected in the evaluation of degrees of freedom for complex quantities.

Version 0.9.9

This release is mainly concerned with fixing issues.

  • Windows Administrator permission is not needed to install GTC.
  • The installation process can create a My GTC folder under the users home folder (e.g., C:\Users\jane.user\My GTC). This folder contains an examples folder, a lib folder and a scripts folder. The lib folder path is added to the environment variable GTC_LIB. The scripts folder path is added to the environment variable GTC_SCRIPTS. The folders in GTC_SCRIPTS will be searched by GTC to locate script files.
  • The method archive.Archive.intermediates, introduced in 0.9.8, has been removed (however, archives created using GTC version 0.9.8 can still be read in 0.9.9).
  • The function archive.result is now used to declare intermediate results that can be archived.
  • reporting.k_factor and reporting.k2_factor_sq now have quicker, but less accurate, implementations available as an option.
  • core.multiple_ureal and core.multiple_ucomplex can now handle some elements that have zero uncertainty (i.e., by creating constant uncertain numbers)
  • Fixed a problem with function.line_fit, which did not work properly when the x data contained integers (truncation during integer division would occur)
  • Fixed a problem with function.line_fit_wtls, which did not converge to a solution in certain cases (this bug also affected type_a.line_fit_wtls)
  • Fixed a problem with reporting.k_factor, which was unstable for very large values of df
  • The Windows Explorer context menu ‘SendTo’ GTC item now passes the target folder to GTC, allowing the script to import modules in that folder.
  • function.mean now accepts an iterable object. Previously a sequence was required, but it now accepts generator objects as well.

Version 0.9.8

This release is mainly concerned with fixing problems identified in the previous versions.

In particular, the Archive class has been redesigned.

When an archive is created, the default behaviour now ignores the relationships between any archived intermediate uncertain numbers. When it is necessary to save information about these relationships, the new method intermediates should be used to identify those intermediate uncertain numbers of interest.

Note

Archives created using GTC version 0.9.7 are incompatible with 0.9.8. The older format archives need to be recreated using the new version.

  • The core function get_covariance has been added
  • Uncertain real numbers now have the attributes .real and .imag
  • GTC import now finds modules located in the current working directory
  • The sign of the angle returned by u_rect_to_tangent has been corrected
  • mag_squared now handles uncertain real numbers correctly
  • Complex division when the numerator value was zero has been fixed
  • get_correlation now returns zero, or zero seq, when real or complex numbers are given
  • The degrees of freedom calculation for the imaginary component of an uncertain complex number has been fixed

Version 0.9.7

Changes to existing functions and classes

  • function.line_fit

    The function signature has changed. The optional a_b parameter has been removed.

  • function.line_fit_wtls

    Name changed from line_fit_TLS.

    The function signature has changed. The initial estimates of slope and intercept are no longer the first argument.

  • function.LineFitOLS, function.LineFitWLS and function.LineFitWTLS

    These are refinements of the LineFit in the previous release. They are specific to the type of regression that has been performed.

  • type_a.line_fit

    A label can be assigned to the uncertain number parameters a and b.

    A different type of object is returned.

  • type_a.line_fit_wtls

    Name changed from line_fit_TLS.

    The function signature has changed. The initial estimates of slope and intercept are not the first argument.

    A label can be assigned to the uncertain number parameters a and b.

    A different type of object is returned.

  • type_a.LineFitOLS, type_a.LineFitWLS, type_a.LineFitRWLS

    These are refinements of LineFit. They are specific to the type of regression that has been performed.

    The chi_square attribute is now called ssr and the attribute N has been added.

  • type_a.LineFitWTLS

    As above for type_a.LineFitOLS and type_a.LineFitWLS.

    This class has additional functions x_from_y and y_from_x. These, can be used to predict the independent variable from observations of the dependent variable and predict the dependent variable from a value of the independent variable.

  • type_a.mean

    Although the elements of the data sequence may be uncertain numbers, only the value attribute is used to calculate the mean and only a pure number (float or complex) is returned.

    To evaluate the uncertain-number mean of a sequence use function.mean.

  • sim

    A number of changes have been made to the sim module.

    A suffix has been added to the functions gaussian, uniform, triangular and arcsine. They are now gaussian_est, uniform_est, triangular_est and arcsine_est.

    A suffix has also been added to bi_gaussian and mv_gaussian. These functions are now bi_gaussian_est and mv_gaussian_est.

    The mapping distribution has been replaced by a mapping estimate in which the names (without the _est suffix) are keys to the functions above.

    A suffix has been added to uniform_ring and uniform_disk. These are now named uniform_ring_err and uniform_disk_err.

    New functions gaussian_err, uniform_err, triangular_err, arcsine_err, bi_gaussian_err and mv_gaussian_err have been added.

    A mapping error is provided in which the names (without the _err suffix) are keys to the functions above.

Version 0.9.6

Changes affecting the GTC interpreter

  • The standard Python modules math and cmath are now imported into the GTC environment. So there is no need to use import math or import cmath, unless writing extension modules.

  • Integer division no longer truncates a quotient that is not exactly an integer. So now

    >>> 2/3
    0.6666666666666666
    

New functions

New functions have been added to modules: core, function, type_a, reporting and number_strings.

Changes affecting user-defined modules

  • User-defined extension modules can now use the Python option

    from __future__ import division
    

    to ensure that integer division no longer truncates a quotient that is not exactly an integer.

Version 0.9.5

The first release of GTC.