extract mean and spread and use it to reject invalid data