lib.survey_selection.wide_angle.PowerOddWideAngle

class lib.survey_selection.wide_angle.PowerOddWideAngle(d=1.0, wa_orders=1, los='firstpoint', sum_wa=True)

Bases: lib.survey_selection.base.BaseRegularMatrix

Class computing matrix for wide-angle expansion. Adapted from https://github.com/fbeutler/pk_tools/blob/master/wide_angle_tools.py

Initialize PowerOddWideAngle.

Parameters
  • d (float, default=1) – Distance at the effective redshift. Use \(1\) if already included in window functions.

  • wa_orders (int, list) – Wide-angle expansion orders. So far only order 1 is supported.

  • los (string) –

    Choice of line-of-sight, either:

    • ’firstpoint’: the separation vector starts at the end of the line-of-sight

    • ’endpoint’: the separation vector ends at the end of the line-of-sight.

  • sum_wa (bool, default=True) – Whether to perform summation over wide-angle orders. Must be False if coupling to the window function is to be accounted for.

Methods

compute

Apply transform to input array.

copy

Return shallow copy of self.

deepcopy

from_state

Instantiate and initalize class with state dictionary.

is_mpi_broadcast

is_mpi_gathered

is_mpi_root

is_mpi_scattered

load

Load class in numpy binary format from disk.

load_auto

If different formats are possible, this method should between them based on file name extension.

log_critical

log_debug

log_error

log_info

log_warning

propose_out

Propose input and output projection names given proposed input projection names projsin.

save

Save class to disk.

save_auto

If different formats are possible, this method should between them based on file name extension.

setup

Set up transform, i.e. compute matrix:.

Attributes

basis

k

x-coordinates are k-wavenumbers.

logger

mpiattrs

MPI attributes

mpicomm

mpiroot

mpistate

regularin

regularout

xin

Input x-coordinates.

xout

Output x-coordinates.

compute(array)

Apply transform to input array.

copy()

Return shallow copy of self.

classmethod from_state(state, mpiroot=0, mpicomm=None)

Instantiate and initalize class with state dictionary.

property k

x-coordinates are k-wavenumbers.

classmethod load(filename, mpiroot=0, mpicomm=None)

Load class in numpy binary format from disk. If the loaded state contains __class__ and that exists in cls._registry, return instance of cls._registry[__class__] (instead of cls).

load_auto(*args, **kwargs)

If different formats are possible, this method should between them based on file name extension.

property mpiattrs

MPI attributes

propose_out(projsin)

Propose input and output projection names given proposed input projection names projsin.

save(filename)

Save class to disk.

save_auto(*args, **kwargs)

If different formats are possible, this method should between them based on file name extension.

setup(k, projsin, projsout=None)

Set up transform, i.e. compute matrix:

\[M_{\ell\ell^{\prime}}^{(n,n^{\prime})}(k) = \frac{\ell \left(\ell - 1\right)}{2 \ell \left(2 \ell - 1\right) d} \delta_{\ell,\ell - 1} \delta_{n^{\prime},0} \left[ - \frac{\ell - 1}{k} + \partial_{k} \right] - \frac{\left(\ell + 1\right) \left(\ell + 2\right)}{2 \ell \left(2 \ell + 3\right) d} \delta_{\ell,\ell + 1} \delta_{n^{\prime},0} \left[ \frac{\ell + 2}{k} + k \partial_{k} \right]\]

if \(\ell\) is odd and \(n = 1\), else:

\[M_{\ell\ell^{\prime}}^{(0,n^{\prime})}(k) = \delta_{\ell,ell^{\prime}} \delta_{n^{\prime},0}\]

with \(\ell\) multipole order corresponding to projout.proj and \(\ell^{\prime}\) to projin.proj, \(n\) wide angle order corresponding to projout.wa_order and \(n^{\prime}\) to projin.wa_order. If sum_wa is True, or output projout.wa_order is None, sum over \(n\) (only if no window convolution is accounted for). Derivatives \(\partial_{k}\) are computed with finite differences, see arXiv:2106.06324 eq. 3.3.

Parameters
property xin

Input x-coordinates.

property xout

Output x-coordinates.