# Fixing folded frequency switching weight

Looking closer to frequency switching, the folding operation folds a spectrum on itself to shift and average the two phases into a single line. This operation decreases the noise level by a factor at the frequency of the line. Moreover, when doing this, CLASS keeps constant key observing parameters like the observing time to remain consistent with the actual observing run at the telescope. From Eq. 1, this means that an unfolded frequency switching spectrum and its folded version wrongly had the same theoretical noises (and, thus, the same TIME weights), while they correctly had different measured noise (and different SIGMA weights).

This inconsistency between unfolded fsw and folded fsw spectra was in general OK, as CLASS commands refuse to combine these two kinds of spectra. However, it is possible to combine (average, sum, ...) folded fsw spectra with psw and wsw. As the theoretical folded fsw noise does not reflect the actual noise, the relative TIME weights were incorrect and the spectra from different switching modes were not combined properly.

This problem was fixed on Sep. 17th, 2019, and the patch was first included in the oct19 GILDAS release. Starting from that date, folded frequency switching spectra were given an additional factor 2 to their TIME weight:

(2)
This has no effect when mixing folded fsw spectra altogether (as all the relative weights include the same extra factor), but this fixes the combination of folded fsw with other allowed switching modes.