class_docstr: Remove an arbitrary, graphically defined baseline from the data.
class_docstr_tok: ["Remove","an","arbitrary",",","graphically","defined","baseline","from","the","data","."]
code: def processData(self, data):
      ## get array of baseline (from PolyLineROI)
      h0 = self.line.getHandles()[0]
      h1 = self.line.getHandles()[-1]
  
      timeVals = data.xvals(0)
      h0.setPos(timeVals[0], h0.pos()[1])
      h1.setPos(timeVals[-1], h1.pos()[1])
  
      pts = (
          self.line.listPoints()
      )  ## lists line handles in same coordinates as data
      pts, indices = self.adjustXPositions(
          pts, timeVals
      )  ## maxe sure x positions match x positions of data points
  
      ## construct an array that represents the baseline
      arr = np.zeros(len(data), dtype=float)
      n = 1
      arr[0] = pts[0].y()
      for i in range(len(pts) - 1):
          x1 = pts[i].x()
          x2 = pts[i + 1].x()
          y1 = pts[i].y()
          y2 = pts[i + 1].y()
          m = (y2 - y1) / (x2 - x1)
          b = y1
  
          times = timeVals[(timeVals > x1) * (timeVals <= x2)]
          arr[n : n + len(times)] = (m * (times - times[0])) + b
          n += len(times)
  
      return data - arr
  
imports: import numpy
  from ...None import Point, PolyLineROI
  from ...None import functions
  from ...None import metaarray
  from .None import functions
  from .common import CtrlNode, PlottingCtrlNode, metaArrayWrapper
label_desc: Use image node_id 4 for calling the RemoveBaseline obj's underlying member method code with example usage: obj.processData(data) and returns: unknown