Velocity Filter

In order to reduce the amount of outliers in the piv result a velocity filter is implemented. This filter is called from the main function:

velofilter.filter(piv, tfactor=3.0, dalpha=0.01)[source]

Function for calculating the cutoff values.

Parameters:
  • piv (object) –

    PIV class object

    This is supposed to be an object from a Direct or adaptive Class it is needed to get the velocities

  • tfactor (double) –

    Factor for cutoff in the velocity binning

    The default value is set to 3 which works for many cases

  • dalpha (double) –

    value for differential velocity

    The default is set to .01 which work for many cases if the velocities vary over a larger ranger use a larger value

In order to calculate the results a calculation of the velocities in an histogram like for and the integral over that is needed. The binning is done by the function

velofilter.calc_derivative(field, stepsize=0.01)[source]

Function for calculation of the binning.

The returned result is the binning of the velocities. It is called derivative because it is mathematically the derivative of the function:

velofilter.calc_factor()

It is done for the negative and positive half separately.

Parameters:
  • field – is a 1D field which will be binned
  • stepsize – is the step size for the velocity
Return (positive,negative):
 

velocities and the binning result for positive half and negative half are returned as a tuple

The integral over that is calculated as well directly from the data by the function

velofilter.calc_factor(field, stepsize=0.01)[source]

Function for calculation of the summed binning.

The returned result is an integral over the binning of the velocities. It is done for the negative and positive half separately.

Parameters:
  • field – is a 1D field which will be binned
  • stepsize – is the step size for the velocity
Return (positive,negative):
 

velocities and the binning result for positive half and negative half are returned as a tuple of numpy arrays