lib.theory.hankel_transform.HankelTransform¶
- class lib.theory.hankel_transform.HankelTransform(model=None, basis=None, nx=None, ells=None, q=0, integration=None)¶
Bases:
lib.theory.base.BaseModelClass performing (forward and backward) Hankel transforms.
Initialize
HankelTransform.- Parameters
model (BaseModel, callable) – Input model.
basis (ProjectionBasis, default=None) – Projection basis. If
NoneusesBaseModel.basisattribute of input model. Ifbasis.modeis'muwedge', model is first integrated onto Legendre polynomials to get multipoles.nx (int, default=None) – Number of log-space points. If
None, defaults to length ofbasis.x.ells (tuple, default=None) – Multipole orders. If
None, defaults tobasis.projsifbasis.modeis'muwedge', else(0,2,4).q (int, default=0) – Power-law tilt to regularize Hankel transforms.
integration (dict) – If
basis.modeis'muwedge', options for integration over Legendre polynomials, seeModelEvaluation.
Methods
Return shallow copy of
self.deepcopyEvaluate Hankel-transformed model.
Instantiate 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 artificial damping of the input model to regularize integration.
Attributes
loggerMPI attributes
mpicommmpirootmpistate- __call__(*args, **kwargs)¶
Evaluate model.
- copy()¶
Return shallow copy of
self.
- eval(x, **kwargs)¶
Evaluate Hankel-transformed model.
- Parameters
x (array) – x-coordinates (wavenumbers or separations).
kwargs (dict) – Arguments for
ModelEvaluation.__call__().
- Returns
model
- Return type
array
- 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_damping()¶
Set artificial damping of the input model to regularize integration.