CompoundPye
0.93
Modelling and Simulation Framework for Neural Networks of Arthropod Compound Eyes
|
Provides functions that use input parsed with MotionDetector.Parser.sensor_parser and MotionDetector.Parser.circuit_parser or input specified in the GUI to create lists of connected sensors and components. More...
Functions | |
def | get_comp_dict |
Creates a dictionary of possible MotionDetectorModel.Components.component.Component classes to use and where to find them (path to file). More... | |
def | get_transf_func_dict |
Creates a dictionary of possible transfer-functions to use and where to find them (path to file). More... | |
def | get_sensor_dict |
Creates a dictionary of possible MotionDetectorModel.Sensors.sensor.Sensor classes to use and where to find them (path to file). More... | |
def | create_circ_lists_GUI_interface |
Create circuit lists (a list of components and a list of sensors) with information from the GUI. More... | |
def | create_circ_lists |
Create circuit lists (a list of components and a list of sensors) with information from a circuit-file and a sensor-file. More... | |
def | connect_tangential_components |
Connects tangential components, or rather connects components of all columns to tangential cells. More... | |
def | get_components_via_label_and_attributes |
Get all components with given name and fulfilling given parmeter specifications from a list of components. More... | |
def | create_sensors |
Create a list of sensors with information from a sensor-file. More... | |
def | create_components |
Create a list of components with information from a circuit-file. More... | |
def | connect_receiver |
Connect components to columns' sensors according to the list of receiving components. More... | |
def | connect_components |
Connect components in one column according to the list of connections. More... | |
def | cross_connect_next_neighbours |
Connect components/neurons in neighbouring columns according to the list of connections. More... | |
def | cross_connect_next_next_neighbours |
Connect components/neurons in next-next-neighbouring columns according to the list of connections. More... | |
def | parse_nn_weight |
Parse the 'weight' parameter of a connection between next-neighbours. More... | |
def | get_component_via_label |
Find a component in a list of components via its label. More... | |
def | connect_via_labels |
Connect two components with labels l1 and l2 in the given list of components. More... | |
def | connect_tangential_via_labels |
Connect tangential cell with label l1 and targets with label l2 in the given list of components. More... | |
def | get_comp_class |
Creates a Component object of given string. More... | |
def | get_obj_args |
Creates a list of arguments and a dictionary of keyword arguments for a Component object. More... | |
def | get_transfer_func |
Returns transfer function with identical name as the given string. More... | |
def | get_func_args |
Creates a list of arguments and a dictionary of keyword arguments for a transfer function. More... | |
def | get_args |
Parse a string of arguments to a list of arguments and a dictionary of keyword arguments. More... | |
def | get_sensor_class |
Creates a Sensor object of given string. More... | |
def | get_sensor_args |
Creates a list of arguments and a dictionary of keyword arguments for a Sensor object. More... | |
def | get_filter_keyword |
Check if the given string is in the list of possible filter keys, return the appropriate filter key. More... | |
def | get_filter_args |
Create a list of parameters and a dictionary of keyword parameters from a string of parameters for a filter function. More... | |
Provides functions that use input parsed with MotionDetector.Parser.sensor_parser and MotionDetector.Parser.circuit_parser or input specified in the GUI to create lists of connected sensors and components.
def CompoundPye.src.Parser.creator.connect_components | ( | list_of_components, | |
connections | |||
) |
Connect components in one column according to the list of connections.
def CompoundPye.src.Parser.creator.connect_receiver | ( | sensor, | |
components, | |||
receiver_list | |||
) |
Connect components to columns' sensors according to the list of receiving components.
def CompoundPye.src.Parser.creator.connect_tangential_components | ( | tangential_components, | |
non_tangential_components, | |||
connections_to, | |||
connections_from | |||
) |
Connects tangential components, or rather connects components of all columns to tangential cells.
Now also includes connections FROM tangential cells to any other cells.
tangential_components | List of tangential components. |
non_tangential_components | List of all other components. |
connections | List of connections to tangential components. |
def CompoundPye.src.Parser.creator.connect_tangential_via_labels | ( | comp_list, | |
l1, | |||
weight, | |||
l2 | |||
) |
Connect tangential cell with label l1 and targets with label l2 in the given list of components.
comp_list | List of MotionDetectorModel.Components.component.Component objects. |
l1 | Label of the source component. |
weight | Weight of the connection. |
l2 | Label of the target component. |
def CompoundPye.src.Parser.creator.connect_via_labels | ( | comp_list, | |
l1, | |||
weight, | |||
l2 | |||
) |
Connect two components with labels l1 and l2 in the given list of components.
comp_list | List of MotionDetectorModel.Components.component.Component objects. |
l1 | Label of the source component. |
weight | Weight of the connection. |
l2 | Label of the target component. |
def CompoundPye.src.Parser.creator.create_circ_lists | ( | px, | |
s_settings, | |||
s_variables, | |||
s_defaults, | |||
sensors, | |||
arrangement, | |||
variables, | |||
components, | |||
connections, | |||
receiver, | |||
neighbour_kw_params = {'manually':False , |
|||
range | |||
) |
Create circuit lists (a list of components and a list of sensors) with information from a circuit-file and a sensor-file.
def CompoundPye.src.Parser.creator.create_circ_lists_GUI_interface | ( | px, | |
s_settings, | |||
s_variables, | |||
s_defaults, | |||
sensors, | |||
arrangement, | |||
variables, | |||
components, | |||
connections, | |||
receiver, | |||
neighbour_kw_params, | |||
show_nhood_plot | |||
) |
Create circuit lists (a list of components and a list of sensors) with information from the GUI.
Changes some of the input arguments such that the function create_circ_lists can be called from within this function with information from the input arguments. corrected==in correct syntax for create_circ_lists()
def CompoundPye.src.Parser.creator.create_components | ( | variables, | |
components, | |||
group_str, | |||
coords | |||
) |
Create a list of components with information from a circuit-file.
def CompoundPye.src.Parser.creator.create_sensors | ( | px, | |
s_settings, | |||
s_variables, | |||
s_defaults, | |||
sensors, | |||
mode_manual | |||
) |
Create a list of sensors with information from a sensor-file.
def CompoundPye.src.Parser.creator.cross_connect_next_neighbours | ( | left, | |
between, | |||
right, | |||
connections, | |||
manually, | |||
edge_i_j | |||
) |
Connect components/neurons in neighbouring columns according to the list of connections.
def CompoundPye.src.Parser.creator.cross_connect_next_next_neighbours | ( | left, | |
between, | |||
right, | |||
connections | |||
) |
Connect components/neurons in next-next-neighbouring columns according to the list of connections.
def CompoundPye.src.Parser.creator.get_args | ( | s, | |
v | |||
) |
Parse a string of arguments to a list of arguments and a dictionary of keyword arguments.
s | String of arguments. |
v | Dictionary of variables. |
def CompoundPye.src.Parser.creator.get_comp_class | ( | s | ) |
Creates a Component object of given string.
s | String representing a Component class |
def CompoundPye.src.Parser.creator.get_comp_dict | ( | ) |
Creates a dictionary of possible MotionDetectorModel.Components.component.Component classes to use and where to find them (path to file).
def CompoundPye.src.Parser.creator.get_component_via_label | ( | list_of_components, | |
label | |||
) |
Find a component in a list of components via its label.
list_of_components | List of MotionDetectorModel.Components.component.Component objects. |
label | Label of the component to look for. |
def CompoundPye.src.Parser.creator.get_components_via_label_and_attributes | ( | components, | |
name, | |||
parameters | |||
) |
Get all components with given name and fulfilling given parmeter specifications from a list of components.
components | List of components among which to search. |
name | Label of the wanted components. |
parameters | Specifies parameters regarding axis and direction for the wanted neurons. |
def CompoundPye.src.Parser.creator.get_filter_args | ( | s, | |
variables, | |||
defaults | |||
) |
Create a list of parameters and a dictionary of keyword parameters from a string of parameters for a filter function.
def CompoundPye.src.Parser.creator.get_filter_keyword | ( | s, | |
defaults | |||
) |
Check if the given string is in the list of possible filter keys, return the appropriate filter key.
def CompoundPye.src.Parser.creator.get_func_args | ( | s, | |
v | |||
) |
Creates a list of arguments and a dictionary of keyword arguments for a transfer function.
s | String of arguments. |
v | Dictionary of variables. |
def CompoundPye.src.Parser.creator.get_obj_args | ( | s, | |
variables | |||
) |
Creates a list of arguments and a dictionary of keyword arguments for a Component object.
def CompoundPye.src.Parser.creator.get_sensor_args | ( | s, | |
variables, | |||
default | |||
) |
Creates a list of arguments and a dictionary of keyword arguments for a Sensor object.
s | String of arguments. |
variables | Dictionary of variables. |
default | Dictionary of defaul values (replaces '-' for given category). |
def CompoundPye.src.Parser.creator.get_sensor_class | ( | s, | |
default | |||
) |
Creates a Sensor object of given string.
s | String representing a Sensor class. |
def CompoundPye.src.Parser.creator.get_sensor_dict | ( | ) |
Creates a dictionary of possible MotionDetectorModel.Sensors.sensor.Sensor classes to use and where to find them (path to file).
def CompoundPye.src.Parser.creator.get_transf_func_dict | ( | ) |
Creates a dictionary of possible transfer-functions to use and where to find them (path to file).
def CompoundPye.src.Parser.creator.get_transfer_func | ( | s | ) |
Returns transfer function with identical name as the given string.
s | String representing a transfer function. |
def CompoundPye.src.Parser.creator.parse_nn_weight | ( | s | ) |
Parse the 'weight' parameter of a connection between next-neighbours.
Those weight parameters need special treatment, because they can be different coming from a right neighbour than coming from a left neighbour.
s | Weight as a string. |