Home Back
\( \newcommand{\effbw}[1]{\Delta {#1}_{\rm eff}} \newcommand{\var}{{\rm var}} \newcommand{\cov}{{\rm cov}} \newcommand{\df}{{\delta\!f}} \newcommand{\dnu}{{\delta\!\nu}}\newcommand{\Dnu}{{\Delta\!\nu}} \)

Spectral Response Functions in ALMA

General Case and Hanning Smoothing

The autocorrelation signal from where the spectrum of the source is derived is weighted and trimmed by a symmetric window function called a Hann window. We will denote by \(w\) and \(W\) the Hann window function in the lag-autocorrelation domain and its Fourier transform in the frequency domain, respectively. That is \begin{equation} w \leftrightharpoons W\Longleftrightarrow \int_{-\infty}^\infty w(x) e^{-2\pi i x f} dx = W(f)~~.\label{eq-fourier} \end{equation}

Explicitely, the Hann window and its Fourier transform are \begin{equation} {w_T(x)=w(x/T)=\begin{cases} \cos^2\left(\pi x/T\right)&|x/T|\le 1/2\\ 0& \neg \end{cases} }\leftrightharpoons {\frac{T\sin(\pi \xi)}{2\pi \xi(1-\xi^2)}=W(fT)T = W_T(f)}~~,\label{eq-fourier-hann} \end{equation} where \(\xi=f T\). The FWHM of \(W\) is \(2/T\). We will refer to the function on the left (in the lag-autocorrelation domain) as the "Hann-window" and the second (in the frequency-spectral domain) as the "Hann-function." By the convolution theorem, the Hann-window weighting the autocorrelation signal is equivalent to the Hann-function convolving the spectrum of the signal.

We will assume that the astronomical spectral signal consist of a deterministic signal plus white noise, that is, \begin{equation} S = \mathcal{D}+\partial B(\sigma^2)\label{eq-S}~~,\end{equation} where the white noise has the property that, for two square integrable functions \(g\) and \(h\), \begin{equation} {\rm cov}\left(\int_{-\infty}^\infty g(f)\partial B(\sigma^2) (f) df, \int_{-\infty}^\infty h(f)\partial B(\sigma^2) (f) df\right)= \sigma^2\int_{-\infty}^\infty g(f)h(f)df~~.\label{eq-cov} \end{equation} In particular, this means that the signal averaged over a square filter of width \(\Delta f\) has variance \begin{equation} {\rm var}\left(\int_{\Delta f}\left(\frac{1}{\Delta f}\right)S(f)df\right)=\frac{\sigma^2}{\Delta f}~~.\label{eq-var} \end{equation} Since in the following we will be mostly interested in the noise of the signal, we can assume \(\mathcal{D}\equiv 0\).

Refer to the figure below. It represents a section of an spectrum with noisy channels. The value of each channel is given by the convolution of the Hann-function with the true spectrum, represented in gray. Note that the true effective bandwidth of each channel depends on the FWHM of the convolution function, and that this convolution creates some statistical correlation between channels.

illustration
The red curve shows the Hann-function with an FWHM = \(2\Dnu\), where \(\Dnu\) is the channel size. The value of each channel represents the convolution of the true signal (\ref{eq-S}, represented by the noisy gray line in the background) with the Hann-function.

The effective bandwidth

We will define the effective bandwidth of a filter analogously to the width \(\Delta f\) as it appears in the case of a square filter (\ref{eq-var}): \begin{equation} \effbw{f} = \frac{\sigma^2}{\var\left( W_T \star S\right)}~~, \label{eq-effbw} \end{equation} where \(\star\) represents convolution and the integral of the filter function \(W\) is assumed to be 1. Therefore, the effective bandwidth of the Hann-function filter is \begin{equation}\effbw{f} = \frac{\sigma^2}{\sigma^2 T \int^\infty_{-\infty}W(\xi)\star W(\xi)d\xi} = \frac{1}{T\int_{-T/2}^{T/2}\cos(\pi x)^4dx } = \frac{8}{3T}=\frac{4\,{\rm FWHM}}{3}~~. \end{equation} In particular, if the FWHM is two times the channel size, \(\effbw{f}=(8/3)\times\Dnu \approx 2.667 \times\Dnu\).

That is the usual situation in ALMA. The Hanning-function used to filter the spectral signal has a FWHM of two channels, which means that the effective width of each channel is actually \(8/3\) times the channel width. In addition, the default spectral setting includes online averaging of two channels.

Determining the variance and noise properties of the addition of several channels entails knowing the covariance between the signals measured at different frequencies. Note that the Hanning-function extends to infinity, so in principle signals separated by an arbitrary amount are always correlated to some degree. This is not actually the case when the channel size is conmensurate with the FWHM of the Hanning-function, as we will see. The covariance between signals observed at frequencies \(f_1\) and \(f_2\), separated by \(\df\), is given by \begin{equation}\begin{aligned} \cov\left((W_T \star S)(f_1), (W_T \star S)(f_2)\right) &= \cov\left(\int_{-\infty}^\infty T W(T f_1-T f) S(f) df, \int_{-\infty}^\infty T W(T f_2-T f) S(f) df \right) = \sigma^2 T^2 \int_{-\infty}^\infty W(T f_1-T f) W(T f_2-T f)df \\ &= \sigma^2 T \int_{-\infty}^\infty W(-\xi) W(T \df-\xi)d\xi \\ &= \sigma^2 T \int_{-\infty}^\infty W(\xi) W(T \df-\xi)d\xi = \sigma^2 T \, (W\star W)(T\df)~~. \end{aligned}\label{eq-cov-WT} \end{equation} Note that implicitly we already assumed the stationarity of the white noise noise and , consistently, the covariance in the l.h.s. of Equation \eqref{eq-cov-WT} depends only on the difference \(\df=f_2-f_1\). Furthermore, since \(W\) is symmetric, covariance depends only on \(|\df|\).

With the help of the fact that \((W\star W) \leftrightharpoons w^2\), we derive \[ (W\star W)(\xi) = \frac{3 \sin (\pi {\xi})}{2 \pi {\xi} ({\xi}-2) ({\xi}-1) ({\xi}+1) ({\xi}+2)}~~,\] thus \begin{equation} \cov\left((W_T \star S)(f_1), (W_T \star S)(f_2)\right) = \sigma^2 T \frac{3 \sin (\pi {\df T})}{2 \pi {\df T} ({\df T}-2) ({\df T}-1) ({\df T}+1) ({\df T}+2)}~~.\label{eq-covariance} \end{equation} The last equation is general, but we focus on \(\df\) conmensurate with \(T\), particularly, when \(\df = m\Dnu\) and \(\Dnu={\rm FWHM}/2=1/T\). In this case, \begin{equation}\cov\left((W_T \star S)(f+m\Dnu), (W_T \star S)(f)\right) = \frac{\sigma^2}{\Dnu} \begin{cases} 3/8 & m=0\\ 1/4 & |m|=1\\ 1/16 & |m|=2\\ 0 & \neg \end{cases}~~.\label{eq-cov-chan}\end{equation}

Using \eqref{eq-effbw} and \eqref{eq-cov-chan} and , we can calculate the variance of the average signal of \(N\ge2\) adjacent channels \begin{align} \var\left(\frac{1}{N}\sum_{k=0}^{N-1} (W\star S)(k \Dnu)\right) &= \frac{1}{N^2}\left(\var\left((W\star S)(k \Dnu)\right)+\sum_{j,k}^{N-1} \cov\left( (W\star S)(k \Dnu),(W\star S)(j \Dnu)\right)\right) \nonumber\\ &= \frac{1}{N^2}\left(\var\left((W\star S)(k \Dnu)\right)+2\sum_{m=1}^{N-1} m\,\cov\left( (W\star S)(m \Dnu),(W\star S)(0)\right)\right) \nonumber\\ &= \frac{\sigma^2}{N^2\Dnu} \left( N\frac{3}{8} + 2 \left( (N-1)\frac{1}{4}+(N-2)\frac{1}{16} \right)\right) = \frac{\sigma^2}{N^2\Dnu} \left(N-\frac{3}{4}\right)~~.\label{eq-var-Nchan} \end{align} With this equation we can finally derive the effective number of channels associated with the average of \(N\) adjacent channels. The value of each channel comes from a Hanning filtered spectrum with a FWHM of two channels: \begin{equation} { N_{\rm eff}} = \begin{cases} \frac{8}{3} & N=1 \\ \frac{N^2}{N-\frac{3}{4}} & N>1\end{cases}~~.\label{eq-neff-hann} \end{equation} We can confirm the numbers obtained with this formula with those given in this document.

Hanning filtering effective bandwith (Equation \eqref{eq-neff-hann}
12 34567816
2.6673.24.4.923085.882356.857147.848.82759 16.78689

Finally, the effect of online averaging multiplies the number of added channels by the number of channels averaged together; and at the same time divides the effective number of channels by this same number. That is, if the spectra is averaged over a number of channels \(b\), then the effective number of channels associated with the average of \(N\) adjacent binned channels is \begin{equation} \boxed{{ N_{\small \rm eff., Hann}(b)} = \begin{cases} \frac{8}{3} & N,b=1 \\ \frac{N^2b}{Nb-\frac{3}{4}} & b>1\end{cases}~~.} \end{equation} ALMA observations usually use \(b=2\), so the effective bandwith of a single channel is 1.6 times the channel size.

The effective spectral resolution and width of the spectral profile

As noted above, the channel size \(\Dnu\) defines the granularity of our sampling of the signal. It is not necessarily related with the FWHM of the Hanning function, but the calculation of effective bandwidths are greatly simplified with our choice of \(2\Dnu=\)FWHM. If we were to choose a much narrower \(\Dnu\), then the nice correlation properties between the channels would hold no more, but we may be able to sample the Hannig function more finely. Let as assume for a moment that we sample the signal with very small channels. Furthermore, we will explore the spectral response of our system not to noise this time, but to an infinitely narrow spectral signal. That is, we will ignore this time the white noise in Equation \eqref{eq-S} and assume that \(\mathcal{D}=F\delta(\nu-\nu_0)\).

The response of our system would show a Hann filter centered at \(\nu_0\). This implies that, in this setup, distinguishing infinitely narrow lines separated by less than the HWHM (FWHM/2) of the Hanning function becomes more difficult In this sense, the spectral resolution of our system is determined by the FWHM of the Hanning function and therefore, by convention, we may call the FWHM the resolution width.

What is the effect of the online averaging on the resolution width? Let us assume that our observed signal \(S\) comes from the average of \(N\) centered samplings separated by \(\Dnu\), \(\Dnu=\)FWHM/2, that is, \begin{equation} S_{\rm obs}(f)=\frac{1}{N}\sum_{k=1}^N W_T(f-f_k)\star S(f) = \frac{1}{N}\sum_{k=1}^N \delta(f-f_k)\star (W_T\star S)(f) = \frac{1}{N}\sum_{k=1}^N W_T(f)\star S(f-f_k) ~~,\label{eq-Ssum} \end{equation} and \(f_k=\Dnu\left(k-\frac{(N+1)}{2}\right)\). Then, \begin{equation} \begin{aligned} S_{\rm obs}(f)&=\left(\frac{1}{N}\sum_{k=1}^N W_T(f-f_k)\right)\star S(f)\\ &={W_{N,T}(f)}\star S(f) \end{aligned}~~\label{eq-Sk} \end{equation} and the effect of online averaging is replacing the Hanning function by \(W_{N,T}\). In the following plot we show some of these functions.

illustration
The equivalent filter functions \(W_{N,T}\) corresponding to a sum of equi-spaced Hann functions.

The resolution bandwidth of the \(W_{N,T}\) filters are their respective "FWHMs". By convention, we take the full-width not at half of the maximum of the function, but at half the central value of the filter. These widths are

Averaged Hanning filter \(W_{N,T}\) resolution bandwidths
\(N=\)12 34567816
22.312052.989263.969524.997646.012066.999137.9960115.9995
Again, the values at \(N\) equals powers of 2 can be confirmed here. As far as I know, there are no simple formulas for these numbers.

Uniform and Welch Filters

Uniform

illustration
The red curve shows the Uniform function, which is a sinc function. The value of each channel represents the convolution of the true signal with this filter.

The Uniform window has the value of 1 within \(\pm1/2\) and is zero otherwise. The covariance function is the sinc function, that is, \begin{equation}\begin{aligned} \cov\left(({\rm \small Uniform}_T \star S)(f_1), ({\rm \small Uniform}_T \star S)(f_2)\right) &= \frac{\sin(\df T)}{\df T}\\ &= \begin{cases} 1 & m=0\\ 0 & \neg \end{cases}~~,\label{eq-covariance-Uni} \end{aligned}\end{equation} where the last equality is valid when \(\df T = m\). Therefore, the effective number of channels associated with the average of \(N\) adjacent channels is \(N\) as well, or \begin{equation} \boxed{N_{\rm \small eff., Uniform}(b) = N}~~. \end{equation} Channels are uncorrelated in the sense of zero covariance, so there is no effect of the online averaging either.

Welch

illustration
The red curve shows the Welch function. The value of each channel represents the convolution of the true signal with this filter.

The Welch window (\({\rm welsh(x)}\)) in the lag/autocorrelation domain consist of a parabolic response between the ends of the window limit. Note that the Welch function (\({\rm Welsh}(f)\leftrightharpoons{\rm welsh}(x)\))is narrower than the corresponding Hann function, when both associated windows have the same support. The covariance between the function responses \eqref{eq-covariance} is \begin{equation} \cov\left(({\rm Welch}_T \star S)(f_1), ({\rm Welsh}_T \star S)(f_2)\right) = -8 \frac{ \left(\left(\pi ^2 (\df T)^2-3\right) \sin (\pi (\df T))+3 \pi {\df T} \cos (\pi {\df T})\right)}{\pi ^5 (\df T)^5}~~.\label{eq-covariance-Welsh} \end{equation} We focus on \(\df\) conmensurate with \(T\), particularly, when \(\df = m\Dnu\): \[\cov\left(({\rm Welch}_T \star S)(f), ({\rm Welsh}_T \star S)(f+m\Dnu)\right) =\begin{cases} \frac{8}{15} & m=0\\ -24\frac{(-1)^m}{\pi^4 m^4} & \neg\\ \end{cases}~~.\] In this case, however, the FWHM of the Welsh function is not conmensurate with the channel size.

Note that in the previous expression, in contrast with other filters, the covariance between adjacent channels is never zero. This means that the effective bandwidth of \(N\) channels will require the sum of \(N\) terms for exact calculation. Including the effect of online averaging, we have \begin{equation} \boxed{N_{\small \rm eff., Welch}(b) = \begin{cases} \frac{15}{8} & N,b=1\\ N^2b\left(Nb\frac{8}{15}-\frac{48}{\pi^4}\sum_{m=1}^{Nb}(Nb-m)\frac{(-1)^m}{m^4}\right)^{-1} & \neg\end{cases}}~~.\label{eq-neffb-welch} \end{equation}

The effective bandwith factors for Welch filtering obtained using Equation \eqref{eq-neffb-welch} are in the Table below. Boldface numbers can be directly compared with the table on this document.

Welch filtering effective bandwith (Equation \eqref{eq-neffb-welch}, \(b=1\))
12 34567816
1.8752.565033.522874.499285.487776.479687.474418.4703416.4569