fluidimage.postproc.util#

Utilities for post-processing (fluidimage.postproc.util)#

fluidimage.postproc.util.get_grid_from_ivecs_final(x_flat, y_flat)[source]#

Get a 2d grid from flat arrays

fluidimage.postproc.util.reshape_on_grid_final(x_flat, y_flat, deltaxs, deltays)[source]#

Reshape flat arrays on a 2d grid

fluidimage.postproc.util.compute_rot(dUdy, dVdx)[source]#

Compute the rotational

fluidimage.postproc.util.compute_div(dUdx, dVdy)[source]#

Compute the divergence

fluidimage.postproc.util.compute_1dspectrum(x, signal, axis=0)[source]#

Computes the 1D Fourier Transform

Parameters:
x: 1D np.ndarray
signal: np.ndarray
axis: int

Direction of the Fourier transform

Returns:
signal_fft: np.ndarray

fourier transform

omega: np.ndarray

puslation (in rad/s if x in s)

psd: np.ndarray

power spectral density normalized such that np.sum(signal**2) * dx / Lx = np.sum(psd) * domega

fluidimage.postproc.util.compute_2dspectrum(X, Y, signal, axes=(1, 2))[source]#

Computes the 2D Fourier Transform

INPUT: X: 2D np.array Y: 2D np.array signal: np.array to Fourier transform axis: directions of the fourier transform

OUTPUT: signal_fft = fourier transform kx: puslation (in rad/m if X in m) ky: pulsation (in rad/m if Y in m) psd: power spectral density normalized such that np.sum(signal**2) * dx / Lx = np.sum(psd) * domega

Functions

compute_1dspectrum(x, signal[, axis])

Computes the 1D Fourier Transform

compute_2dspectrum(X, Y, signal[, axes])

Computes the 2D Fourier Transform

compute_div(dUdx, dVdy)

Compute the divergence

compute_rot(dUdy, dVdx)

Compute the rotational

get_grid_from_ivecs_final(x_flat, y_flat)

Get a 2d grid from flat arrays

reshape_on_grid_final(x_flat, y_flat, ...)

Reshape flat arrays on a 2d grid