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

Parses sensor information from a sensor-file or save sensor information (also from the GUI) to a sensor-file. More...

Functions

def save_file
 Save given sensors and their parameters to a sensor file (text file). More...
 
def parse_file
 Parse a sensor file to several dictionaries. More...
 
def separate_sections
 Separate the complete string of a sensor file into header and different sections. More...
 
def parse_header
 Parse the settings,variables and defaults to 3 different dictionaries. More...
 
def parse_sensor_section
 Parse a sensor section to a dictionary, in which one key represents one sensor, its value holds the sensor's parameters. More...
 
def parse_sensor_line
 Parse a single line of a sensor section (= parameters for a single sensor) to a dictionary. More...
 

Detailed Description

Parses sensor information from a sensor-file or save sensor information (also from the GUI) to a sensor-file.

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

Function Documentation

def CompoundPye.src.Parser.sensor_parser.parse_file (   fname)

Parse a sensor file to several dictionaries.

Parameters
fnameName of the source file.
def CompoundPye.src.Parser.sensor_parser.parse_header (   h)

Parse the settings,variables and defaults to 3 different dictionaries.

Parameters
hHeader string.
Returns
3 separate dictionaries in the following order: settings, variables, defaults.
def CompoundPye.src.Parser.sensor_parser.parse_sensor_line (   l,
  d 
)

Parse a single line of a sensor section (= parameters for a single sensor) to a dictionary.

Parameters
lOne line of text from a sensor section.
dPointer to the dictionary in parse_sensor_section, to which the new dicionary containing one sensor's parameters will be added.
def CompoundPye.src.Parser.sensor_parser.parse_sensor_section (   s)

Parse a sensor section to a dictionary, in which one key represents one sensor, its value holds the sensor's parameters.

Parameters
sString of the sensor section.
Returns
Dictionary in which keys represent sensors, their values hold the sensors' parameters.
def CompoundPye.src.Parser.sensor_parser.save_file (   fname,
  settings,
  variables,
  defaults,
  sensors 
)

Save given sensors and their parameters to a sensor file (text file).

Parameters
fnameName of target file.
settingsGlobal settings to be stored in the header of the sensor file.
variablesGlobal variables to be stored in the header of the sensor file
defaultsGlobal defaults to be stored in the header of the sensor file.
def CompoundPye.src.Parser.sensor_parser.separate_sections (   s)

Separate the complete string of a sensor file into header and different sections.