Module pymskt.cython_functions

Functions

def gaussian_kernel(X, Y, sigma=1.0)

Get gaussian kernal for every point in array X to every point in array Y. If X/Y are the same, then this will just smooth array X. If X/Y are different, can be used to smooth one onto the other.

Parameters

X : numpy.ndarray
First array to compute gaussian kernel for
Y : numpy.ndarray
Second array to compute gaussian kernel for
sigma : float, optional
Standard deviation (sigma) for gaussian kernel, by default 1.

normalize: bool, optional

Whether or not to normalize the scalar values. Normalizing will ensure

that each point in x is a weighted sum of all points in Y with those weightings

totalling 1.0. Therefore,

Returns

numpy.ndarray
Array that can be multiple by scalar values to smooth them. Smoothing can be done inherently, or from one surface onto another.

Notes

https://math.stackexchange.com/questions/434629/3-d-generalization-of-the-gaussian-point-spread-function