Spherical couplings (couplings
)¶
Compute spherical Fourier couplings coefficients for given survey spefications and cosmological models.
Warning issued for poorly determined spherical coefficient. |
|
|
Angular, radial and RSD coupling coefficients computed for given survey and cosmological specifications. |
Kernels¶
Coupling kernels are integrands without the coordinate Jacobian, which may include the following factors:
angular mask \(M(\hat{\mathbf{r}})\);
radial selection \(\phi(r)\);
radial weight \(w(r)\) and its derivative \(w'(r)\);
clustering evolution, \(D(z)\), which is the linear growth factor normalised to unity at the \(z = 0\) epoch;
linear bias + clustering evolution \(G(z, k) = b(z, k) D(z) / b(z_*, k) D(z_*)\) normalised to unity at a fiducial epoch \(z_*\), where \(b(z, k)\) is the scale-dependent linear bias;
linear growth rate + clustering evolution \(F(z) = f(z) D(z) / f(z_*) D(z_*)\) normalised to unity at a fiducial epoch \(z_*\), where \(f(z)\) is the linear growth rate;
differential Alcock–Paczynski (AP) distortion
\[\gamma(z) = \frac{ \operatorname{d}\!\breve{\chi}(z) }{ \operatorname{d}\!\chi(z) } \,,\]where \(\breve{r} = \breve{\chi}(z)\) is the distance converted from redshift in a fiducial cosmology rather than from the true comoving distance–redshift correspondence \(z = \chi^{-1}(r)\).
Couplings¶
Coupling coefficients are computed by integrating the angular, radial and RSD coupling kernels
over the spherical volume element, where \(k_{\ell n}\) is the discrete wavenumber.
When there is no angular masking (i.e. \(M(\hat{\mathbf{r}})\) is constant), the coupling coefficients reduce to \(M_{\mu\nu} = \delta_{\mu\nu}\); if in addition radial selection, weighting and evolutionary effects are all absent and there is no AP correction, then \(M_{\mu\nu} \Phi_{\mu\nu} = \delta_{\mu\nu}\).
- exception harmonia.reader.couplings.SphericalCoefficientWarning[source]¶
Warning issued for poorly determined spherical coefficient.
- class harmonia.reader.couplings.Couplings(disc, survey_specs=None, cosmo_specs=None, initialise=True, external_angular_couplings=None, pixelate=None, comm=None)[source]¶
Angular, radial and RSD coupling coefficients computed for given survey and cosmological specifications.
Notes
Survey specification functions must be given in spherical coordinates and may include the following:
‘mask’ for angular mask;
‘selection’, ‘weight’ and ‘weight_derivative’ for radial selection, weighting and weight derivative.
Cosmological specification functions must be given in redshift and/or the radial coordinate and may include the following:
‘z_from_r’ and ‘chi_of_z’ for cosmological comoving distance-to-redshift conversion and fiducial redshift-to-comoving distance conversion;
‘bias_evolution’, ‘growth_evolution’ for linear bias and linear growth rate, normalised to unity at a fiducial epoch;
‘clustering_evolution’ for clustering evolution as a function of the redshift normalised to unity at the current epoch;
‘differential_AP_distortion’ for differential AP distortion as a function of the redshift.
- Parameters:
disc (
DiscreteSpectrum
) – Discrete spectrum associated with the couplings.survey_specs (dict{str: callable or None} or None, optional) – Survey specification functions as detailed above.
cosmo_specs (dict{str: callable or None} or None, optional) – Cosmological specification functions as detailed above.
initialise (bool, optional) – If True, compile all coupling coefficients upon creation.
external_angular_couplings (dict{tuple(tuple, tuple): complex} or None, optional) – Pre-compute angular couplings (default is None).
pixelate (int or None, optional) – If not None (default), this sets the ‘NSIDE’ parameter of healpy pixelation for angular coupling integration.
comm (
mpi4py.MPI.Comm
or None, optional) – MPI communicator (default is None).
- Variables:
disc (
DiscreteSpectrum
) – Discrete spectrum associated with the couplings.couplings (dict{str: dict}) – Directory for all coupling coefficients of different coupling types.
- __getitem__(key)[source]¶
Access coupling coefficient by key.
Notes
Only accessible if initialised with
compile_couplings()
. The access key is a tuple specifying the coupling type and the pair of triplet/double indices, e.g.['angular', (0, 0), (3, -1, 1)]
for \(M_{0,0,3,-1}\).- Parameters:
key (tuple) – Coefficient access key. Must contain elements of types specified above.
- Returns:
Coupling coefficient.
- Return type:
- Raises:
AttributeError – If the coupling coefficients have not been initialised.
- load_angular_couplings(angular_couplings)[source]¶
Load pre-computed angular coupling coefficients which are independent of the cosmological model.
- Parameters:
angular_couplings (dict{tuple(tuple, tuple): complex}) – Pre-compute angular couplings.
- Raises:
ValueError – If the number of entries in angular_couplings do not match the class instance.
- compile_couplings(pixelate=None)[source]¶
Compile all coupling coefficients.
- Parameters:
pixelate (int or None, optional) – If not None (default), this sets the ‘NSIDE’ parameter of healpy pixelation for angular coupling integration.
- compute_coefficient(mu, nu, coupling_type, pixelate=None)[source]¶
Compute coupling coefficients for given triplet indices.
- Parameters:
mu, nu (tuple(int, int) or tuple(int, int, int)) – Coefficient triplet or reduced doublet index.
coupling_type ({‘angular’, ‘radial’, ‘RSD’}) – Coupling type.
pixelate (int or None, optional) – If not None (default), this sets the ‘NSIDE’ parameter of healpy pixelation for computing angular coupling coefficients.
- Returns:
cofficient – Coupling coefficient of the specified type.
- Return type:
float or complex
numpy.ndarray
- save(output_file)[source]¶
Save compiled couplings as a .npz file.
- Parameters:
output_file (str or
pathlib.Path
) – Output file path.
- classmethod load(input_file, comm=None)[source]¶
Load compiled couplings from a .npz file.
- Parameters:
input_file (str or
pathlib.Path
) – Input file path.