ptypy.utils.math_utils#

Numerical util functions.

This file is part of the PTYPY package.

copyright:

Copyright 2014 by the PTYPY team, see AUTHORS.

license:

see LICENSE for details.

Functions

abs2(A)

Squared absolute value for an array A.

cabs2(A)

Squared absolute value for an array A.

delxb(a[, axis])

Backward first order derivative for finite difference calculation.

delxc(a[, axis])

Central first order derivative for finite difference calculation.

delxf(a[, axis, out])

Forward first order derivative for finite difference calculation.

gauss_fwhm(x[, fwhm, off])

Evaluates gaussian with full width half maximum

gaussian(x[, std, off])

Evaluates gaussian standard normal

gaussian2D(size[, std_x, std_y, off_x, off_y])

Evaluates normalized 2D gaussian on array of dimension size.

gf(c, *arg, **kwargs)

Wrapper for scipy.ndimage.gaussian_filter, that determines whether original or the complex function shall be used.

gf_2d(c, sigma, **kwargs)

Gaussian filter along the last 2 axes

norm(A)

Norm.

norm2(A)

Squared norm

ortho(modes)

Orthogonalize the given list of modes or ndarray along first axis.

rl_deconvolution(data, mtf, numiter)

Richardson Lucy deconvolution on a 2D numpy array.

smooth_step(x, mfs)

Smoothed step function with fwhm mfs Evaluates the error function scipy.special.erf.