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 ofresult
.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 typeA 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 callingcore.ureal
andcore.ucomplex
. This should be setTrue
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 thedependent
flag setTrue
. In future releases, this will be a requirement.core.result
is an alias forarchive:result
.reporting.sensitivity
is deprecated. This function will not be available in future and there is no equivalent functionality.core.component
andreporting.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 usingcore.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 nonzero  A bug in the function
linear_algebra.transpose
and the associated object attributeT
has been corrected.  The function
reporting.budget
now returns an empty sequence if the object passed to it has no components of uncertainty (previously aRuntimeError
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 anexamples
folder, alib
folder and ascripts
folder. Thelib
folder path is added to the environment variableGTC_LIB
. Thescripts
folder path is added to the environment variableGTC_SCRIPTS
. The folders inGTC_SCRIPTS
will be searched byGTC
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
andreporting.k2_factor_sq
now have quicker, but less accurate, implementations available as an option.core.multiple_ureal
andcore.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 thex
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 affectedtype_a.line_fit_wtls
)  Fixed a problem with
reporting.k_factor
, which was unstable for very large values ofdf
 The Windows Explorer context menu ‘SendTo’
GTC
item now passes the target folder toGTC
, 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¶
The function signature has changed. The optional a_b parameter has been removed.
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
andfunction.LineFitWTLS
These are refinements of the
LineFit
in the previous release. They are specific to the type of regression that has been performed.A label can be assigned to the uncertain number parameters a and b.
A different type of object is returned.
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 calledssr
and the attributeN
has been added.As above for
type_a.LineFitOLS
andtype_a.LineFitWLS
.This class has additional functions
x_from_y
andy_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.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 uncertainnumber mean of a sequence use
function.mean
.A number of changes have been made to the
sim
module.A suffix has been added to the functions
gaussian
,uniform
,triangular
andarcsine
. They are nowgaussian_est
,uniform_est
,triangular_est
andarcsine_est
.A suffix has also been added to
bi_gaussian
andmv_gaussian
. These functions are nowbi_gaussian_est
andmv_gaussian_est
.The mapping
distribution
has been replaced by a mappingestimate
in which the names (without the_est
suffix) are keys to the functions above.A suffix has been added to
uniform_ring
anduniform_disk
. These are now nameduniform_ring_err
anduniform_disk_err
.New functions
gaussian_err
,uniform_err
,triangular_err
,arcsine_err
,bi_gaussian_err
andmv_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
andcmath
are now imported into theGTC
environment. So there is no need to useimport math
orimport 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
.

line_fit
line_fit_TLS


the previously separate functions
standard_uncertainty_real
andstandard_uncertainty_complex
have been combined 
now returns an uncertain number, instead of a tuple of sample statistics
line_fit_TLS
Changes affecting userdefined modules¶
Userdefined extension modules can now use the Python option
from __future__ import divisionto ensure that integer division no longer truncates a quotient that is not exactly an integer.
Version 0.9.5¶
The first release of GTC
.