Module saccade
source code
Sheets for simulating a moving eye.
This module provides two classes, ShiftingGeneratorSheet, and
SaccadeController, that can be used to simulate a moving eye,
controlled by topographic neural activity from structures like the
superior colliculus.
ShiftingGeneratorSheet is a subclass of GeneratorSheet that accepts a
saccade command on the 'Saccade' port in the form of a tuple:
(amplitude,direction), specified in degrees. It shifts its sheet
bounds in response to this command, keeping the centroid of the bounds
within a prespecified boundingregion.
SaccadeController is a subclass of CFSheet that accepts CF projections
and decodes its resulting activity into a saccade command suitable for
controlling a ShiftingGeneratorSheet.
$Id: saccade.py 8988 2008-08-25 00:57:14Z ceball $
Version:
$Revision: 8988 $
|
|
SaccadeController
Sheet that decodes activity on CFProjections into a saccade command.
|
|
|
ShiftingGeneratorSheet
A GeneratorSheet that takes an extra input on port 'Saccade'
that specifies a saccade command as a tuple (amplitude,direction),
indicating the relative size and direction of the saccade in
degrees.
|
|
|
|
|
|
|
|
|
activity_mode(sheet,
activity=None)
Returns the sheet coordinates of the mode (highest value) of
the sheet activity. |
source code
|
|
activity_centroid(sheet,
activity=None,
threshold=0.0)
| source code
|
Return the sheet coords of the (weighted) centroid of sheet activity.
If the activity argument is not None, then it is used instead
of sheet.activity. If the sheet activity is all zero, the
centroid of the sheet bounds is returned.
|
|
Sample from the sheet activity as if it were a probability distribution.
Returns the sheet coordinates of the sampled unit. If
activity is not None, it is used instead of sheet.activity.
|