SCI-624: optimise averaging algorithm for 1D datasets