CompoundPye  0.93
Modelling and Simulation Framework for Neural Networks of Arthropod Compound Eyes
 All Classes Namespaces Functions Variables Pages
CompoundPye.src.Sensors.sensor.Sensor Class Reference

Basic Sensor class. More...

Inherited by CompoundPye.src.Sensors.dummy_sensor.DummySensor, and CompoundPye.src.Sensors.photoreceptor.SensorWiener.

Public Member Functions

def __init__
 Initializes a Sensor-object with given input dimension. More...
 
def add_connection
 Adds a Connection from the Sensor to a Component. More...
 
def update
 Updates the sensory information that the Sensor provides. More...
 
def get_value
 Read the current output value of the Sensor. More...
 
def set_receptive_field
 Sets the receptive field of a sensor. More...
 

Detailed Description

Basic Sensor class.

Sensors can be used in a Circuit to look at the Surroundings and provide sensory information to the Circuit. They can have (and should have, to be of any use) connections to Components in the circuit. Preferably, one should use input filters (== special Components) to down regulate or up regulate the arbitrary outputs of a sensor. This regulation is not implemented in Sensors itself yet.

Constructor & Destructor Documentation

def CompoundPye.src.Sensors.sensor.Sensor.__init__ (   self,
  normalize = False,
  time_const = 0.0,
  debug = [] 
)

Initializes a Sensor-object with given input dimension.

Parameters
time_constThe Sensor's time constant, which specifies how much of its previous Component.value remains after each update step.

Member Function Documentation

def CompoundPye.src.Sensors.sensor.Sensor.add_connection (   self,
  weight,
  target 
)

Adds a Connection from the Sensor to a Component.

Parameters
weightStrength of the Connection.
targetComponent-object that is to be the target of the Connection.
def CompoundPye.src.Sensors.sensor.Sensor.get_value (   self)

Read the current output value of the Sensor.

Returns
Current output value.
def CompoundPye.src.Sensors.sensor.Sensor.set_receptive_field (   self,
  px,
  rel_center,
  filter = 'gaussian',
  filter_params = [],
  filter_kw_params = {} 
)

Sets the receptive field of a sensor.

Sensors do not 'see' anything before their receptive field is set.

Parameters
centerCenter of the neuron's receptive field (in relative size).
filterKeyword (string) for a certain filter; at the moment only 'gaussian' works.
filter_paramsList of parameters to be passed on to the filter function.
filter_kw_paramsDictionary of keyword-parameters to be passed on to the filter function.
def CompoundPye.src.Sensors.sensor.Sensor.update (   self,
  intensities 
)

Updates the sensory information that the Sensor provides.

As input one has to provide the intensities of a Surrounding-object. The actual input to this sensor is then calculated using the angles stored in Sensor.receptive_field . Before that is possible, though, one has to set what the Sensor can see, preferably using the function MotionDetectorModel.Surroundings.one_dim.OneDim.set_sensor or similar functions of more dimensional Surrounding-objects.

Parameters
intensitiesIntensities stored in a Surrounding-object (see MotionDetectorModel.Surroundings.one_dim.OneDim.intensities).
Note
The actual calculation happens in separate one or two dimensional update-functions.

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