pmesh.lanczos module

Deprecated since version 0.1.

pmesh.lanczos.cubic(dx, abs=<ufunc 'absolute'>, alpha=-0.5)[source]
pmesh.lanczos.kaiser(a, alpha)[source]
pmesh.lanczos.linear(dx, abs=<ufunc 'absolute'>)[source]
pmesh.lanczos.paint(pos, mesh, weights=1.0, mode='raise', period=None, transform=None, window=<function linear>)[source]

Paint particles, 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]