Barak 0.3.2 documentation

barak.convolve.convolve_window

«  barak.convolve.convolve_psf   ::   Contents   ::   barak.coord.ang_sep  »

barak.convolve.convolve_window

barak.convolve.convolve_window(a, window, edge='invert')[source]

Convolve an array with an arbitrary window.

Parameters :

a : array, shape (N,)

window : array, shape (M,)

The window array should have an odd number of elements.

edge : {‘invert’, ‘reflect’, ‘extend’} or int (default ‘invert’)

How to mitigate edge effects. If ‘invert’, the edges of a are extended by inversion, similarly for reflection. ‘extend’ means the intial and final points are replicated to extend the array. An integer value means take the median of that many points at each end and extend by replicating the median value.

Returns :

convolved_a : array, shape (N,)

Notes

The window is normalised before convolution.

«  barak.convolve.convolve_psf   ::   Contents   ::   barak.coord.ang_sep  »