Least-squares Fit of Measured Points for Square Line-profiles