The function to call for the peak detection is a switch for the different methods.
piv.peak_detection.
find_peak
(corr, method='gaussian')[source]¶Peak detection algorithm switch
After loading the correlation window an maximum finder is invoked. The correlation window is cut down to the necessary 9 points around the maximum. Afterwards the maximum is checked not to be close to the boarder of the correlation frame. This cropped window is used in along with the chosen method to interpolate the sub pixel shift. Each interpolation method returns a tuple with the sub pixel shift in x and y direction. The maximums position and the sub pixel shift are added and returned. If an error occurred during the sub pixel interpolation the shift is set to nan. Also if the interpolation method is unknown an exception in thrown.
Parameters: |
|
---|---|
Raises: | Sub pixel interpolation method not found |
Returns: | shift in interrogation window |
It uses a function to check weather the maximum is inside or at the boarder of the correlation window.
piv.peak_detection.
check_peak_position
(corr, i, j)[source]¶Checking weather the maximum is at the boarder of the correlation window
Parameters: |
|
---|---|
Returns: | true if maximum is inside the correlation window |
The interpolation for the sub pixel shift has four different algorithms.