pygmi.raster.fft#
A set of FFT routines.
Functions#
|
FFT preparation. |
|
Get KX and KY. |
|
Next power of 2. |
|
Calculates the Radially Averaged Power Spectrum (RAPS) of a 2D dataset. |
Module Contents#
- pygmi.raster.fft.fftprep(data)#
FFT preparation.
This routine pads using minimum curvature gridding.
- Parameters:
data (pygmi.raster.datatypes.Data) – Input dataset.
- Returns:
zfin (numpy array.) – Output prepared data.
datamedian (float) – Median of data.
- pygmi.raster.fft.fft_getkxy(fftmod, xdim, ydim)#
Get KX and KY.
- Parameters:
fftmod (numpy array) – FFT data.
xdim (float) – cell x dimension.
ydim (float) – cell y dimension.
- Returns:
KX (numpy array) – x sample frequencies.
KY (numpy array) – y sample frequencies.
- pygmi.raster.fft.nextpow2(n)#
Next power of 2.
- Parameters:
n (float or numpy array) – Current value.
- Returns:
m_i – Output.
- Return type:
float or numpy array
- pygmi.raster.fft.calculate_raps(dat)#
Calculates the Radially Averaged Power Spectrum (RAPS) of a 2D dataset.
- Parameters:
dat (np.ndarray) – A 2D NumPy array of the geophysical data.
- Returns:
k (np.ndarray) – The 1D array of radial wavenumbers.
raps (np.ndarray) – The 1D array of radially averaged power spectrum values.