pmesh.cic module

Deprecated since version 0.1.

pmesh.cic.paint_old(pos, mesh, weights=1.0, mode='raise', period=None, transform=None)

CIC approximation (trilinear), painting points to Nmesh, each point has a weight given by weights. This does not give density. pos is supposed to be row vectors. aka for 3d input pos.shape is (?, 3).

pos[:, i] should have been normalized in the range of [ 0, mesh.shape[i] )

thus z is the fast moving index

mode can be :
“raise” : raise exceptions if a particle is painted
outside the mesh

“ignore”: ignore particle contribution outside of the mesh

period can be a scalar or of length len(mesh.shape). if period is given the particles are wrapped by the period.

transform is a function that transforms pos to mesh units: transform(pos[:, 3]) -> meshpos[:, 3]

pmesh.cic.readout_old(mesh, pos, mode='raise', period=None, transform=None, out=None)

CIC approximation, reading out mesh values at pos, see document of paint.