CompoundPye  0.93
Modelling and Simulation Framework for Neural Networks of Arthropod Compound Eyes
 All Classes Namespaces Functions Variables Pages
CompoundPye.src.Circuits.circuit_array.CircuitSensorArray Class Reference

Circuit that needs to be initialized with a list of Components (as the basic Circuit object) and an array of Sensors. More...

Inheritance diagram for CompoundPye.src.Circuits.circuit_array.CircuitSensorArray:
CompoundPye.src.Circuits.circuit.Circuit

Public Member Functions

def __init__
 Initializes a CircuitSensorArray-object. More...
 
def update
 Updates the circuit. More...
 
def save_video
 Allows to generate a video from the frames in the buffer and the saved buffer-files. More...
 
def close_file
 Close the video output file. More...
 
- Public Member Functions inherited from CompoundPye.src.Circuits.circuit.Circuit
def __init__
 Initializes a Circuit-object. More...
 
def create_weight_matrices
 Creates the weight matrices. More...
 
def update
 Updates the circuit's components (in self.components) and its sensors (in self.sensors). More...
 

Detailed Description

Circuit that needs to be initialized with a list of Components (as the basic Circuit object) and an array of Sensors.

It stores the sensors' outputs in an array and provides the option to save the outputs in a video.

Constructor & Destructor Documentation

def CompoundPye.src.Circuits.circuit_array.CircuitSensorArray.__init__ (   self,
  list_of_components,
  array_of_sensors,
  debug = [] 
)

Initializes a CircuitSensorArray-object.

Parameters
list_of_componentsRequires a list of components with predefined connections.
list_of_sensorsRequires an array of sensors with predefined connections to one or more component.
debugList that contains debugging keywords.

Member Function Documentation

def CompoundPye.src.Circuits.circuit_array.CircuitSensorArray.close_file (   self)

Close the video output file.

Todo:
clean saved buffer-files somehow?
def CompoundPye.src.Circuits.circuit_array.CircuitSensorArray.save_video (   self,
  output_file,
  fps,
  log = False,
  color = False 
)

Allows to generate a video from the frames in the buffer and the saved buffer-files.

Parameters
output_fileName of the output file.
fpsFrame rate of the video that is to be created.
logSet True if you want to use a logarithmic scale of the intensities shown in the video, set False otherwise.
colorSet False if you want a gray scale video output, set True if you want a colorful output; NOTE THAT COLOR OUTPUT IS NOT IMPLEMENTED YET!
def CompoundPye.src.Circuits.circuit_array.CircuitSensorArray.update (   self,
  dt,
  intensities 
)

Updates the circuit.

Parameters
dtTime step of the update.
intensitiesArray of the intensities of the surroundings, providing inputs to the Circuit's Sensors.

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