code: def line(y, thickness, gaussian_width):
      
      distance_from_line = abs(y)
      gaussian_y_coord = distance_from_line - thickness/2.0
      sigmasq = gaussian_width*gaussian_width
  
      if sigmasq==0.0:
          falloff = y*0.0
      else:
          with float_error_ignore():
              falloff = np.exp(np.divide(-gaussian_y_coord*gaussian_y_coord,2*sigmasq))
  
      return np.where(gaussian_y_coord<=0, 1.0, falloff)
docs: Infinite-length line with a solid central region, then Gaussian fall-off at the edges.