amep.utils.kpeaks#

amep.utils.kpeaks(Sxy: ndarray, kx: ndarray, ky: ndarray, a: float = 1.0, dk: float = 4.0, mode: str = 'hexagonal') ndarray#

Calculates the wave vectors that correspond to the first peaks of the 2D structure factor. The mode parameter specifies what kind of lattice is assumed (e.g. for a hexagonal lattice one expects six peaks). This information is also used to make a first estimate of the peak positions. The peaks are then determined by fitting a 2D Gaussian to the structure factor around the estimates.

Notes

This code only works for 2D systems.

Parameters:
  • Sxy (np.ndarray) – 2D static structure factor.

  • kx (np.ndarray) – x-components of wave vectors (same shape as Sxy; meshgrid).

  • ky (np.ndarray) – y-components of wave vectors (same shape as Sxy; meshgrid).

  • a (float, optional) – Lattice spacing - this is needed the make a first estimate for the peak positions. The default is 1.0.

  • dk (float, optional) – Size of the area in k-space around each estimate used for the Gaussian fit. The default is 4.0.

  • mode (str, optional) – The current version only uses mode=’hexagonal’. There are no other modes available yet. The default is ‘hexagonal’.

Returns:

Nkx3 array of floats (containing the Nk vectors corresponding to the Nk first peaks - z-component is set to zero)

Return type:

np.ndarray