PYME.Analysis.PSFEst.extractImages module¶
- PYME.Analysis.PSFEst.extractImages.backgroundCorrectPSFWF(d)¶
- PYME.Analysis.PSFEst.extractImages.extractIms(dataSource, results, metadata, zm=None, roiSize=10, nmax=1000)¶
- PYME.Analysis.PSFEst.extractImages.getIntCenter(im)¶
- PYME.Analysis.PSFEst.extractImages.getPSF(ims, points, zvals, zis)¶
- PYME.Analysis.PSFEst.extractImages.getPSF3D(im, points, PSshape=(30, 30, 30), blur=(0.5, 0.5, 1), normalize=True, centreZ=True, centreXY=True, x_offset=0, y_offset=0, z_offset=0, expand_z=False, pad=(0, 0, 4))¶
Extract a 3D PSF by averaging the images of a set of point sources.
- Parameters
- imndarray
3D image stack
- pointsndarray of shape (N, 3)
array of point locations
- PSshapetuple of 3 ints
half size of PSF in pixels
- blurtuple of 3 floats
standard deviation of Gaussian blur to apply to each dimension
- normalizebool, ‘max’, or ‘sum’
If True, or max normalize the entire PSF to the maximum value. If ‘sum’, normalize to the sum of the in-focus plane of the PSF
- centreZbool
If True, make sure the PSF is centred in z. If False, individual PSF images will still be aligned with respect to each other, but the PSF as a whole will not be. Useful when taking multi-channel PSFs where you want to preserve chromatic shifts between the channels in the PSF so that deconvolution will take care of chromatic shifts without an explicit separate shift correction step. Also used when extracting multi-channel PSFs for Biplane localization.
- centreXYbool
Similar to centreZ, but for the xy plane. Do not use for biplane PSFs (it is generally not possible to assume a constant lateral shift across the field of view, so this needs to be handled with shiftmaps).
- expand_zbool
Expand to the entire z range of the image. Was useful for deconvolution to ensure PSF sizes match the image size, but largely unnecessary as deconvolution code now has PSF expansion built in.
- padtuple of 3 ints
How much to pad the PSF in each dimension to avoid wrap-around when performing Fourier domain shifting. Default is (0,0,2)
- PYME.Analysis.PSFEst.extractImages.getPSFSlice(datasource, resultsSource, metadata, zm=None)¶