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.BaseRegularMatrixClass 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
Falseif coupling to the window function is to be accounted for.
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
basisx-coordinates are k-wavenumbers.
loggerMPI attributes
mpicommmpirootmpistateregularinregularoutInput 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.
- 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 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(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.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\) (only if no window convolution is accounted for). Derivatives \(\partial_{k}\) are computed with finite differences, see arXiv:2106.06324 eq. 3.3.- Parameters
k (array) – Input (and ouput) wavenumbers.
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.