fgbuster.cosmology¶
Forecasting toolbox
Functions
|
Run XForcast (Stompor et al, 2016) using the provided instrumental specifications and input foregrounds maps. |
-
fgbuster.cosmology.
xForecast
(components, instrument, d_fgs, lmin, lmax, Alens=1.0, r=0.001, make_figure=False, **minimize_kwargs)[source]¶ Run XForcast (Stompor et al, 2016) using the provided instrumental specifications and input foregrounds maps. If the foreground maps match the components provided (constant spectral indices are assumed), it reduces to CMB4cast (Errard et al, 2011). Currently, only polarization is considered fot component separation and only the BB power spectrum for cosmological analysis.
- Parameters
components (list) – Components of the mixing matrix
instrument –
Object that provides the following as a key or an attribute.
frequency
depth_p (optional, frequencies are inverse-noise weighted according to these noise levels)
fwhm (optional)
They can be anything that is convertible to a float numpy array.
d_fgs (ndarray) – The foreground maps. No CMB. Shape (n_freq, n_stokes, n_pix). If some pixels have to be masked, set them to zero. Since (cross-)spectra of the maps will be computed, you might want to apodize your mask (use the same apodization for all the frequency).
lmin (int) – minimum multipole entering the likelihood computation
lmax (int) – maximum multipole entering the likelihood computation
Alens (float) – Amplitude of the lensing B-modes entering the likelihood on r
r (float) – tensor-to-scalar ratio assumed in the likelihood on r
minimize_kwargs (dict) – Keyword arguments to be passed to scipy.optimize.minimize during the fitting of the spectral parameters. A good choice for most cases is minimize_kwargs = {‘tol’: 1, options: {‘disp’: True}}. tol depends on both the solver and your signal to noise: it should ensure that the difference between the best fit -logL and and the minimum is well less then 1, without exagereting (a difference of 1e-4 is useless). disp also triggers a verbose callback that monitors the convergence.
- Returns
xFres – xForecast result. It includes
the fitted spectral parameters
noise-averaged post-component separation CMB power spectrum
noise spectrum
statistical residuals spectrum
systematic residuals spectrum
noise-averaged cosmological likelihood
- Return type
dict