flip.covariance.lai22.generator#

Functions#

compute_correlation_coefficient_simple_integration(p, ...)

" Here the sigma_u is added to pk later.

compute_correlation_coefficient_hankel(p, q, l, r, k, pk)

Highly decrease time and memory consumption.

compute_cov_vv(ra, dec, comoving_distance, ...[, ...])

coefficient_vv(wavenumber, power_spectrum_tt, coord[, ...])

compute_cov_gg(pmax, qmax, ra, dec, comoving_distance, ...)

compute_cov_gg_add(pmax, qmax, ra, dec, ...[, ...])

coefficient_gg_b2_m(wavenumber_mm, power_spectrum_mm, ...)

coefficient_gg_f2_m(wavenumber_tt, power_spectrum_tt, ...)

coefficient_gg_bf_m(wavenumber_mt, power_spectrum_mt, ...)

compute_cov_gv(pmax, ra_g, dec_g, comoving_distance_g, ...)

coefficient_gv_f2_p(wavenumber_tt, power_spectrum_tt, ...)

coefficient_gv_bf_p(wavenumber_mt, power_spectrum_mt, ...)

return_matrix_covariance(cov)

return_correlation_matrix(cov)

compute_all_matrices(ra_density, dec_density, ...[, ...])

generate_covariance(model_kind, power_spectrum_dict[, ...])

The generate_covariance function generates the covariance matrix for a given model type.

Module Contents#

flip.covariance.lai22.generator.compute_correlation_coefficient_simple_integration(p, q, l, r, k, pk)#

“ Here the sigma_u is added to pk later. The (2*np.pi**2) is added here in the Lai et al. formalism.

flip.covariance.lai22.generator.compute_correlation_coefficient_hankel(p, q, l, r, k, pk, hankel_overhead_coefficient=2)#

Highly decrease time and memory consumption. Cosmoprimo prefactor is removed here When r is too small for the hankel range, standard integration is used. To avoid edge effects when using hankel, the mask have an overhead

flip.covariance.lai22.generator.compute_cov_vv(ra, dec, comoving_distance, wavenumber_tt, power_spectrum_tt, grid_window_v_tt=None, size_batch=10000, number_worker=8, hankel=True, los_definition='bisector')#
flip.covariance.lai22.generator.coefficient_vv(wavenumber, power_spectrum_tt, coord, hankel=True)#
flip.covariance.lai22.generator.compute_cov_gg(pmax, qmax, ra, dec, comoving_distance, wavenumber_mm, wavenumber_mt, wavenumber_tt, power_spectrum_mm, power_spectrum_mt, power_spectrum_tt, grid_window_m_mm=None, grid_window_m_mt=None, grid_window_v_mt=None, grid_window_v_tt=None, size_batch=10000, number_worker=8, sig_damp_mm_gg_m=None, hankel=True, los_definition='bisector')#
flip.covariance.lai22.generator.compute_cov_gg_add(pmax, qmax, ra, dec, comoving_distance, wavenumber_mm, power_spectrum_mm, grid_window_m_mm=None, size_batch=10000, number_worker=8, sig_damp_mm_gg_m=None, hankel=True, los_definition='bisector')#
flip.covariance.lai22.generator.coefficient_gg_b2_m(wavenumber_mm, power_spectrum_mm, iter_pq, sum_iter_pq, m_value, sig_damp_mm_gg_m, coord, hankel=True)#
flip.covariance.lai22.generator.coefficient_gg_f2_m(wavenumber_tt, power_spectrum_tt, iter_pq, sum_iter_pq, m_value, coord, hankel=True)#
flip.covariance.lai22.generator.coefficient_gg_bf_m(wavenumber_mt, power_spectrum_mt, iter_pq, sum_iter_pq, m_value, coord, hankel=True)#
flip.covariance.lai22.generator.compute_cov_gv(pmax, ra_g, dec_g, comoving_distance_g, ra_v, dec_v, comoving_distance_v, wavenumber_mt, wavenumber_tt, power_spectrum_mt, power_spectrum_tt, grid_window_m_mt=None, grid_window_v_mt=None, grid_window_v_tt=None, size_batch=10000, number_worker=8, hankel=True, los_definition='bisector')#
flip.covariance.lai22.generator.coefficient_gv_f2_p(wavenumber_tt, power_spectrum_tt, p, coord, hankel=True)#
flip.covariance.lai22.generator.coefficient_gv_bf_p(wavenumber_mt, power_spectrum_mt, p, coord, hankel=True)#
flip.covariance.lai22.generator.return_matrix_covariance(cov)#
flip.covariance.lai22.generator.return_correlation_matrix(cov)#
flip.covariance.lai22.generator.compute_all_matrices(ra_density, dec_density, rcom_density, ra_vel, dec_vel, rcom_vel, wavenumber_mm, wavenumber_mt, wavenumber_tt, power_spectrum_gg_mm, power_spectrum_gg_mt, power_spectrum_gg_tt, power_spectrum_gv_mt, power_spectrum_gv_tt, power_spectrum_vv_tt, grid_window_m_mm=None, grid_window_m_mt=None, grid_window_v_mt=None, grid_window_v_tt=None, pmax=3, qmax=3, size_batch=10000, number_worker=1, hankel=True)#
flip.covariance.lai22.generator.generate_covariance(model_kind, power_spectrum_dict, coordinates_velocity=None, coordinates_density=None, pmax=3, qmax=3, **kwargs)#

The generate_covariance function generates the covariance matrix for a given model type.

Parameters:
  • model_kind – Determine which covariance matrices are computed

  • power_spectrum_dict – Pass the power spectrum of the density and velocity fields

  • coordinates_velocity – Pass the coordinates of the velocity field

  • coordinates_density – Define the coordinates of the density field

  • pmax – Set the maximum order of legendre polynomials used to compute the covariance matrix

  • qmax – Set the maximum order of legendre polynomials used in the expansion

  • bisector. (Wide angle defined in Lai et al. 2022 by the)

  • **kwargs – Pass keyword arguments to the function

:param : Define the model type

Returns:

A dictionary of covariance matrices, the number of density points and the number of velocity points