Fourier machinery for the uniform periodic axes of PICurv's Cartesian grids. More...
Go to the source code of this file.
Namespaces | |
| namespace | periodic_spectral |
Functions | |
| periodic_spectral._drop_imported_package (str package_name) | |
| Remove a failed/partial import package tree from sys.modules. | |
| periodic_spectral._prune_incompatible_python_site_paths (paths) | |
| Remove site-package paths for a different Python major/minor version. | |
| periodic_spectral.require_numpy () | |
| Import NumPy with the same compatibility retry used by the conductor. | |
| periodic_spectral.validate_spectral_grid (nodes, transform_axes=(0, 1, 2), subject="spectra require") | |
| Validate the uniform axis-aligned Cartesian grid an FFT on periodic axes requires. | |
| periodic_spectral.spectral_symbols (cells_kji, lengths_xyz) | |
| Build continuum and centered-discrete Fourier symbols. | |
| periodic_spectral._resample_axis (values, storage_axis, target_count, length, shift) | |
| Move one periodic axis of an array of samples to another uniform resolution. | |
| periodic_spectral.filter_transfer (continuum_symbols, filter_spec) | |
| Transfer function of a resampling filter on the target grid's wavenumbers. | |
| periodic_spectral.fourier_resample (values, target_cells_kji, lengths_xyz, source_first_xyz, target_first_xyz, filter_spec=None) | |
| Resample a triply periodic vector field onto another uniform grid, optionally filtered. | |
Variables | |
| tuple | periodic_spectral.RESAMPLE_FILTERS = ("none", "sharp", "gaussian", "box") |
Fourier machinery for the uniform periodic axes of PICurv's Cartesian grids.
Shared by ic.gen, which synthesizes and resamples initial conditions, and spectra.gen, which measures spectra. Both need the same answer to three questions: which axes may be transformed, what the continuum and PICurv-discrete wavenumbers are, and how a periodic field is moved between resolutions. Arrays are in PICurv storage order, [k, j, i, component]; lengths and wavenumbers are in Cartesian x, y, z order. Every function imports NumPy through require_numpy(), so importing this module never imports NumPy itself.
Definition in file periodic_spectral.py.