calculate_power_spectrum

lumicks.pylake.calculate_power_spectrum

calculate_power_spectrum(data, sample_rate, fit_range=(100.0, 23000.0), num_points_per_block=2000, excluded_ranges=None) PowerSpectrum

Compute power spectrum and return it as a PowerSpectrum.

Parameters:
  • data (np.array) – Data used for calibration.

  • sample_rate (float) – Sampling rate [Hz]

  • fit_range (tuple of float, optional) – Tuple of two floats (f_min, f_max), indicating the frequency range to use for the full model fit. [Hz]

  • num_points_per_block (int, optional) – The spectrum is first block averaged by this number of points per block. Default: 2000.

  • excluded_ranges (list of tuple of float, optional) – List of ranges to exclude specified as a list of (frequency_min, frequency_max).

Return type:

PowerSpectrum

Raises:

TypeError – If the data is not a one-dimensional numpy array.