Expand description
2-D diffraction pattern (FFT of a projected density image).
Mirrors freud.diffraction.DiffractionPattern
(source).
Builds a 2-D Gaussian-smeared image of the projected particle positions,
takes a 2-D FFT (composed from rustfft’s 1-D plans), and returns the
power spectrum |F(k)|². Projection axis defaults to +z, mapping
particles onto the xy plane.
This is the first analyzer in the port to use rustfft 6 for real 2-D
Fourier work; the FFT planner is built once per frame and reused for
both row and column passes.
§Conventions
- The output image is FFT-shifted so that
k = 0sits at the centre(n_grid / 2, n_grid / 2), matching freud (and the usualnumpy.fft.fftshiftconvention). - Square grid
(n_grid × n_grid); rectangular grids are a follow-up. - Orthorhombic boxes only (matches
freud.DiffractionPattern.compute).
Structs§
- Diffraction
Pattern DiffractionPatternanalyzer.- Diffraction
Pattern Result - Per-frame diffraction-pattern result.