astropy:docs

Kernel

class astropy.convolution.core.Kernel(array)[source] [edit on github]

Bases: object

Convolution kernel base class.

Parameters :

array : ndarray

Kernel array.

Attributes Summary

array Filter kernel array.
center Index of the kernel center.
dimension Kernel dimension.
is_bool Indicates if kernel is bool.
model Kernel response model.
normalization Kernel normalization factor
separable Indicates if the filter kernel is separable.
shape Shape of the kernel array.
truncation Deviation from the normalization to one.

Methods Summary

normalize([mode]) Force normalization of filter kernel.

Attributes Documentation

array[source]

Filter kernel array.

center[source]

Index of the kernel center.

dimension[source]

Kernel dimension.

is_bool[source]

Indicates if kernel is bool.

If the kernel is bool the multiplication in the convolution could be omitted, to increase the performance.

model[source]

Kernel response model.

normalization[source]

Kernel normalization factor

separable[source]

Indicates if the filter kernel is separable.

A 2D filter is separable, when its filter array can be written as the outer product of two 1D arrays.

If a filter kernel is separable, higher dimension convolutions will be performed by applying the 1D filter array consecutively on every dimension. This is significantly faster, than using a filter array with the same dimension.

shape[source]

Shape of the kernel array.

truncation[source]

Deviation from the normalization to one.

Methods Documentation

normalize(mode='integral')[source] [edit on github]

Force normalization of filter kernel.

Parameters :

mode : str

One of the following modes:
  • ‘integral’ (default)

    Kernel normalized such that its integral = 1.

  • ‘peak’

    Kernel normalized such that its peak = 1.

Page Contents