Fourier2DResult

class Fourier2DResult(frequencies_x, frequencies_y, power_spectrum, program_type)[source]

Bases: object

Result of a 2D Fourier analysis on a scan grid.

Contains the shifted frequency axes (frequencies_x, frequencies_y), the magnitude-squared of the shifted 2D FFT (power_spectrum), and the source program class name (program_type).

Attributes Summary

Methods Summary

plot(*[, ax, show, log_scale])

Plot the power spectrum and return (fig, ax).

Attributes Documentation

frequencies_x: ndarray[tuple[Any, ...], dtype[float64]]
frequencies_y: ndarray[tuple[Any, ...], dtype[float64]]
power_spectrum: ndarray[tuple[Any, ...], dtype[float64]]
program_type: str

Methods Documentation

plot(*, ax=None, show=False, log_scale=True, **imshow_kwargs)[source]

Plot the power spectrum and return (fig, ax).

Parameters:
  • ax – Optional matplotlib axes. When omitted, a new figure is created.

  • show (bool) – Whether to call matplotlib.pyplot.show() after drawing.

  • log_scale (bool) – Use logarithmic color scale (default True). This makes non-DC frequency components visible when the DC component dominates. Pass False for a linear scale.

  • **imshow_kwargs – Additional keyword arguments forwarded to ax.imshow.

Returns:

(fig, ax) for the rendered plot.

Return type:

tuple