utils

blur(d, h)[source]
blur_disk(N, rad)[source]
blur_kernel2(N, rad)[source]
blur_kernel3(N, rad)[source]
dft_lap(dshape, units=None, use_rfft=False)[source]

the dft of the laplacian stencil in 2d

divergence(u)[source]

the divergence of vector field u where u[i,…] are the components

finite_deriv_dft_central(dshape, units=None, use_rfft=False)[source]

the dft of the central finite differences in 2d

i.e. the fft of the stencil [1,0,-1]

myconvolve(x, h, is_fft=False)[source]
psf(dshape, sigmas=(2.0, 2.0))[source]
psf_airy(dshape, rads=(2.0, 2.0))[source]
soft_thresh(x, lam)[source]
the solution to

w = argmin 1/2*(w-x)^2+lam*|w|