Fixing the AVERAGE output system temperature
Keywords: class-weighting

Next: Consequences Up: class-weighting Previous: Fixing folded frequency switching Contents

# Fixing the `AVERAGE` output system temperature

The commands `AVERAGE`, `ACCUMULATE`, and `STITCH` combine the spectra available in the current index according to their relative weights, and produce a single output spectrum with a proper description in terms of observing time, resolution, and system temperature.

Assuming the simplest case of a set of spectra with identical observing time, resolution, and system temperature, the output spectrum has a resolution identical to the input one, and an observing time which is the sum of all the inputs one. The output system temperature is then derived by reverting the theoritical time weight formula

| (3)

| (4)

When averaging folded fsw with `TIME` weighting, this gives:

| (5)

If we reverse the generic formula, this gives an unexpected change of system temperature:

| (6)

In other words, when the factor 2 was introduced in 2019, it was not added symetrically in the reverse operation done by `AVERAGE`. The result was that when all the averaged spectra were folded fsw, the output Tsys was underestimated by a factor . As of 24-feb-2021 and release mar21, this is fixed now:

| (7)

This reverse function is used when mixing folded fsw spectra only. When mixing psw or wsw spectra only, the generic function is used. Finally, when mixing folded fsw with psw or wsw, the output Tsys is more complicated to evaluate, as there is no unique weight formula to revert. The chosen solution is to use also the generic function, leading to an approximate evaluation of the output system temperature. In this latter case, we also introduce a mix switching mode (reflecting the combination of spectra observed in different modes), and the associated section in the spectrum header is emptied except for this code.

For example, when mixing a one psw or wsw spectrum with one fsw spectrum of same system temperature, integration time, and frequency resolution, this gives:

|  |  | (8)
|  |  | (9)
|  |  | (10)

with (sum of input integration times). Since , this yields:

| (11)

We see that the resulting system temperature is underestimated because the reverse weight formula is not ideal in the mixed case.

Next: Consequences Up: class-weighting Previous: Fixing folded frequency switching Contents