lib.theory.integration.TrapzMuWedgeIntegration¶
- class lib.theory.integration.TrapzMuWedgeIntegration(mu=100, muwedges=3, sym=False)¶
Bases:
lib.theory.integration.BaseMuWedgeIntegrationClass performing trapzeoidal integration over \(\mu\)-wedges.
Initialize
BaseMuWedgeIntegration.- Parameters
mu (int, list) – \(\mu\) cosine angle to integrate on. Total number of \(\mu\)-bins, or list of \(\mu\)-coordinate arrays (one for each \(\mu\)-wedge).
muwedges (int, list) – Number of wedges, or list of tuples of wedges lower and upper bounds. Used if
muis total number of bins.sym (bool, default=False) – Whether integration is symmetric around \(\mu = 0\). In this case, and if input
muis the number of bins, only use wedges between 0 and 1.
Methods
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_warningSave class to disk.
If different formats are possible, this method should between them based on file name extension.
Set weights for trapezoidal integration.
Attributes
loggerMPI attributes
mpicommmpirootmpistate- __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 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
- 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.