Package topo :: Package sheet :: Module saccade :: Class ShiftingGeneratorSheet
[hide private]
[frames] | no frames]

Class ShiftingGeneratorSheet

source code


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. The parameter visual_angle_scale defines the relationship between degrees and sheet coordinates. The parameter saccade bounds limits the region within which the saccades may occur.
Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
__init__(self, **params)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
start(self)
Called by the simulation when the EventProcessor is added to the simulation.
source code
 
input_event(self, conn, data)
Called by the simulation when an EPConnectionEvent is delivered; the EventProcessor should process the data somehow.
source code
 
generate(self)
Generate the output and send it out the Activity port.
source code
 
shift(self, amplitude, direction, generate=None)
Shift the bounding box by the given amplitude and direction.
source code
 
refixate(self)
Move the bounds toward the fixation point.
source code
 
_translate(self, radius, angle) source code
 
_out_of_bounds(self)
Return true if the centroid of the current bounds is outside the saccade bounds.
source code
 
_find_saccade_in_bounds(self, radius, theta)
Find a saccade in the given direction (theta) that lies within self.saccade_bounds.
source code

Inherited from misc.generatorsheet.GeneratorSheet: pop_input_generator, push_input_generator, set_input_generator

Inherited from base.sheet.Sheet: activate, activity_len, n_bytes, override_plasticity_state, release_sheet_view, restore_plasticity_state, row_col_sheetcoords, sheet_cols, sheet_rows, sheetcoords_of_idx_grid, state_pop, state_push

Inherited from base.sheet.Sheet (private): _get_density

Inherited from base.simulation.EventProcessor: process_current_time, script_repr, send_output

Inherited from param.parameterized.Parameterized: __getstate__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, set_default, set_dynamic_time_fn, set_param, verbose, warning

Inherited from base.sheetcoords.SheetCoordinateSystem: closest_cell_center, matrix2sheet, matrixidx2sheet, sheet2matrix, sheet2matrixidx, sheetcoordinates_of_matrixidx

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  visual_angle_scale = param.Number(default= 90, doc= ...
The scale factor determining the visual angle subtended by this sheet, in degrees per unit of sheet.
  saccade_bounds = BoundingRegionParameter(default= BoundingBox(...
The bounds for saccades.
  generate_on_shift = param.Boolean(default= True, doc= ...
Whether to generate a new pattern when a shift occurs.
  fixation_jitter = param.Number(default= 0, doc= ...
Standard deviation of Gaussian fixation jitter.
  fixation_jitter_period = param.Number(default= 10, doc= ...
Period, in time units, indicating how often the eye jitters.
  dest_ports = ['Trigger', 'Saccade']
list() -> new list list(sequence) -> new list initialized from sequence's items
  src_ports = ['Activity', 'Position']
list() -> new list list(sequence) -> new list initialized from sequence's items
  name = <param.parameterized.String object at 0xb46e66c>
String identifier for this object.

Inherited from basic.SequenceGeneratorSheet: input_sequence

Inherited from misc.generatorsheet.GeneratorSheet: input_generator, period, phase

Inherited from base.sheet.Sheet: apply_output_fns, layout_location, nominal_bounds, nominal_density, output_fns, plastic, precedence, row_precedence

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from base.sheet.Sheet: density

Inherited from base.sheetcoords.SheetCoordinateSystem: shape, xdensity, ydensity

Inherited from object: __class__

Method Details [hide private]

__init__(self, **params)
(Constructor)

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

start(self)

source code 

Called by the simulation when the EventProcessor is added to the simulation.

If an EventProcessor needs to have any code run when it is added to the simulation, the code can be put into this method in the subclass.

Overrides: base.simulation.EventProcessor.start
(inherited documentation)

input_event(self, conn, data)

source code 
Called by the simulation when an EPConnectionEvent is delivered; the EventProcessor should process the data somehow.
Overrides: base.simulation.EventProcessor.input_event
(inherited documentation)

generate(self)

source code 
Generate the output and send it out the Activity port.
Overrides: misc.generatorsheet.GeneratorSheet.generate
(inherited documentation)

shift(self, amplitude, direction, generate=None)

source code 

Shift the bounding box by the given amplitude and direction.

Amplitude and direction are specified in degrees, and will be converted using the sheet's visual_angle_scale parameter. Negative directions are always downward, regardless of whether the amplitude is positive (rightword) or negative (leftward). I.e. straight-down = -90, straight up = +90.

The generate argument indicates whether or not to generate output after shifting. If generate is None, then the value of the sheet's generate_on_shift parameter will be used.

refixate(self)

source code 

Move the bounds toward the fixation point.

Moves the bounds toward the fixation point specified in self.fixation_point, potentially with noise as specified by the parameter self.fixation_jitter.

_find_saccade_in_bounds(self, radius, theta)

source code 

Find a saccade in the given direction (theta) that lies within self.saccade_bounds.

Assumes that the given saccade was already performed and landed out of bounds.


Class Variable Details [hide private]

visual_angle_scale

The scale factor determining the visual angle subtended by this sheet, in degrees per unit of sheet.
Value:
param.Number(default= 90, doc= """
        The scale factor determining the visual angle subtended by this sheet, in
        degrees per unit of sheet.""")

saccade_bounds

The bounds for saccades. Saccades are constrained such that the centroid of the sheet bounds remains within this region.
Value:
BoundingRegionParameter(default= BoundingBox(radius= 1.0), doc= """
        The bounds for saccades.  Saccades are constrained such that the centroid \
of the
        sheet bounds remains within this region.""")

generate_on_shift

Whether to generate a new pattern when a shift occurs.
Value:
param.Boolean(default= True, doc= """
       Whether to generate a new pattern when a shift occurs.""")

fixation_jitter

Standard deviation of Gaussian fixation jitter.
Value:
param.Number(default= 0, doc= """
       Standard deviation of Gaussian fixation jitter.""")

fixation_jitter_period

Period, in time units, indicating how often the eye jitters.
Value:
param.Number(default= 10, doc= """
       Period, in time units, indicating how often the eye jitters.
       """)