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.BaseMatrixClass 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
srangenot 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
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.
Attributes
basisOutput x-coordinates are k-wavenumbers.
Input x-coordinates are k-wavenumbers.
loggerMPI attributes
mpicommmpirootmpistateregularinregularout- 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 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 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.projand \(\ell^{\prime}\) toprojin.proj, \(k\) tokoutand \(k^{\prime}\) tokin. \(n\) is the wide-angle orderproj.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
kout (array) – Output wavenumbers.
projsin (list, ProjectionNameCollection) – Input projections.
projsout (list, ProjectionNameCollection, default=None) – Output projections. Defaults to
propose_out(projsin)[-1].