lib.theory.effect_ap.IsotropicScaling¶
- class lib.theory.effect_ap.IsotropicScaling(model=None, basis=None, pivot=0.3333333333333333)¶
Bases:
lib.theory.base.BaseModelClass applying isotropic scaling of the theory model (correlation function or power spectrum).
Initialize
AnisotropicScaling.- Parameters
model (BaseModel, callable) – Input model.
basis (ProjectionBasis, default=None) – Projection basis. If
NoneusesBaseModel.basisattribute of input model.pivot (float, default=1./3.) – Pivot square cosine angle that defines isotropic scaling compared to the anistropic (AP) effect.
Methods
Return new
qparand perpendicularqperpscaling parameters to apply after isotropic scaling.Return shallow copy of
self.deepcopyEvaluate model in rescaled coordinates.
Instantiate and initalize class with state dictionary.
is_mpi_broadcastis_mpi_gatheredis_mpi_rootis_mpi_scatteredApply isotropic scaling to input wavenumbers.
Load 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_warningApply isotropic scaling to input separations.
Save class to disk.
If different formats are possible, this method should between them based on file name extension.
Set scaling parameters, along
qparand perpendicularqperpto the line-of-sight.Attributes
loggerMPI attributes
mpicommmpirootmpistate- __call__(*args, **kwargs)¶
Evaluate model.
- anisotropic_scaling()¶
Return new
qparand perpendicularqperpscaling parameters to apply after isotropic scaling.
- copy()¶
Return shallow copy of
self.
- eval(x, **kwargs)¶
Evaluate model in rescaled coordinates.
- Parameters
x (array) – x-coordinates (\(k\) or \(s\)).
kwargs (dict) – Arguments for input model.
- Returns
model
- Return type
array
- classmethod from_state(state, mpiroot=0, mpicomm=None)¶
Instantiate and initalize class with state dictionary.
- k_scaling(k)¶
Apply isotropic scaling to input wavenumbers.
- 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
- s_scaling(s)¶
Apply isotropic scaling to input separations.
- 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_scaling(qpar=1.0, qperp=1.0)¶
Set scaling parameters, along
qparand perpendicularqperpto the line-of-sight.