CompoundPye
0.93
Modelling and Simulation Framework for Neural Networks of Arthropod Compound Eyes
|
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... | |
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.
def CompoundPye.src.Sensors.sensor.Sensor.__init__ | ( | self, | |
normalize = False , |
|||
time_const = 0.0 , |
|||
debug = [] |
|||
) |
Initializes a Sensor-object with given input dimension.
time_const | The Sensor's time constant, which specifies how much of its previous Component.value remains after each update step. |
def CompoundPye.src.Sensors.sensor.Sensor.add_connection | ( | self, | |
weight, | |||
target | |||
) |
Adds a Connection from the Sensor to a Component.
weight | Strength of the Connection. |
target | Component-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.
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.
center | Center of the neuron's receptive field (in relative size). |
filter | Keyword (string) for a certain filter; at the moment only 'gaussian' works. |
filter_params | List of parameters to be passed on to the filter function. |
filter_kw_params | Dictionary 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.
intensities | Intensities stored in a Surrounding-object (see MotionDetectorModel.Surroundings.one_dim.OneDim.intensities). |