Auto-Analysis (AA) is the processing stage that starts from SPD, corrects for all instrumental effects lasting longer than one reset interval and generates sets of fluxes against wavelength (spectra). These spectra are generated irrespective of the observation specifications. Figure 8.2 gives an overview of AA processing. Most of the SWS AA processing steps are independent of AOT number as most of the special options (e.g. reference scans, see table 4.1) are used in several different AOT's and thus are implemented as part of the main processing flow.
These steps are described in more detail in the following pages.
The data and header information are read from the input SPD. Errors occur when e.g. SPD does not exist or cannot be read etc.
The AOT number, needed for the further processing of the data, is determined from the EOHAAOTN keyword in the SPD FITS header. The velocity of the spacecraft with respect to heliocentric is similarly obtained, and for AOT SWS01 the speed is also obtained.
The detector data may need to be corrected for time dependant effects such as detector hysteresis.
Currently, only a number of readouts at the beginning and end of dark currents are rejected.
For every block of dark current data, the median of valid dark current data is calculated for each detector. The reset interval is computed from the reset pulses (extracted from the status code) and the gain is extracted from the detector flag.
Whenever possible a (linearly) interpolated dark current is subtracted from each non-dark current scan. The interpolation is done over the dark current directly preceding the scan and the nearest dark current following the scan. This means the dark currents must have the same reset time and gain as the scan. The interpolation is performed in time and the beginning and end of the interpolation are taken as the last frame of the first dark current and the first frame of the second dark current.
If there is no dark current preceding a scan, the dark current after the scan is subtracted or the mean of all dark current in the spd with the same reset and gain as the scan.
For the PHOTOMETRIC CHECKS only the dark current preceding the measurement is subtracted. No interpolation is done.
The calculated dark current values are also subtracted from the dark current frames themselves.
If there is no valid dark current point in a block, either the next useful dark current is used or the mean value of all dark dark current in the AOT with the same gain and reset.
Each calculated dark current is compared against the value in the calibration file (CAL21_*) and the limits for the dark current therein. If the calculated dark current is outside the defined limits a warning is issued. The calculated dark current is however subtracted.
If no dark current can be found for a specific detector, the data are flagged invalid.
It is (most likely incorrectly) implicitly assumed that the dark current data have not been affected by (or are completely corrected for) detector memory effects.
For each AOT band the wavelength dependent responsivities are normalized with respect to the key wavelength. This is done per detector and stored in the Cal-G files 25_x. The signals that belong to a certain AOT band are then divided by the normalized responsivities for that AOT band.
Additionally, for an AOT 1 the responsivities are smooth by doing a flux conserving interpolation using wavelength dependent factors which determine the range of wavelengths over which the smoothing has to be done. These factors depend both on AOT speed and on the AOT band as well as on wavelength. This factors are stored in Cal-G file 19.
The conversion from signal to flux is carried out by normalizing the signal of the photometric check, where data obtained with the internal stimulator are collected and averaged, by that in the Cal-G file 13 from pre-flight measurements. This value is multiplied by the ratio of flux over signal of an external calibration source. Finally the obtained conversion factors are applied to the data.
In case the data does not contain a valid photometric check (such as e.g. in detector band 1, for which photometric checks were taken out of the AOT logic) the values are taken straight from Cal-G file 13. I.e. the normalized signal of the photometric check is assumed to be one.
The velocity component (V) in the line of sight towards the target, due to the combined motions of the spacecraft and of the earth is corrected for in this module. This then ensures that the AAR wavelength is heliocentric.
All good data (wavelength, fluxes etc.) are transferred to internal arrays. Data for which no wavelength was assigned in Derive-SPD are skipped.
Prior to OLP V6 dark current and photometric check data were transferred into the internal arrays and a therefore present in the AAR. From OLP V6 this is not the case.
The internal table of wavelengths, fluxes etc. is sorted by wavelength using an appropriate sort algorithm.
The table containing wavelength and flux calibrated data is written to a FITS AAR file. For a definition of this file see section 9.4.1.