synthesizer.kernel_functions

Functions

synthesizer.kernel_functions.cubic(r)[source]
synthesizer.kernel_functions.gadget_2(r)[source]
synthesizer.kernel_functions.quintic(r)[source]
synthesizer.kernel_functions.sph_anarchy(r)[source]
synthesizer.kernel_functions.uniform(r)[source]

Classes

class synthesizer.kernel_functions.Kernel(name='sph_anarchy', binsize=10000)[source]

Line of sight distance along a particle, l = 2*sqrt(h^2 + b^2), where h and b are the smoothing length and the impact parameter respectively. This needs to be weighted along with the kernel density function W(r), to calculate the los density. Integrated los density, D = 2 * integral(W(r)dz) from 0 to sqrt(h^2-b^2), where r = sqrt(z^2 + b^2), W(r) is in units of h^-3 and is a function of r and h. The parameters are normalized in terms of the smoothing length, helping us to create a look-up table for every impact parameter along the line-of-sight. Hence we substitute x = x/h and b = b/h.

This implies D = h^-2 * 2 * integral(W(r) dz) for x = 0 to sqrt(1.-b^2). The division by h^2 is to be done separately for each particle along the line-of-sight.

W_dz(z, b)[source]

W(r)dz

create_kernel()[source]

Saves the computed kernel for easy look-up as .npz file

get_kernel()[source]

h^-2 * 2 * integral(W(r) dz) from x = 0 to sqrt(1.-b^2) for various values of b

Examples using synthesizer.kernel_functions.Kernel

Line of sight example

Line of sight example

Plot line of sight diagnostics

Plot line of sight diagnostics