It is well known that the frequency scales of Acousto-Optical spectrometers tend to be non-linear. To this end, the SPECX frequency calculation stuff contains a facility for correcting the frequency using a polynomial fit to the frequency error. For AOSC, the cubic term dominates, and the maximum error is about 0.6 MHz, but for somewhat complicated reasons, there is an additional zero-order (d.c.) term of some 11 or 12 channels, or about 3 MHz. The implication of this is that a line you might expect to come out in the centre channel (1024.5) of the spectrum will actually emerge some 3 MHz away, and to compensate for this the GSD header files correct the reference-frame observed frequency, F_CEN, appropriately. This makes the display work fine, but has implications for when we want to look at image frequencies (as will be shown in a moment).
To correct the frequency scale for AOSC data in particular, I have written a small macro, FRQFIX.SPX, which is kept in the "standard" command-files directory. It is invoked by the symbol LINEARIZE-AOSC-FREQ:
>> linearize-aosc-freq FRQFIX> Linearization turned off - reset it? (Y/N) [Y] Y OK, setting freq coefficients FRQFIX> Regrid to uniform sampling? (Y/N) [Y] Y -- AOS frequency scale linearization applied -- First and last useful channels in input: 1 2038 Linearization has now been turned off! Reset if another spectrum needs correcting
This macro in fact also removes the 3-MHz offset from F_CEN, instead adding it into the zero-order term of the correction polynomial, which simplifies calculation of the I.F. LINEARIZE also does various checks and tidies up the program flags. If you choose to REGRID the data at this point you transform the data to a truly linear scale (in current units). Otherwise the data will still display correctly, as long as you have the linearization turned on (set fcorrect=true or use SET-X).
If you now want to look at the other sideband of AOSC data, remember that the effective I.F. at the centre of the passband is not what you might think it is, but is actually 1.503 GHz (or 3.943 GHz for RxA1 or RxB2). If on the other hand you apply the LINEARIZE-AOSC macro the data will be regridded onto a linear scale and shifted to the nominal channel. In this case the I.F. is the standard 1.5 or 3.94 GHz. There is one Awful Warning: you cannot apply linearization to data after you have done a CHANGE-SIDE. That flips the spectrometer frequency scale, and so will apply the correction 'the wrong way round'. So after you have done a CHANGE-SIDE, make sure that linearization is turned off, either through SET-X or by typing "fcorrect=false".
I thank Per Friberg, Goeran Sandell and Chris Mayer for their help in untangling this mess, Louis Noreau for pointing out the need for other velocity frames and scaling laws, and Paul Feldman for bringing other infelicities in the velocity and frequency scaling to my attention. The system in SPECX V6.2 has been written from scratch, and so does not have 10 years of testing behind it; please bring any demonstrable faults to my attention. (I do not have Donald Knuth's confidence, and do not offer a steadily increasing reward for each bug found in my code.)
SPECX --- A Millimetre Wave Spectral Reduction Package