snr_per_bin module
Functions for plotting the signal to noise per angular bin.
- snr_per_bin.get_extrap_mat(lmin, lmax_in, l_extrap_to)
Generate the power spectrum extrapolation matrix, which is used to extrapolate the power spectrum to high l to stabilise the Cl-to-CF transform.
This matrix should be (pre-)multiplied by the fiducial power spectrum, then all (pre-)multiplied by the Cl-to-CF transformation matrix, to produce a ‘stabilisation vector’ which can be added to any correlation function vector to stabilise it. Generally the same stabilisation vector should be used for all points in parameter space, to avoid biases. Note that the extrapolation matrix zeros all power below lmax_in, i.e. it does not give a concatenation of the original power spectrum and the extrapolated section, but just solely the extrapolated section.
The extrapolation is linear with an l(l+1) weighting, achieved using a block matrix. See extrapolation_equations.pdf for the derivation of its elements.
- Parameters
lmin (int) – Minimum l in the power spectrum.
lmax_in (int) – Maximum l prior to extrapolation.
l_extrap_to (int) – Maximum l to which to extrapolate.
- Returns
Extrapolation matrix.
- Return type
2D numpy array
- snr_per_bin.plot_cf_nbin(diag_she_cl_path, lmin, lmax, theta_min, theta_max, n_bin_1, n_bin_2, survey_area_sqdeg, gals_per_sqarcmin, sigma_e, l_extrap_to=60000, plot_save_path=None)
Plots signal-to-noise per bin for the full-sky correlation function for two numbers of bins side-by-side, using data produced with
param_grids.load_diagonal_shear_cl.- Parameters
diag_she_cl_path (str) – Path to output of
param_grids.load_diagonal_shear_cl.lmin (int) – Minimum l.
lmax (int) – Maximum l.
theta_min (float) – Minimum theta.
theta_max (float) – Maximum theta.
n_bin_1 (int) – Number of theta bins in the left panel.
n_bin_2 (int) – Number of theta bins in the right panel.
survey_area_sqdeg (float) – Survey area in square degrees.
gals_per_sqarcmin (float) – Average number of galaxies per square arcminute per redshift bin.
sigma_e (float) – Intrinsic ellipticity dispersion per component.
l_extrap_to (int, optional) – The power spectrum is extrapolated to this l prior to the Cl-to-CF transform for stability, using a l(l+1)-weighted linear extrapolation. Default 60000.
plot_save_path (str, optional) – Path to save the plot, if supplied. If not supplied, plot is displayed.
- snr_per_bin.plot_cl_cf(diag_she_cl_path, she_nl_path, lmin, lmax, theta_min, theta_max, n_theta_bin, survey_area_sqdeg, gals_per_sqarcmin, sigma_e, l_extrap_to=60000, plot_save_dir=None)
Produce plots of signal-to-noise per element for both the unbinned power spectrum and the binned correlation function, using data produced with
param_grids.load_diagonal_shear_cl.- Parameters
diag_she_cl_path (str) – Path to output of
param_grids.load_diagonal_shear_cl.she_nl_path (str) – Path to shear noise power spectrum as a text file.
lmin (int) – Minimum l.
lmax (int) – Maximum l.
theta_min (float) – Minimum theta.
theta_max (float) – Maximum theta.
n_theta_bin (int) – Number of theta bins.
survey_area_sqdeg (float) – Survey area in square degrees, used to calculate the noise variance for the correlation function.
gals_per_sqarcmin (float) – Average number of galaxies per square arcminute per redshift bin, used to calculate the noise variance for the correlation function.
sigma_e (float) – Intrinsic ellipticity dispersion per component, used to calculate the noise variance for the correlation function.
l_extrap_to (int, optional) – The power spectrum is extrapolated to this l prior to the Cl-to-CF transform for stability, using a l(l+1)-weighted linear extrapolation. Default 60000.
plot_save_dir (str, optional) – Directory to save the two plots into, if supplied. If not supplied, plots are displayed.