Keywords: class

Next: Analyzing profiles Up: Spectra Line Processing Previous: Folding Frequency Switched Spectra Contents Index

## Adding Spectra

Four parameters define the way spectra are added. These are the align mode, the combination mode, the integration weighting, and the behaviour with respect to bad channels.

Four alignment modes are available, by the means of the command `SET ALIGN` `Mode`:

- `CHANNEL` in which spectra are added channel by channel. This is only useful when the spectra have been obtained in strictly identic conditions. Warning messages are given when this is not the case.
- `VELOCITY` in which the velocity scale is used to align the spectra. This enables you to add spectra of different origin. An interpolation is performed if needed. If individual spectra have differing spectral resolutions, the lowest spectral resolution is used for the result.
- `FREQUENCY` in which the rest frequency is used to align the spectra.
- `POSITION`, in which continuum drifts are aligned regarding to the position along the drift.

`CHANNEL, VELOCITY` and `FREQUENCY` are relevant for Line observations, while `POSITION` is relevant only for Continuum observations. Two combination modes are possible with the command `SET ALIGN MODE Combination`:

- `INTERSECT` where only the intersection of individual spectra is kept.
- `COMPOSITE` where the reunion of the individual spectra is kept (as in a spectral scan for example).

Three weighting types may be used, with the command `SET WEIGHT` `Type`:

- `TIME` for weights proportional to the observing time, divided by the square of the system noise.
- `SIGMA` for weighting by the inverse square of the rms noise of each individual spectrum.
- `NONE or EQUAL` for equal weighting. Caution: equal weighting behaves differently in `AVERAGE` and `ACCUMULATE` commands. `AVERAGE` produces the average of spectra, while `ACCUMULATE` gives the sum of the two spectra. After division by the number of added spectra, `ACCUMULATE` will thus give the same result as `AVERAGE`.

Bad channels are dealt with in two possible ways, defined by the command `SET BAD Mode`:

- `OR` where resulting channels are declared bad if they were declared as such in at least one of the individual spectra.
- `AND` where resulting channels are declared bad if they were bad in all individual spectra.

Default values are `ALIGN CHANNEL INTERSECT`, `WEIGHT TIME`, and `BAD OR`.

Two other parameters control whether summing spectra is allowed or not. Positions are checked according to `SET MATCH` `Tolerance` or `SET NOMATCH`. If (absolute) positions differ by more than the tolerance parameter, an error message is generated. The tolerance is specified in current angle units. The homogeneity of the calibration is checked according to the `SET CALIBRATION` `Beam_Tolerance Gain_Tolerance` or `SET CALIBRATION OFF` commands. Beam_Tolerance is the maximum difference allowed in the beam efficiencies to add spectra (default 0.02) and Gain_Tolerance the maximum difference between the gains in the image band (default 0, which means not checked).

There are two ways of adding spectra: the commands `AVERAGE` and `ACCUMULATE`. `AVERAGE` operates globally on all the spectra in the index, while `ACCUMULATE` adds the `R` and `T` buffers into `R`. `AVERAGE` is generally better for systematic methods, `ACCUMULATE` for special cases. The drawback of `ACCUMULATE` is in the need for initialization; one needs a spectrum in `T` and a spectrum in `R` to begin with...

Next: Analyzing profiles Up: Spectra Line Processing Previous: Folding Frequency Switched Spectra Contents Index