2.4. resampleDx
- hysteresis.resample.resampleDx(curve, Targetdx)[source]
Creates a new curve object where the distance between sample points is approximately dx. The number of samples betweent the start and end point of each cycle is calculated so that the is as close to dx as possible. Note that distance isn’t precisely dx.
For each curve, a number of points will be chosen based on some target displacement value in the x direction. If the value overshoots, the last point will instead be used. For example, if the start = 2.5, end = 7.5 and dx = 2, points will be placed at 2.5, 4.5, 6.5, 7.5
Linear interpolation is used to find the y value of intermediate points. In the case of a Hysteresis, every SimpleCycle curve will be resampled with an amount of points equal to Nsamples. In the case of a SimpleCycle, each monotonic curve will be resampled.
- Parameters:
curve (Hysteresis, Monotonic Cycle, or numpy array) – The curve to be resampled.
Targetdx (float) – The target distance to use for sample points.
- Returns:
An object of the input type, with points approximately at Targetdx.
- Return type:
curve