COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
shesha.widgets.widget_base.PupilBoxes Class Reference
Inheritance diagram for shesha.widgets.widget_base.PupilBoxes:
Collaboration diagram for shesha.widgets.widget_base.PupilBoxes:

Public Member Functions

def __init__ (self, x, y)
 x and y are 2D arrays of shape (Nplots, Nsamples) More...
 
def shape (self)
 
def boundingRect (self)
 

Public Attributes

 path
 

Detailed Description

Definition at line 62 of file widget_base.py.

Constructor & Destructor Documentation

◆ __init__()

def shesha.widgets.widget_base.PupilBoxes.__init__ (   self,
  x,
  y 
)

x and y are 2D arrays of shape (Nplots, Nsamples)

Definition at line 65 of file widget_base.py.

65  """x and y are 2D arrays of shape (Nplots, Nsamples)"""
66  connect = np.ones(x.shape, dtype=bool)
67  connect[:, -1] = 0 # don't draw the segment between each trace
68  self.path = pg.arrayToQPath(x.flatten(), y.flatten(), connect.flatten())
69  pg.QtGui.QGraphicsPathItem.__init__(self, self.path)
70  self.setPen(pg.mkPen('r'))
71 

Member Function Documentation

◆ boundingRect()

def shesha.widgets.widget_base.PupilBoxes.boundingRect (   self)

Definition at line 75 of file widget_base.py.

75  def boundingRect(self):
76  return self.path.boundingRect()
77 
78 

◆ shape()

def shesha.widgets.widget_base.PupilBoxes.shape (   self)

Definition at line 72 of file widget_base.py.

72  def shape(self): # override because QGraphicsPathItem.shape is too expensive.
73  return pg.QtGui.QGraphicsItem.shape(self)
74 

Member Data Documentation

◆ path

shesha.widgets.widget_base.PupilBoxes.path

Definition at line 68 of file widget_base.py.


The documentation for this class was generated from the following file: