GNNCorrelation: Lens-Lens-Shear Correlations

The GNNCorrelation class computes the correlation of one spin-2 and two scalar fields.

Example

import orpheus

scat = orpheus.SpinTracerCatalog(
    spin=2, pos1=x, pos2=y, tracer_1=g1, tracer_2=g2)
lcat = orpheus.ScalarTracerCatalog(
    pos1=x, pos2=y, tracer=weight)
gnn = orpheus.GNNCorrelation(
    min_sep=1., max_sep=128., binsize=0.1, nthreads=nthreads)
gnn.process(scat,lcat)  # Compute 3PCF in multipole basis
gnn.multipoles2npcf()   # Transform to real-space basis
class orpheus.GNNCorrelation(min_sep, max_sep, zweighting=False, zweighting_sigma=None, **kwargs)[source]

Bases: BinnedNPCF

Class containing methods to measure and obtain statistics that are built from third-order source-lens-lens (G3L) correlation functions.

min_sep

The smallest distance of each vertex for which the NPCF is computed.

Type

float

max_sep

The largest distance of each vertex for which the NPCF is computed.

Type

float

zweighting

Has no effect at the moment.

Type

bool

zweighting_sigma

Has no effect at the moment.

Type

float or None

Notes

Inherits all other parameters and attributes from BinnedNPCF. Additional child-specific parameters can be passed via kwargs. Either nbinsr or binsize has to be provided to fix the binning scheme.

__process_patches(cat_source, cat_lens, dotomo_source=True, dotomo_lens=True, rotsignflip=False, apply_edge_correction=False, save_patchres=False, save_filebase='', keep_patchres=False)
process(cat_source, cat_lens, dotomo_source=True, dotomo_lens=True, rotsignflip=False, apply_edge_correction=False, save_patchres=False, save_filebase='', keep_patchres=False)[source]

Compute a shear-lens-lens correlation provided a source and a lens catalog.

Parameters
  • cat_source (orpheus.SpinTracerCatalog) – The source catalog which is processed

  • cat_lens (orpheus.ScalarTracerCatalog) – The lens catalog which is processed

  • dotomo_source (bool) – Flag that decides whether the tomographic information in the source catalog should be used. Defaults to True.

  • dotomo_lens (bool) – Flag that decides whether the tomographic information in the lens catalog should be used. Defaults to True.

  • rotsignflip (bool) – If the shape catalog has been decomposed in patches, choose whether the rotation angle should be flipped. For simulated data this was always ok to set to False. Defaults to False.

  • apply_edge_correction (bool) – Flag that decides how the NPCF in the real space basis is computed. * If set to True the computation is done via edge-correcting the GNN-multipoles * If set to False both GNN and NNN are transformed separately and the ratio is done in the real-space basis Defaults to False.

  • save_patchres (bool or str) – If the shape catalog has been decomposed in patches, flag whether to save the GNN measurements on the individual patches. Note that the path needs to exist, otherwise a ValueError is raised. For a flat-sky catalog this parameter has no effect. Defaults to False.

  • save_filebase (str) – Base of the filenames in which the patches are saved. The full filename will be <save_patchres>/<save_filebase>_patchxx.npz. Only has an effect if the shape catalog consists of multiple patches and save_patchres is not False.

  • keep_patchres (bool) – If the catalog consists of multiple patches, returns all measurements on the patches. Defaults to False.

edge_correction(ret_matrices=False)[source]
multipoles2npcf(xi=None)[source]

Notes

  • The Upsilon and Norms are only computed for the n>0 multipoles. The n<0 multipoles are recovered by symmetry considerations, i.e.:

\[\Upsilon_{-n}(\theta_1, \theta_2, z_1, z_2, z_3) = \Upsilon_{n}(\theta_2, \theta_1, z_1, z_3, z_2)\]

As the tomographic bin combinations are interpreted as a flat list, they need to be appropriately shuffled. This is handled by ztiler.

  • When dividing by the (weighted) counts N, all contributions for which N <= 0 are set to zero.

projectnpcf(projection)[source]
computeNNM(radii, do_multiscale=False, xi=None, tofile=False, filtercache=None)[source]

Compute third-order aperture statistics using the polyonomial filter of Crittenden 2002.

_NNM_filtergrid(R1, R2, R3)[source]
__NNM_filtergrid(R2, R3, edges, centers, phis)
_checkcats(cats, spins)
_initprojections(child)
_print_npcfprojections_avail(child)
_projectnpcf(child, projection)

Projects npcf to a new basis.

_updatetree(new_resos, include_shifts=True)
autoset_tree(cat, dpix_grid=2.0, nside_grid=2048)