exa.core.util.fft_helper.get_frequency_estimate_via_fft

exa.core.util.fft_helper.get_frequency_estimate_via_fft#

get_frequency_estimate_via_fft(raw_data, delay_array_name, zero_padding)#

Function to estimate the frequency of an oscillation via FFT.

The following assumptions of the data must hold:

  1. Data has already been rotated to the real part (therefore, complex part is neglected).

The following steps are taken to extract the dominant oscillation frequency of the raw data:

  1. First, we subtract the DC component (mean of the raw data along the delay axis).

  2. The data along the delay axis is padded with zeros at the end. This has the effect of smoothening the FFT frequency spectrum.

  3. Find the integer corresponding to the highest peak in the frequency spectrum.

  4. With this index, we find the frequency corresponding to the dominant oscillation frequency.

Parameters:
  • raw_data (DataArray) – Data containing the dimensions corresponding to the delay sweep and some additional sweep, usually detuning sweep.

  • delay_array_name (str) – The name of the array corresponding to the delay sweep.

  • zero_padding (int) – Amount of zeros to be added along the delay sweep dimension to smoothen the FFT spectrum.

Returns:

Data array containing the dominant oscillation frequency for each extra sweep point.

Return type:

ndarray