Calculating the moving average of a log curve