PyDDM.ddm_calc.computeDDMMatrix_correctVelocityPhase

PyDDM.ddm_calc.computeDDMMatrix_correctVelocityPhase#

computeDDMMatrix_correctVelocityPhase(imageArray, dts, velocity, pixel_size, use_BH_windowing=False, quiet=False, overlap_method=2, **kwargs)#

Calculates DDM matrix

This function calculates the DDM matrix at the lag times provided by dts. Using the velocity parameter, we adjust phase of Fourier transform to remove the velocity

Parameters:
  • imageArray (array) – 3D array of images. First dimension should be time.

  • dts (array) – 1D array of the lag times for which to calculate the DDM matrix

  • velocity (array) – Two-element array-like object. Velocity of x and y. Microns per frame.

  • pixel_size (float) – Size of pixel (presumably in microns)

  • use_BH_windowing ({True, False}, optional) – Apply Blackman-Harris windowing to the images if True. Default is False.

  • overlap_method ({0,1,2,3}, optional) – Default is 2.

  • quiet ({True, False}, optional) – If True, prints updates as the computation proceeds

  • **number_differences_max (optional keyword argument) – For overlap_method of 1, sets the maximum number of differences to find for a given lag time. If `overlap_method`=1 and this keyword argument is not given, defaults to 300

Returns:

  • ddm_mat (array) – The DDM matrix. First dimension is time lag. Other two are the x and y wavevectors.

  • num_pairs_per_dt (array) – 1D array. Contains the number of image pairs that went into calculating the DDM matrix for each lag time. Used for weighting fits to the DDM matrix.