fluidimage.calcul.correl#

Correlation classes#

The correlation classes are able to compute correlations with different methods.

class fluidimage.calcul.correl.CorrelBase(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: ABC

This class is meant to be subclassed, not instantiated directly.

_finalize_init()[source]#

Finalize initialization

compute_displacement_from_indices(ix, iy)[source]#

Compute the displacement from a couple of indices.

compute_indices_from_displacement(dx, dy)[source]#

Compute the indices corresponding to a displacement

get_indices_no_displacement()[source]#

Get the indices corresponding to no displacement

compute_displacements_from_correl(correl, norm=1.0)[source]#

Compute the displacement from a correlation.

apply_subpix(dx, dy, correl)[source]#

Compute the displacement with the subpix method.

class fluidimage.calcul.correl.CorrelScipySignal(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelBase

Correlations using scipy.signal.correlate2d

_finalize_init()[source]#

Finalize initialization

class fluidimage.calcul.correl.CorrelScipyNdimage(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelBase

Correlations using scipy.ndimage.correlate.

_finalize_init()[source]#

Finalize initialization

class fluidimage.calcul.correl.CorrelPythran(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelBase

Correlation computed “by hands” with Numpy and Pythran

_finalize_init()[source]#

Finalize initialization

class fluidimage.calcul.correl.CorrelPyCuda(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelBase

Correlation using pycuda. Correlation class by hands with cuda.

_finalize_init()[source]#

Finalize initialization

class fluidimage.calcul.correl.CorrelFFTNumpy(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelFFTWithOperBase

Correlations using numpy.fft.

FFTClass#

alias of NumpyFFT2DReal2Complex

class fluidimage.calcul.correl.CorrelFFTW(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelFFTWithOperBase

Correlations using fluidimage.fft.FFTW2DReal2Complex

FFTClass#

alias of FFTW2DReal2Complex

class fluidimage.calcul.correl.CorrelCuFFT(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelFFTWithOperBase

Correlations using fluidimage.fft.CUFFT2DReal2Complex

FFTClass#

alias of CUFFT2DReal2Complex

class fluidimage.calcul.correl.CorrelSKCuFFT(im0_shape, im1_shape, method_subpix='centroid', nsubpix=1, displacement_max=None, particle_radius=3, nb_peaks_to_search=1, mode=None)[source]#

Bases: CorrelFFTWithOperBase

Correlations using fluidimage.fft.FFTW2DReal2Complex

FFTClass#

alias of SKCUFFT2DReal2Complex

Functions

compute_indices_from_displacement(dx, dy, ...)

correl_numpy(im0, im1, disp_max)

Correlations by hand using only numpy.

nan_indices_max(correl, i0_start, i0_stop, ...)

parse_displacement_max(displ_max, im0_shape)

Classes

CorrelBase(im0_shape, im1_shape[, ...])

This class is meant to be subclassed, not instantiated directly.

CorrelCuFFT(im0_shape, im1_shape[, ...])

Correlations using fluidimage.fft.CUFFT2DReal2Complex

CorrelFFTBase(im0_shape, im1_shape[, ...])

Correlations using fft.

CorrelFFTNumpy(im0_shape, im1_shape[, ...])

Correlations using numpy.fft.

CorrelFFTW(im0_shape, im1_shape[, ...])

Correlations using fluidimage.fft.FFTW2DReal2Complex

CorrelFFTWithOperBase(im0_shape, im1_shape)

CorrelPyCuda(im0_shape, im1_shape[, ...])

Correlation using pycuda.

CorrelPythran(im0_shape, im1_shape[, ...])

Correlation computed "by hands" with Numpy and Pythran

CorrelSKCuFFT(im0_shape, im1_shape[, ...])

Correlations using fluidimage.fft.FFTW2DReal2Complex

CorrelScipyNdimage(im0_shape, im1_shape[, ...])

Correlations using scipy.ndimage.correlate.

CorrelScipySignal(im0_shape, im1_shape[, ...])

Correlations using scipy.signal.correlate2d