KAccuracy

class hmf.core.accuracy.KAccuracy(*, dln_k=0.02, ln_k_min=-18.420680743952367, k_max_r_min=20.0)[source]

Settings of the internal wavenumber grid (the lattice in ln k).

The grid’s upper end is not a setting: it is derived from the mass lattice’s settings, as k_max >= k_max_r_min / R(m_min) with m_min the smallest mass of the default mass grid (MassAccuracy.log10_m_min), not the smallest mass requested. So the k grid does not change when the mass lattice extends.

Parameters:
  • dln_k (float, default 0.02) – Spacing of the wavenumber grid, in ln(k / (h/Mpc)).

  • ln_k_min (float, default -18.420680743952367) – ln of the smallest wavenumber of the grid, in h/Mpc.

  • k_max_r_min (float, default 20.0) – The grid extends to at least k_max = k_max_r_min / R, with R the Lagrangian radius of the smallest mass of the default mass grid (MassAccuracy.log10_m_min).

Attributes

dln_k: float
ln_k_min: float
k_max_r_min: float

Methods

classmethod fast(**overrides: Any) → Self

Return the fast preset: about v3’s accuracy, at lower cost.

Parameters:

**overrides – Settings to change from the preset.

Returns:

A new instance.

Return type:

Accuracy

classmethod fields_info() → tuple[FieldInfo, ...]

Describe this class’s fields, without creating an instance.

Returns:

The name, type, default and documentation of each field.

Return type:

tuple of FieldInfo

classmethod high(**overrides: Any) → Self

Return the high-accuracy preset, for convergence checks.

Parameters:

**overrides – Settings to change from the preset.

Returns:

A new instance.

Return type:

Accuracy