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.BaseRegularMatrixClass 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
Trueexcept for debugging purposes.default_zero (bool, default=False) – If a given projection is not provided in window function, set to 0. Else an
IndexErroris raised.
Methods
Apply transform to input array.
Return shallow copy of
self.deepcopyInstantiate and initalize class with state dictionary.
is_mpi_broadcastis_mpi_gatheredis_mpi_rootis_mpi_scatteredLoad class in numpy binary format from disk.
If different formats are possible, this method should between them based on file name extension.
log_criticallog_debuglog_errorlog_infolog_warningPropose input and output projection names given proposed input projection names
projsin.Save class to disk.
If different formats are possible, this method should between them based on file name extension.
Set up transform, i.e. compute matrix:.
Attributes
basisloggerReturn 2D array of shape
(len(self.projsout)*len(self.x),len(self.projsin)*len(self.x))corresponding toprojmatrix.MPI attributes
mpicommmpirootmpistateregularinregularoutx-coordinates are s-separations.
Input x-coordinates.
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 incls._registry, return instance ofcls._registry[__class__](instead ofcls).
- 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 toprojmatrix.
- 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.projand \(\ell^{\prime}\) toprojin.proj, \(n\) wide angle order corresponding toprojout.wa_orderand \(n^{\prime}\) toprojin.wa_order. Ifsum_waisTrue, or outputprojout.wa_orderisNone, sum over \(n\) (always the case except for debugging purposes).- Parameters
s (array) – Input (and ouput) separations.
projsin (list, ProjectionNameCollection) – Input projections.
projsout (list, ProjectionNameCollection, default=None) – Output projections. Defaults to
propose_out(projsin)[-1].
- property xin¶
Input x-coordinates.
- property xout¶
Output x-coordinates.