import healpy as hp
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
import astropy.units as u
In this series of notebooks, we will understand how to handle white noise in the case of an experiment with sky observations which are both not-uniform and have partial sky coverage.
Let’s first start assuming a sensitivity of an experiment array of detectors of \(10 \mu K \sqrt(s)\).
# Number based on Simons Observatory SAT UHF1 array of detectors
= 10. * u.Unit("uK * sqrt(s)") net
5 years with a efficiency of 20%:
= 5 * u.year * .2 integration_time_total
Uniform full sky survey
As a reference, let’s first start with the trivial case of uniform full sky coverage, i.e. we spend the same amount of observation time in each pixel.
= 512
nside = hp.nside2npix(nside) npix
= (net / np.sqrt(integration_time_total/npix)).decompose() standard_deviation_per_pixel
standard_deviation_per_pixel
\(3.1572473 \times 10^{-6} \; \mathrm{K}\)
= np.random.normal(scale = standard_deviation_per_pixel.value, size=npix) * standard_deviation_per_pixel.unit m
= m.to(u.uK) m
=m.unit, title="White noise map") hp.mollview(m, unit
Power spectrum
Finally we can compute the angular power spectrum with anafast
, i.e. the power as a function of the angular scales, from low \(\ell\) values for large angular scales, to high \(\ell\) values for small angular scales.
At low \(\ell\) there is not much statistics and the power spectrum is biased, but if we exclude lower ells, we can have an estimate of the white noise \(C_\ell\) coefficients. We can then compare with the theoretical power computed as:
\[ C_\ell = \Omega_{pix}\sigma^2 \]
Where: \(\Omega_{pix}\) is the pixel are in square-radians and \(\sigma^2\) is the white noise variance.
= hp.anafast(m) cl
100:].mean() cl[
3.9283892627207396e-05
m.std()
\(3.1567443 \; \mathrm{\mu K}\)
= hp.nside2pixarea(nside) pixel_area
= (standard_deviation_per_pixel**2 * pixel_area).to(u.uK**2) white_noise_cl
white_noise_cl
\(3.9820426 \times 10^{-5} \; \mathrm{\mu K^{2}}\)
=(6,4))
plt.figure(figsize="Map power spectrum", alpha=.7)
plt.loglog(cl, label0, len(cl), label="White noise level")
plt.hlines(white_noise_cl.value, "Fullsky white noise spectrum")
plt.title("$\ell$")
plt.xlabel("$C_\ell [\mu K ^ 2]$"); plt.ylabel(