code: def scatter(slope, zero, x1, x2, x1err=[], x2err=[]):
      
      n = len(x1)
      x2pred = zero + slope * x1
      s = sum((x2 - x2pred) ** 2) / (n - 1)
      if len(x2err) == n:
          s_obs = sum((x2err / x2) ** 2) / n
          s0 = s - s_obs
      print numpy.sqrt(s), numpy.sqrt(s_obs), numpy.sqrt(s0)
      return numpy.sqrt(s0)
docs: Used mainly to measure scatter for the BCES best-fit