calculate linearity uncertainty calculate maximum deviation