Decomposition Module

python binding for SFB decomposition of particle positions (part of CatAna)

Return Type

class catana.decomposition.KClkk

Return type of SFB decomposition methods

c_ln

contains the C_l(k,k) values

index 0: 0 < l < lmax index 1: 0 < n < nmax

f_lmn

contains the f_lm(k,k) values

index 0: 0 < l < lmax index 1: 0 < m <= l index 2: 0 < n < nmax

k_ln

contains the k values at which C_l(k,k) is evaluated

savetxt(self: catana.decomposition.KClkk, filename_base: str) → None

Save k_ln and c_ln to textfile

This will generate the following files:
  • filename_base + “.k_ln”: the k_ln values (row: l, column: n)
  • filename_base + “.c_ln”: the C_ln values (row: l, column: n)
Parameters:filename_base (str) – base path where the files will be created

sfb_decomposition

catana.decomposition.sfb_decomposition(*args, **kwargs)

Overloaded function.

  1. sfb_decomposition(point_container: catana.basictypes.PointContainer, lmax: int, nmax: int, rmax: float, store_flmn: bool=False, verbose: bool=True) -> catana.decomposition.KClkk

compute the SFB transform on the PointContainer

Warning

This method uses the slow brute-force method. Consider using a PixelizedPointContainer instead

Parameters:
  • point_container (PointContainer) – data to analyze
  • lmax (int) – largest multipole to compute
  • nmax (int) – largest k-index to compute
  • rmax (float) – maximal radius of data
  • store_flmn (bool) – if True the output will contain the f_lmn coefficients, otherwise only the C_ln
  • verbose (bool) – if True print additional logging information to stdout
Returns:

SFB components including the k at which they were computed and the C_l(k). If store_flmn, will also save the

f_lm(k) components

  1. sfb_decomposition(pixelized_point_container: catana.basictypes.PixelizedPointContainer, lmax: int, nmax: int, rmax: float, store_flmn: bool=False, verbose: bool=True) -> catana.decomposition.KClkk

compute the SFB transform on the PixelizedPointContainer

This method makes use of the fast pixelized decomposition scheme.

Parameters:
  • pixelized_point_container (PixelizedPointContainer) – data to analyze
  • lmax (int) – largest multipole to compute
  • nmax (int) – largest k-index to compute
  • rmax (float) – maximal radius of data
  • store_flmn (bool) – if True the output will contain the f_lmn coefficients, otherwise only the C_ln
  • verbose (bool) – if True print additional logging information to stdout
Returns:

SFB components including the k at which they were computed and the C_l(k). If store_flmn, will also save the

f_lm(k) components

Analyzer

class catana.decomposition.Analyzer(self: catana.decomposition.Analyzer, source: catana.io.Source) → None

Decomposition workflow which combines I/O and SFB transformation.

The Analyzer class combines Source with Filter instances and allows for direct computation of the SFB transform.

Constructor

Parameters:source (Source) – the (file) source from which to read
add_filter(self: catana.decomposition.Analyzer, Filter: catana.io.Filter) → None

Add a Filter to the pipeline.

Filters will be applied sequentially in the order that they were added to the Analyzer.

compute_sfb(self: catana.decomposition.Analyzer, lmax: int, nmax: int, rmax: float, store_flmn: bool=False, verbose: bool=True) → catana.decomposition.KClkk

Compute the SFB transform using the brute-force method

Parameters:
  • lmax (int) – largest multipole to compute
  • nmax (int) – largest k-index to compute
  • rmax (float) – maximal radius of data
  • store_flmn (bool) – if True the output will contain the f_lmn coefficients, otherwise only the C_ln
  • verbose (bool) – if True print additional logging information to stdout

Warning

This will read and filter the source input and compute the Spherical Fourier Bessel decomposition from the individual points directly without making use of the speed-up through the pixelization scheme.

NOT RECOMMENDED!

compute_sfb_pixelized(self: catana.decomposition.Analyzer, lmax: int, nmax: int, rmax: float, nside: int, store_flmn: bool=False, verbose: bool=True) → catana.decomposition.KClkk

Compute the SFB transform using the pixelization method

Parameters:
  • lmax (int) – largest multipole to compute
  • nmax (int) – largest k-index to compute
  • rmax (float) – maximal radius of data
  • nside (int) – HEALPix resolution, must be a power of 2
  • store_flmn (bool) – if True the output will contain the f_lmn coefficients, otherwise only the C_ln
  • verbose (bool) – if True print additional logging information to stdout
set_source(self: catana.decomposition.Analyzer, source: catana.io.Source) → None

reset the source

set_subsample_size(self: catana.decomposition.Analyzer, subsample_size: int) → None

set the number of points that are randomly sampled

If not set, all points that pass filtering will be taken into account for analysis. Note that random subsampling is done after filtering.