lib.theory.effect_ap.IsotropicScaling

class lib.theory.effect_ap.IsotropicScaling(model=None, basis=None, pivot=0.3333333333333333)

Bases: lib.theory.base.BaseModel

Class 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 None uses BaseModel.basis attribute of input model.

  • pivot (float, default=1./3.) – Pivot square cosine angle that defines isotropic scaling compared to the anistropic (AP) effect.

Methods

anisotropic_scaling

Return new qpar and perpendicular qperp scaling parameters to apply after isotropic scaling.

copy

Return shallow copy of self.

deepcopy

eval

Evaluate model in rescaled coordinates.

from_state

Instantiate and initalize class with state dictionary.

is_mpi_broadcast

is_mpi_gathered

is_mpi_root

is_mpi_scattered

k_scaling

Apply isotropic scaling to input wavenumbers.

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

s_scaling

Apply isotropic scaling to input separations.

save

Save class to disk.

save_auto

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

set_scaling

Set scaling parameters, along qpar and perpendicular qperp to the line-of-sight.

Attributes

logger

mpiattrs

MPI attributes

mpicomm

mpiroot

mpistate

__call__(*args, **kwargs)

Evaluate model.

anisotropic_scaling()

Return new qpar and perpendicular qperp scaling 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 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

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 qpar and perpendicular qperp to the line-of-sight.