CompoundPye  0.93
Modelling and Simulation Framework for Neural Networks of Arthropod Compound Eyes
 All Classes Namespaces Functions Variables Pages
CompoundPye.src.Parser.circuit_parser Namespace Reference

Provides functions to generate circuit information from a circuit-file (text-file) to be passed on to MotionDetectorModel.Parser.creator.create_circ_lists. More...

Functions

def save_file
 Save circuit-data from the GUI's circuit-editor to file. More...
 
def parse_file
 Parse circuit-data from file to several lists and dictionaries. More...
 
def separate_sections
 Separate the given string (read from a circuit-file) into its header and different sections. More...
 
def parse_sections
 Parse the strings of different sections ('components'-sections,'connections'-sections and a 'receiver'-section) to dictionaries and lists. More...
 
def parse_connection_section
 Parse the string of a single 'connections'-section. More...
 
def parse_component_section
 Parse a 'components'-section to a dictionary. More...
 
def parse_component_line
 Parse a single line of a 'components'-section (one line = information of one component) to a dictionary; add this dictionary to given d. More...
 
def parse_header
 Parse the header of the file, read some settings and variables from it. More...
 

Detailed Description

Provides functions to generate circuit information from a circuit-file (text-file) to be passed on to MotionDetectorModel.Parser.creator.create_circ_lists.

Author
Ilyas Kuhlemann ilyas.nosp@m.p.ku.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Date
19.01.15

Function Documentation

def CompoundPye.src.Parser.circuit_parser.parse_component_line (   d,
  line 
)

Parse a single line of a 'components'-section (one line = information of one component) to a dictionary; add this dictionary to given d.

Parameters
dDictionary holding one dictionary (with information of a component) per component in the whole 'components'-section.
lineSingle line to be parsed.
def CompoundPye.src.Parser.circuit_parser.parse_component_section (   content)

Parse a 'components'-section to a dictionary.

Parameters
contentString of the 'components'-section.
Returns
Dictionary holding one dictionary (with information of a component) per component in the section.
def CompoundPye.src.Parser.circuit_parser.parse_connection_section (   content)

Parse the string of a single 'connections'-section.

Parameters
contentString of the 'connections'-section.
Returns
List of connection tuples.
def CompoundPye.src.Parser.circuit_parser.parse_file (   fname)

Parse circuit-data from file to several lists and dictionaries.

def CompoundPye.src.Parser.circuit_parser.parse_header (   h)

Parse the header of the file, read some settings and variables from it.

Parameters
hHeader string.
Returns
A list of settings and a dictionary with variables defined in the header.
def CompoundPye.src.Parser.circuit_parser.parse_sections (   arrangement,
  sections 
)

Parse the strings of different sections ('components'-sections,'connections'-sections and a 'receiver'-section) to dictionaries and lists.

def CompoundPye.src.Parser.circuit_parser.save_file (   fname,
  arrangement,
  variables,
  neurons,
  connections,
  receiver 
)

Save circuit-data from the GUI's circuit-editor to file.

def CompoundPye.src.Parser.circuit_parser.separate_sections (   s)

Separate the given string (read from a circuit-file) into its header and different sections.