IRAM Memo 2009-4 Averaging spectra with CLASS

# IRAM Memo 2009-4
Averaging spectra with CLASS

S. Bardeau, J. Pety
1. IRAM (Grenoble)
2. LERMA, Observatoire de Paris

April, 11th 2011
Version 1.1

### Abstract:

CLASS90 (hereafter CLASS) provides a set of commands capable to average two or more spectra. They provide many averaging modes, presented hereafter in this document. The different modes often imply to perform internally and silently some important computations, namely resampling and weighted average. Combining these operations at the same time may imply some non-trivial effects described here.

On October 2008, it appeared that some particular combinations of the tunable modes were not behaving as expected (either in CLASS90 and in CLASS77). A complete cleaning and factorization of the algorithm was performed, associated to exhaustive tests of all combinations. A test suite was also provided to check the output of each commands and modes.

Following this maintenance of the code, and the use of these capabilities to concatenate the new EMIR1 spectra, it was decided to write this document in order to keep a trace of all the methods applied. This was also the occasion to investigate deeply in the code and to examine the effects which can occur during all the possible processings.

Keywords: AVERAGE, ACCUMULATE, resampling, weighting, concatenation

Related documents: IRAM memo 2005-1: CLASS evolution: I. Improved OTF support

- Contents
- CLASS commands
  - Main commands
    - ACCUMULATE
    - AVERAGE
  - Tuning of the addition
    - Alignment
    - Weighting type
    - Bad channels
    - Position matching
    - Calibration matching
- Status of the CLASS releases
  - Bug fixes
    - Dec08
    - Jul09
  - Test suites
- Algorithm
  - Setting the weights
  - Definition of the output spectrum
  - Aligned spectra
  - Non-aligned spectra
    - Resampling
    - Channel weight of a resampled spectrum
    - Output spectrum
  - Data not available / bad channels
  - Controls
  - Output parameters
    - GENERAL section
    - SPECTROSCOPIC section
    - BASE section
    - HISTORY section
  - Concatenation
- Discussion
- Conclusion
- About this document ...