Gain drifts can be monitored via the *AUTOGAIN section.
The gain matched values of two well-defined peaks must be supplied. Initial gain coefficients for a quadratic fit may be supplied in the *DATA section. Alternatively, two peak positions for each data value to be monitored may be supplied in this section and initial linear coefficients will be derived.
The *AUTOGAIN section adjusts the gain coefficients by measuring the shift in two peak positions for each spectrum. For an initial calibration E for data value x:
E = a + bx + cx2
and for the shifted energy Enew given by:
Enew = A + BE
then the shifted coefficients are derived as:
anew = Ba + A
bnew = Bb
cnew = Bc
The gain coefficients are applied to the data by means of the GAIN command in the *COMMANDS section.
The gain coefficients are calculated in the autogain section and updated into a gain array ( defined in the *DATA section). This gain array needs to be associated with a set of data words by an INIT statement in the autogain section.
The user can set the number of blocks (autogain period) over which the gain coefficients are initially calculated and subsequently monitored during the sort. A minimum acceptable peak area and maximum deviation may also be specified.
After the sample number of data blocks have been read, the peak centroids in the autogain spectra are determined and matched to the control values. This enables the gain shift to be calculated. At the start of an autogain sort, only the commands in the autogain section are executed until all the initial gain coefficients have been determined. If they have not all been determined after three times the autogain period then the autogain phase will stop. Any unresolved coefficients will take the initial values supplied at the start of the autogain phase.
After this initial autogain phase offline, the first file will be rewound and the sort will restart, now executing the statements in the *COMMANDS section and checking for gain drifts each autogain period.
If a peak centroid in a gain spectrum shifts by more than the specified deviation then the gain coefficients for the corresponding data word will be recalculated. All autogain spectra are zeroed after the gains are monitored each time.