lib.survey_selection.window_convolution.PowerWindowMatrix

class lib.survey_selection.window_convolution.PowerWindowMatrix(window=None, srange=(0.0001, 10000.0), krange=None, ns=16384, q=0, krebin=1, **kwargs)

Bases: lib.survey_selection.base.BaseMatrix

Class computing matrix for window convolution in Fourier space.

Initialize PowerWindowMatrix.

Parameters
  • window (WindowFunction) – Window function to convolve power spectrum with.

  • srange (tuple, default=(1e-4,1e4)) – \(s\)-range for Hankel transforms.

  • krange (tuple, default=None) – If srange not provided, equivalent \(k\)-range (taking \(s = 1/k\)).

  • ns (int, default=1024*16) – Number of log-spaced points for Hankel transforms.

  • q (int, default=0) – Power-law tilt to regularize Hankel transforms.

  • krebin (int, default=1) – Rebin matrix aling input \(k\) by factor krebin.

  • kwargs (dict) – Arguments for CorrelationWindowMatrix.

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.

Attributes

basis

kin

Output x-coordinates are k-wavenumbers.

kout

Input x-coordinates are k-wavenumbers.

logger

mpiattrs

MPI attributes

mpicomm

mpiroot

mpistate

regularin

regularout

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 kin

Output x-coordinates are k-wavenumbers.

property kout

Input 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(kout, projsin, projsout=None)

Set up transform. Provided arXiv:2106.06324 eq. 2.5:

\[W_{\ell\ell^{\prime}}^{(n)}(k) = \frac{2}{\pi} (-i)^{\ell} i^{\ell^{\prime}} \int ds s^{2} j_{\ell}(ks) j_{\ell^{\prime}}(k^{\prime}s) \sum_{L} C_{\ell \ell^{\prime} L} Q_{L}^{(n)}(s)\]

with \(\ell\) corresponding to projout.proj and \(\ell^{\prime}\) to projin.proj, \(k\) to kout and \(k^{\prime}\) to kin. \(n\) is the wide-angle order proj.wa_order. Yet, to avoid bothering with complex values, we only work with the imaginary part of odd power spectra. In addition, we include the \(dk^{\prime} k^{\prime 2}\) volume element (arXiv:2106.06324 eq. 2.7). Hence we actually implement:

\[W_{\ell,\ell^{\prime}}^{(n)}(k) = dk^{\prime} k^{\prime 2} \frac{2}{\pi} (-1)^{\ell} (-1)^{\ell^{\prime}} \int ds s^{2} j_{\ell}(ks) j_{\ell^{\prime}}(k^{\prime}s) \sum_{L} C_{\ell \ell^{\prime} L} Q_{L}^{(n)}(s)\]

Note that we do not include \(k^{-n}\) as this factor is included in wide_angle.PowerOddWideAngle.

Parameters