python_codes.DEM_analysis.periodicity_2d#

periodicity_2d(A, rad, type='first')[source]#

Calculate the properties (orientation, wavelength, amplitude) of a 2-dimensional pattern.

  • The orientation is calculated by computed the integration over rad of the autocorrelation matrix around its maximum in each direction. The pattern orientation is then taken as where the maximum is.

  • The wavelength is taken at the position of the first maximum of the autocorrelation profile in the direction perpendicular to the orientation.

  • The amplitude is linked to the maximum of the autocorrelation matrix as \(A = \sqrt{2 C(0, 0)}\).

Parameters
  • A (array_like) – Input array.

  • rad (int) – Distance over wich the integration for the cauclation of the orientation is computed.

  • type (str) – Type of the detection of the peak of the autocorrelation for finding the wavelength. It can be ‘first’ or ‘max’. See python_codes.DEM_analysis.find_first_max for details.

Returns

  • orientation (float) – Orientation of the pattern in degrees.

  • wavelength (float) – Wavelength of the pattern in pixels.

  • amplitude (float) – Amplitude of the pattern in the input array unit.

  • p0 (array_like, shape (2,)) – Coordinates of the maximum of the autocorrelation matrix.

  • p1 (array_like, shape (2,)) – Coordinates of the end of the profile used for the calculation of the wavelength.

  • transect (array_like) – Profile used for the calculation of the wavelength.

  • C (array_like) – Autocorrelation matrix.

Examples using python_codes.DEM_analysis.periodicity_2d#