calculate_correlation_function¶
-
randomfield.lensing.calculate_correlation_function(Delta2, ell, theta, order=0)[source] [edit on github]¶ Transform a function of ell into a function of angular separation.
The transform is defined as:
\[\xi(\Delta\theta) = (-1)^{\nu/2} \int_{\ell_{min}}^{\ell_{max}} \Delta^2(\ell) J_\nu(\ell \Delta\theta) \frac{d\ell}{\ell}\]where the order \(\nu\) should be 0 and 4 for the shear-shear correlations \(\xi_+\) and \(\xi_-\), respectively, and 2 for the shear-galaxy correlation \(\xi_{Eg}\).
The result is only approximate since the integral above is truncated at the limits \(\ell_{min}\) and \(\ell_{max}\) corresponding to
ell[0]andell[-1], respectively. The resulting finite integral is estimated usingSimpson's rule(in \(\log\ell\)) and a finer grid inellwill generally yield more accurate results.Parameters: Delta2 : numpy.ndarray
3D array of cross power spectra \(\Delta^2(z_1,z_2,\ell)\).
ell : numpy.ndarray
1D array of 2D wavenumbers \(\ell\) where the input cross power spectra are tabulated.
dtheta : numpy.ndarray
1D array of 2D angular separations \(\Delta\theta\) where the output cross correlations should be tabulated.
order : int
Order \(\nu\) of the Bessel function \(J_{\nu}\) to use for the transform. Must be 0, 2, or 4.
Returns: numpy.ndarray
Array of cross correlations \(\xi(z_1,z_2,\Delta\theta)\). The result is only calculated for \(z_1 \ge z_2\). If order equals 0 or 4, the result is symmetrized. Otherwise, values for \(z_1 < z_2\) are returned as zero.