lib.theory.integration.TrapzMultipoleIntegration

class lib.theory.integration.TrapzMultipoleIntegration(mu=100, ells=(0, 2, 4), sym=False)

Bases: lib.theory.integration.BaseMultipoleIntegration

Class performing trapzeoidal integration over Legendre polynomials.

Initialize BaseMultipoleIntegration.

Parameters
  • mu (int, array, default=100) – \(\mu\) cosine angle to integrate on. \(\mu\)-coordinate array or number of \(\mu\)-bins.

  • ells (tuple) – Multipole orders.

  • sym (bool, default=False) – Whether integration is symmetric around \(\mu = 0\). In this case, and if input mu is the number of bins, only integrates between 0 and 1.

Methods

copy

Return shallow copy of self.

deepcopy

from_state

Instantiate and initalize class with state dictionary.

is_mpi_broadcast

is_mpi_gathered

is_mpi_root

is_mpi_scattered

load

Load class in numpy binary format from disk.

load_auto

If different formats are possible, this method should between them based on file name extension.

log_critical

log_debug

log_error

log_info

log_warning

save

Save class to disk.

save_auto

If different formats are possible, this method should between them based on file name extension.

set_mu_weights

Set weights for trapezoidal integration.

Attributes

logger

mpiattrs

MPI attributes

mpicomm

mpiroot

mpistate

__call__(array)

Integrate 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 in cls._registry, return instance of cls._registry[__class__] (instead of cls).

load_auto(*args, **kwargs)

If different formats are possible, this method should between them based on file name extension.

property mpiattrs

MPI attributes

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.

set_mu_weights()

Set weights for trapezoidal integration.