The sub class for the iterative part of the piv process is called Adaptive Piv.
piv.adaptive_piv.
AdaptivePIV
(piv_object, window_size, search_size, distance, deformation='forward', ipmethod='bilinear')[source]¶Class for the adaptive piv.
After the initial piv is done an adaptive piv can be performed to minimize the error or to make the grid finer. Therefore the correlation function is inherited as well as the GridSpec. In addition to the inherited grid a new Grid is calculated by deforming the grid with respect to the prior calculated velocities. In the case that the new grid is supposed to be finer then the one before, the velocities need to be upscaled.
Initialization as an extension of the super class.
The initialization of the super class is called to generate all necessary GridSpecs and grids. Additional information are the deformation method and the interpolation method.
Parameters: | piv_object : Direct/AdaptivePIV
window_size : int
search_size : int
distance : int
deformation : str
ipmethod : str
|
---|
In order to perform the deformation and needed interpolation a new method is introduced.
AdaptivePIV.
_deform_grid
(deformation_method, ipmethod)[source]¶Deforms the regular grid according to velocity and interpolates image.
In order to capture more particles flowing in the same direction as indicated by the previously calculated velocity field, the grid is deformed and the image corresponding to that grid spot interpolated from the original image. This gives a new grid with interpolated particle spots. Here two methods are available:
Parameters: | deformation_method : str
ipmethod : str
|
---|
For inclusion of these two different deformation methods into the correlation, the function getting the sub images has to be overridden.
AdaptivePIV.
_get_window_frames
(i, j)[source]¶Function override in order to include the two different deformation methods.
Functionality is the same as
DirectPIV.
_get_window_frames
(i, j)¶Return sub images of image attribute a and b at position i,j.
Parameters: |
|
---|---|
Returns: | sub frame as interrogation and search window for correlation |
but in this function, before the window in handed over the deformation is performed for that grid point.