Official Python implementation of the 'Sparse deconvolution', and the CPU (NumPy)
and GPU (CuPy)
calculation backend will be automatically selected.
We haven’t tested it thoroughly, and the development is work in progress, so expect rough edges. As a result, feedback, questions, bug reports, and patches are welcome and encouraged!
It is a part of publication. For details, please refer to: "Weisong Zhao et al. Sparse deconvolution improves the resolution of live-cell super-resolution fluorescence microscopy, Nature Biotechnology (2021)".
512 × 512 × 5
image stack.demo.py
from sparse_recon.sparse_deconv import sparse_deconv
im = io.imread('test.tif')
plt.imshow(im,cmap = 'gray')
plt.show()
pixelsize = 65 #(nm)
resolution = 280 #(nm)
img_recon = sparse_deconv(im, resolution / pixelsize)
plt.imshow(img_recon / img_recon.max() * 255,cmap = 'gray')
plt.show()