lib.survey_selection.window_convolution.CorrelationWindowMatrix

class lib.survey_selection.window_convolution.CorrelationWindowMatrix(window=None, sum_wa=True, default_zero=False)

Bases: lib.survey_selection.base.BaseRegularMatrix

Class computing matrix for window product in configuration space.

projmatrix

Array of shape (len(self.projsout),len(self.projsin),len(self.x)) to convert input array from one basis to another (e.g. multipoles to wedges).

Type

array

Initialize CorrelationWindowMatrix.

Parameters
  • window (WindowFunction) – Window function to multiply correlation function with.

  • sum_wa (bool, default=True) – Whether to perform summation over wide-angle orders. Always set to True except for debugging purposes.

  • default_zero (bool, default=False) – If a given projection is not provided in window function, set to 0. Else an IndexError is raised.

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

logger

matrix

Return 2D array of shape (len(self.projsout)*len(self.x),len(self.projsin)*len(self.x)) corresponding to projmatrix.

mpiattrs

MPI attributes

mpicomm

mpiroot

mpistate

regularin

regularout

s

x-coordinates are s-separations.

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.

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 matrix

Return 2D array of shape (len(self.projsout)*len(self.x),len(self.projsin)*len(self.x)) corresponding to projmatrix.

property mpiattrs

MPI attributes

propose_out(projsin)

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

property s

x-coordinates are s-separations.

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

Set up transform, i.e. compute matrix:

\[W_{\ell,\ell^{\prime}}^{(n,n^{\prime})}(s) = \delta_{n n^{\prime}} \sum_{L} C_{\ell \ell^{\prime} L} Q_{L}^{(n)}(s)\]

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\) (always the case except for debugging purposes).

Parameters
property xin

Input x-coordinates.

property xout

Output x-coordinates.