class_docstr: This is the matplotlib based GUI for a single analysis
  It assumes the analysis is simple image data (this could be abstracted)
class_docstr_tok: ["This","is","the","matplotlib","based","GUI","for","a","single","analysis","It","assumes","the","analysis","is","simple","image","data","(","this","could","be","abstracted",")"]
docstr: make a selection from a path
docstr_tok: ["make","a","selection","from","a","path"]
code: def select_path(self, path):
      """make a selection from a path"""
      self.in_selection = False
      xys = self.scatter.get_offsets()
      # length N bool array
      selection_mask = path.contains_points(xys)
      # print(f"selection shape {selection_mask.shape}")
      # print(f"current selection shape {self.selection_mask.shape}")
      # print(f"shape xys {xys.shape}")
      if self.draw_state[0] == DrawingMode.New:
          self.selection_mask = selection_mask
      if self.draw_state[0] == DrawingMode.Add:
          self.selection_mask = self.selection_mask | selection_mask
      if self.draw_state[0] == DrawingMode.Sub:
          self.selection_mask = self.selection_mask & ~selection_mask
      self.refresh_selection()
  
imports: import io
  from enum import Enum
  import numpy
  import matplotlib.pyplot
  import matplotlib.style
  from matplotlib.widgets import RectangleSelector, LassoSelector, EllipseSelector, PolygonSelector
  from matplotlib.path import Path
  from matplotlib.backends.backend_qt5agg import FigureCanvas
  from matplotlib.figure import Figure
  from PyQt5 import QtWidgets, QtCore
  from cursors import DrawingCursors, DrawingShape, DrawingMode
label_desc: Use image node_id 19 for calling the EmbeddingGui obj's underlying member method code with example usage: obj.select_path(path) without return types