Hysteresis is a non-linear loop-like behaviour that is common in natural systems. This script allows quick calculation of the hysteresis index and the objective classification of the size and the direction of hysteretic loop. The conceptual development of the hysteresis index is based on a normalisation of the input data, the computation of definite integrals at fixed intervals of the independent variable and the differences between the integrals for the rising and falling limb. The only condition for a correct application of the index is that the independent variable has to increase from its starting value to the peak. Caution should be used when only one or two measurements are available for the rising (or falling) limb or when the index is applied to very noisy data (e.g., data with large measurement errors and relatively small responses).
For more information on the calculation, application and limits of the hysteresis index, see:
Zuecco G., Penna D., Borga M., van Meerveld H.J. 2015. A versatile index to characterise hysteresis between hydrological variables at the runoff event timescale. Hydrological Processes, DOI: 10.1002/hyp.10681