Added support for averaging during slope measurement.