# Best SNR

I feel like the discussion of the maximum of SNR (signal-to-noise ratio) will benefit my thesis, because my boring mathematical derivation can easily occupy some space to lengthen the number of pages.

To make things easy, I assume that the signal of the observed target can be described by a Gaussian distribution, namely,

$I(\rho) = I_{0} \exp \left(-\frac{\rho^2}{2 \sigma^2} \right)$,

where $I_{0}$ is some referenced intensity, $\rho$ is the radius to the centre of the source, and $\sigma$ describes its FWHM. The integrated intensity of the source within an aperture $r$ is then calculated from

$F(\rho) = \int_{0}^{\rho} 2 \pi r I(r) \mathrm{d}r$.

After doing some simple algebra the result is simply

$F(\rho) = 2\pi \sigma^2 I_{0} \left[1 - \exp \left(-\frac{\rho^2}{2\sigma^2} \right) \right]$.

The SNR of the source is given by the following equation:

$\mathrm{SNR} = \frac{F}{\sqrt{F + \pi \rho^2 f}}$.

For simplicity, we assume the sky background remains constant across the targeted signal source, so $f$ can be regarded as a combination constant value related to the sky background intensity and the readout noise of the CCD. To obtain the maximum SNR, we ought to find out when $\mathrm{d~SNR} / \mathrm{d} \rho = 0$, which can be transformed to

$F' F + 2 f \pi \rho^2 F' - 2 f \pi \rho F = 0$,

where $F' = 2 \pi \rho I_{0} \exp \left(-\frac{\rho^2}{2 \sigma^2} \right)$.

With some algebra, this equation can be changed to

$\left(k e^{-u} - 1 \right) \left(1 - e^{-u} \right) + 2u e^{-u} = 0$,

where $k = I_0 / f$, and $u = r^2 / 2\sigma^2$. Unfortunately, this is a transcendental equation so I cannot find out its solution analytically. Instead, let me use the numerical method.

Assuming the targeted source is very faint, which means that $k \to 0$, I obtain $\rho \approx 1.6 \sigma$. Conversely, if the source is extremely bright, i.e., $k \to \infty$, then we have $\rho \approx \sqrt{2 \ln k} \sigma$.

Anyway, the best-SNR radius as a function of $k$ is plotted in the following figure. Note that I have converted the radius in FWHM by using $\mathrm{FWHM} = \sqrt{2 \ln 2} \sigma \approx 2.355 \sigma$.

In conclusion, using $\rho \approx 1$ FWHM looks to be a good choice.