replacing log_period_err=0 with mean