3.1.3. Curve Sample Function
- hysteresis.defaultDataFuncs.defaultSampleFunction(xy1, xy2)[source]
The sample function compares how similar two curves are. If they are exactly the same it will return a value of zero. The default function returns the average error between each sample point in two arrays of x/y points, xy1 and xy2.
- Parameters:
xy1 (array) – The first input 2D x/y array of points.
xy2 (array) – The second input 2D x/y array of points.
- Returns:
The average “distance” between each point on the curve. The output quantity is unitless.
- Return type:
float