myimagelib.pivLib.piv_data

class myimagelib.pivLib.piv_data(file_list, fps=50, cutoff=250)

Tools for PIV data downstream analysis, such as correlation, mean velocity, derivative fields, energy, enstrophy, energy spectrum, etc.

__init__(file_list, fps=50, cutoff=250)

file_list: return value of readdata

Methods

__init__(file_list[, fps, cutoff])

file_list: return value of readdata

corrS1d([mode, n, xlim, plot])

Compute 2d correlation and convert to 1d.

corrS2d([mode, n, plot])

Spatial correlation of velocity field. mode -- "sample" or "full" "sample" will sample n frames to compute the correlation "full" will sample all available frames to compute the correlation (could be computationally expensive) n -- number of frames to sample.

load_stack([cutoff])

Load PIV data in 3D numpy.array.

mean_velocity([mode, plot])

Mean velocity time series.

order_parameter(center[, mode])

Compute order parameter of a velocity field.

vacf([mode, smooth_method, smooth_window, ...])

Compute averaged vacf from PIV data. This is a wrapper of function autocorr1d(), adding the averaging over all the velocity spots. Args: mode -- the averaging method, can be "direct" or "weighted". "weighted" will use mean velocity as the averaging weight, whereas "direct" uses 1. smooth_window -- window size for gaussian smoothing in time xlim -- xlim for plotting the VACF, does not affect the return value Returns: corrData -- DataFrame of (t, corrx, corry) Edit: Mar 23, 2022 -- add smoothn smoothing option Nov 15, 2022 -- Fix inconsistency with corrLib.autocorr1d().