Package pype :: Module pype :: Class FixWin
[frames] | no frames]

Class FixWin

source code

object --+
         |
        FixWin

Fixation Window Encapsulation

Although this is a class and comedi_server supports multiple fixation windows, this class is hard coded to use window #0, so there can really only be one instantation at a time.

User's should not really instantiate these directly any longer, but rather use app.makeFixWin() method.

Instance Methods
 
__init__(self, x=0, y=0, size=10, app=None, vbias=1.0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__del__(self) source code
 
interupts(self, enable=0)
Enable or disable interupts from this fixwin.
source code
 
genint(self, enable=None)
use interupts() method instead!
source code
 
get(self) source code
 
set(self, x=None, y=None, size=None)
Change (or set) size and position of fix window.
source code
 
move(self, x, y, size=-1)
Move fixwin
source code
 
reset(self) source code
 
on(self)
Tell comedi_server to monitor fixwin.
source code
 
off(self)
Tell comedi_server to stop monitoring fixwin
source code
 
inside(self)
Check to see if eye is inside fixwin.
source code
 
broke(self)
Check to see if eye moved out of window, since acquired.
source code
 
break_time(self)
Get the exact time fixation was broken.
source code
 
draw(self, color='grey', dash=None, clear=None)
Draw fixation window on user display.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, x=0, y=0, size=10, app=None, vbias=1.0)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

interupts(self, enable=0)

source code 

Enable or disable interupts from this fixwin.

Note: this simply allows one of the fixwins to generate interupts AS ALONG AS PYPE HAS INTERUPTS ENABLED! So, to activate this, you need to also make sure you call app.interupts(enable=1) as well, to enable global interupt handling.

set(self, x=None, y=None, size=None)

source code 

Change (or set) size and position of fix window.

Call on() method to update dacq process.

Parameters:
  • x, y - (pixels) position parameters
  • size - (pixels) window radius
Returns:
nothing

move(self, x, y, size=-1)

source code 

Move fixwin

Llike set, but for a live, active fixwin -- updates setting immediately without chaning the interupt/active state of the window. This is for implementing something like a pursuit tracker.

Parameters:
  • x, y - (pixels) new position parameters (absolute, not relative!)
  • size - (pixels) window radius (-1 for no change)
Returns:
nothing

on(self)

source code 
Tell comedi_server to monitor fixwin.
Returns:
nothing

off(self)

source code 
Tell comedi_server to stop monitoring fixwin
Returns:
nothing

inside(self)

source code 
Check to see if eye is inside fixwin.
Returns:
(boolean) in/out

broke(self)

source code 
Check to see if eye moved out of window, since acquired.
Returns:
(boolean) fixation broken since last check?

break_time(self)

source code 
Get the exact time fixation was broken.
Returns:
(ms)

draw(self, color='grey', dash=None, clear=None)

source code 
Draw fixation window on user display.
Returns:
nothing