pynbody.sph.kernels.Kernel2D#

class pynbody.sph.kernels.Kernel2D(k_orig=<pynbody.sph.kernels.CubicSplineKernel object>)[source]#

Bases: KernelBase

A 2D spline kernel, generated by numerically projecting an underlying 3D kernel

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__(k_orig=<pynbody.sph.kernels.CubicSplineKernel object>)[source]#

Create a 2D kernel by projecting a 3D kernel. The 3D kernel is passed as an argument.

get_c_kernel_id()[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)[source]#

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

projection()[source]#

Return a 2D projection of this kernel