Tools

Miscellaneous tools.

cosmax.tools Package

Functions

central_difference(field, axis, delta)

Compute the central difference of a field along a given axis.

cic_ma(pos, weight, elements[, size])

Periodic cloud in a cell mass (CIC) mass assignment.

compute_overdensity(rho)

Overdensity (delta) of a density field (rho) as defined in cosmology

compute_overdensity_mean(rho)

Overdensity (delta) of a density field (rho) as defined in cosmology

compute_rho(overdensity, mean)

Get density (rho) from overdensity (delta)

fit_field(key, elements, field, total_mass)

Given a 3D density field, fit the particle positions and masses such that the density field is well represented by the particles.

gradient(field, delta)

Compute the gradient of a field using central differences.

growth_factor_approx(a, Omega_M, Omega_L)

Approximation of the growth factor in cosmology

loss(pos, mass, field_truth[, size])

Loss function for fitting a 3D density field with particles