wale.VarianceCalculator module
- class wale.VarianceCalculator.Variance(cosmo, filter_type, pk)[source]
Bases:
object
A class to compute linear and nonlinear variance using power spectrum interpolators and a specific cosmological model.
- cosmo
An instance of a cosmology class providing necessary cosmological functions and parameters.
- Type:
Cosmology
- PK_interpolator_linear
An interpolator instance for linear power spectrum calculations.
- Type:
Interpolator
- PK_interpolator_nonlinear
An interpolator instance for nonlinear power spectrum calculations.
- Type:
Interpolator
- model
The name of the cosmological model to be used for variance calculations.
- Type:
str
Methods
get_sig_slice
(z, R1, R2)Calculates the slice variance σ² for the given scales and redshift in the nonlinear regime.
linear_sigma2
(redshift, R1[, R2])Calculates the linear variance σ² for given scales and redshift, considering the specified model adjustments.
nonlinear_sigma2
(redshift, R1[, R2])Calculates the nonlinear variance σ² for given scales and redshift, considering the specified model adjustments.
- get_sig_slice(z, R1, R2)[source]
Calculates the slice variance σ² for the given scales and redshift in the nonlinear regime.
- Parameters:
z (float) – The redshift at which to evaluate the slice variance.
R1 (float) – The first scale radius.
R2 (float) – The second scale radius.
- Returns:
The slice variance σ² at the given scales and redshift.
- Return type:
float
- linear_sigma2(redshift, R1, R2=None, **kwargs)[source]
Calculates the linear variance σ² for given scales and redshift, considering the specified model adjustments.
- Parameters:
redshift (float) – The redshift at which to evaluate the variance.
R1 (float) – The first scale radius.
R2 (float, optional) – The second scale radius. Defaults to R1 if not specified.
- Returns:
The linear variance σ² at the given scales and redshift.
- Return type:
float
- nonlinear_sigma2(redshift, R1, R2=None, **kwargs)[source]
Calculates the nonlinear variance σ² for given scales and redshift, considering the specified model adjustments.
- Parameters:
redshift (float) – The redshift at which to evaluate the variance.
R1 (float) – The first scale radius.
R2 (float, optional) – The second scale radius. Defaults to R1 if not specified.
- Returns:
The nonlinear variance σ² at the given scales and redshift.
- Return type:
float