pynbody.sph.kernels.KernelBase#

class pynbody.sph.kernels.KernelBase[source]#

Bases: object

Base class for SPH kernels

Methods

get_c_kernel_id()

Return the C kernel id for this kernel

get_value(d[, h])

Get the value of the kernel for a given smoothing length.

projection()

Return a 2D projection of this kernel

get_samples

__init__()[source]#
classmethod get_c_kernel_id() int[source]#

Return the C kernel id for this kernel

This is used to select the appropriate C code for the kernel, and must match the kernel id defined in the Kernel::create function in kernels.hpp

get_value(d, h=1) float[source]#

Get the value of the kernel for a given smoothing length.

projection() KernelBase[source]#

Return a 2D projection of this kernel