Perform the folding for frequency switched spectra.
doFold(htp=htp, throw = -60, unit="MHz")
The folded spectra are constructed by averaging the original spectra with a shifted and inverted copy - shifted by the LO throw. This algorithm corresponds to the most simple scheme described in the article "Recovering line profiles from frequency-switched spectra", H.Liszt, Astron. Astrophys. Suppl. Ser. 124, 183-188 (1997). For the input spectra included in the input timeline product a linear frequency scale is assumed. The size of the spectra is reduced by the number of channels corresponding to the LO throw.
The frequency grid of the input spectra should be linear (equidistant).
The original spectra are averaged with a copy which is shifted by the LO frequnecy throw and inverted.
Note that the folding is not perfect in the sense that typically, ghost lines appear to the left and to the right, or the actual lines as absorption lines. This can be annotated with the sequence -,-'-,-.
Some care is needed when interpreting, e.g. USB data containing both USB and LSB spectra: USB emission lines appear as emission lines, and LSB lines appear as "absorption lines". This is explained in some more details in the following:
An emission USB line will show up in the USB as -,-'- if the LO throw is positive (i.e. the reference phase with the line pointing downwards is shifted by the LO throw to the left). Applying the fold to this timeline product (corresponding to the USB) leads to a picture of the form -,-'-,- where a duplicated reference phase occurs to the right of the emission line. In case the LO throw is negative the reference in the input spectra will appear on the right and the duplicated ghost in the folded spectra appears on the left.
An LSB emission line will show up in the USB as -'-,- if the LO throw is positive (here the reference phase with the line pointing downwards is shifted by the LO throw to the right). Applying the fold to this (USB) timeline product leads to a picture of the form -'-,-'- where a duplicated 'emission' line appears to the right.
Below, an example is shown for an emission line in the LSB before (blue) and after (red) the fold-operation. Note that the line appears as emission line on the LSB frequency scale, but as asorption line on the USB frequency scale.
The LO throw parameter can either be passed as parameter
throw, or it is retrieved from the meta data
of the timeline product using the key
loThrow. Note that this information is added to the timeline product
checkFreqGrid task. You can specify the unit of the throw specified in the task using the parameter
unit with typical values
'GHz'. If no unit is specified, the throw specified
in the task signature is assumed to have the same unit as the frequency of the spectra in the timeline product.
True shifts the folded spectra by half the throw in the direction
of the throw.
Algorithms: See Mathematics.
Calibration input: None.
Meta data: None
Spectral segment data: Changes just the frequency scale. No other changes.
Errors and Warnings:
Warning is given and no data processed when no
throw has been specified and no
is found in the meta data of the timeline product.