LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst.meas.algorithms.objectSizeStarSelector.EventHandler Class Reference
Inheritance diagram for lsst.meas.algorithms.objectSizeStarSelector.EventHandler:

Public Member Functions

def __init__
 
def __call__
 

Public Attributes

 axes
 
 xs
 
 ys
 
 x
 
 y
 
 frames
 
 cid
 

Detailed Description

A class to handle key strokes with matplotlib displays

Definition at line 111 of file objectSizeStarSelector.py.

Constructor & Destructor Documentation

def lsst.meas.algorithms.objectSizeStarSelector.EventHandler.__init__ (   self,
  axes,
  xs,
  ys,
  x,
  y,
  frames = [0] 
)

Member Function Documentation

def lsst.meas.algorithms.objectSizeStarSelector.EventHandler.__call__ (   self,
  ev 
)

Definition at line 123 of file objectSizeStarSelector.py.

124  def __call__(self, ev):
125  if ev.inaxes != self.axes:
126  return
127 
128  if ev.key and ev.key in ("p"):
129  dist = numpy.hypot(self.xs - ev.xdata, self.ys - ev.ydata)
130  dist[numpy.where(numpy.isnan(dist))] = 1e30
131 
132  which = numpy.where(dist == min(dist))
133 
134  x = self.x[which][0]
135  y = self.y[which][0]
136  for frame in self.frames:
137  ds9.pan(x, y, frame=frame)
138  ds9.cmdBuffer.flush()
139  else:
140  pass
141 
142 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Member Data Documentation

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.axes

Definition at line 114 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.cid

Definition at line 121 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.frames

Definition at line 119 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.x

Definition at line 117 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.xs

Definition at line 115 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.y

Definition at line 118 of file objectSizeStarSelector.py.

lsst.meas.algorithms.objectSizeStarSelector.EventHandler.ys

Definition at line 116 of file objectSizeStarSelector.py.


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