Clip values before fitting gaussian