# Version 2.2 LTPDA Toolbox Software

This table summarizes what's new in Version 2.2:

New Features and Changes Version Compatibility Considerations Fixed Bugs and Known Problems Related Documentation at Web Site
Yes
Details below
Yes — Details labeled as New repository manager in descriptions of changes, below. See also Summary. Bug Reports at Web site Printable Release Notes: PDF

### Introduction

This version of LTPDA is 2.2. This document lists the changes since V2.1.

### New toolbox features

Version 2.2 of LTPDA has various new features.

• A reworking of the way connections to LTPDA repositories are handled. Now all connections are managed by the new "LTPDA Repository Manager" object which is created when ltpda_startup is executed. All users should review their use of repository connection code in any scripts and make the appropriate changes to work with the repository manager (see below).
• A significant amount of work has been done on fitting tools (see below).
• A new class called pest (parameter estimation) has been included which aims to capture details of the various fitting procedures in LTPDA. Objects of this class are now output from all LTPDA fitting function, so some changes to existing analysis scripts and pipelines may be necessary.

### New linear fitting tools in LTPDA

The linear fitting tools are specialised ao methods, built around MATLAB's lscov. All of them return a pest (parameters estimate) object where the fields are containing:

1. Fit parameters
2. Uncertainties on the fit parameters (given as standard deviations)
3. The reduced CHI2 of the fit
4. The covariance matrix
5. The degrees of freedom of the fit.

The following methods are implemented:

• ao/linfit solves an equation in the form Y = P(1) + X * P(2) for the fit parameters P.
• ao/bilinfit solves an equation in the form Y = X(1) * P(1) + X(2) * P(2) + ... + P(N+1) for the fit parameters P.
• ao/polyfit overloads polyfit() function of MATLAB for Analysis Objects. It finds the coefficients of a polynomial P(X) of degree N that fits the data Y best in a least-squares sense: P(1)*X^N + P(2)*X^(N-1) +...+ P(N)*X + P(N+1)
• ao/polynomfit solves an equation in the form Y = P(1) * X^N(1) + P(2) * X^N(2) + ... for the fit parameters P. It handles arbitrary powers of the input vector and uncertainties on the dependent vector Y and input vectors X.
• ao/lscov is a wrapper for MATLAB's lscov function. It solves a set of linear equations by performing a linear least-squares fit. It solves the problem Y = HX where X are the parameters, Y the measurements, and H the linear equations relating the two.

### New repository manager

Until the main documentation is updated, the following a some quick tips to using the new repository manager.

Only a single instance of the repository manager exists. It is created when you run ltpda_startup. To access the repository manager, you can do:

```>> rm = LTPDARepositoryManager
---- Repository Manager -----
connections: 0
connected: 0
------------------------------```

The Repository Manager has both a scripting interface and a graphical user interface. To launch the GUI:

`>> rm.showGui`

Using the scripting interface, you can create new connections and search for existing connects:

`>> rm.newConnection('localhost', 'ltpda_test', 'hewitson')`

specifying the hostname, the database and the username. You can also give the password in plain text to the newConnection command, but that's clearly not advisable.

Making new connections like this allows you to set up your typical connections in your startup.m file (after executing ltpda_startup).

A couple of words about time-outs. The repository manager uses two timers to maintain two aspects of each connection.

The first timer handles whether or not the connection is actually connected to the server. This timer is not user configurable and is set to fire every few seconds so that connections are typically in the disconnected state (you can see this state in the 'age' column of the repository manager gui). Whenever the user tries to use a valid existing connection, the connection is opened and then locked until it is not needed anymore. This is transparent for the user and is handled automatically in methods like submit, retrieve and update.

The second timer is user configurable via the LTPDA preferences. This timer defines when the password for each connection expires. This creates a level of safety so that connections from one user can not easily be abused by other uses. When this password fires, it checks how long each connection has been idle, and clears the password if it is older than the setting in the preferences. Connections with their password cleared are red on the repository manager gui. The next time the user attempts to use a connection whose password has been cleared, they will be prompted to re-enter the password.