aspire.numeric package¶
Subpackages¶
Submodules¶
aspire.numeric.base_fft module¶
- class aspire.numeric.base_fft.FFT¶
Bases:
object
Define a customized interface for FFT functions
To make consistent among Pyfftw, Scipyfft and cupy fft, not all arguments are included.
- centered_fft(x, axis=-1, workers=-1)¶
- centered_fft2(x, axes=(-2, -1), workers=-1)¶
- centered_fftn(x, axes=None, workers=-1)¶
- centered_ifft(x, axis=-1, workers=-1)¶
- centered_ifft2(x, axes=(-2, -1), workers=-1)¶
- centered_ifftn(x, axes=None, workers=-1)¶
- fft(x, axis=-1, workers=-1)¶
- fft2(x, axes=(-2, -1), workers=-1)¶
- fftn(x, axes=None, workers=-1)¶
- fftshift(x, axes=None)¶
- ifft(x, axis=-1, workers=-1)¶
- ifft2(x, axes=(-2, -1), workers=-1)¶
- ifftn(x, axes=None, workers=-1)¶
- ifftshift(x, axes=None)¶
- mdim_fftshift(x, dims=None)¶
Multi-dimensional FFT shift
- Parameters:
x – The array to be shifted.
dims – An array of dimension indices along which the shift should occur. If None, the shift is performed along all dimensions.
- Returns:
The x array shifted along the desired dimensions.
- mdim_ifftshift(x, dims=None)¶
Multi-dimensional FFT unshift
- Parameters:
x – The array to be unshifted.
dims – An array of dimension indices along which the unshift should occur. If None, the unshift is performed along all dimensions.
- Returns:
The x array unshifted along the desired dimensions.
aspire.numeric.cupy module¶
aspire.numeric.cupy_fft module¶
aspire.numeric.mkl_fft module¶
aspire.numeric.numpy module¶
aspire.numeric.pyfftw_fft module¶
aspire.numeric.scipy module¶
Utility wrappers for scipy methods.
- aspire.numeric.scipy.cg(*args, **kwargs)¶
Supports scipy cg before and after 1.12.0.
aspire.numeric.scipy_fft module¶
- class aspire.numeric.scipy_fft.ScipyFFT¶
Bases:
FFT
Define a unified wrapper class for Scipy FFT functions
To be consistent with Pyfftw, not all arguments are included.
- dct(x, **kwargs)¶
- fft(x, axis=-1, workers=-1)¶
- fft2(x, axes=(-2, -1), workers=-1)¶
- fftn(x, axes=None, workers=-1)¶
- fftshift(x, axes=None)¶
- idct(x, **kwargs)¶
- ifft(x, axis=-1, workers=-1)¶
- ifft2(x, axes=(-2, -1), workers=-1)¶
- ifftn(x, axes=None, workers=-1)¶
- ifftshift(x, axes=None)¶
- irfft(x, **kwargs)¶
- rfft(x, **kwargs)¶
- rfftfreq(x, **kwargs)¶
Module contents¶
- aspire.numeric.fft_object(which)¶
- aspire.numeric.numeric_object(which)¶
- aspire.numeric.sparse_object(which)¶