Classes | Functions | Variables
SeedMea Namespace Reference

This is a ROS node that is used by itself to generate network connectivity pickle files for the brian_recv.py and brian_to_csv.py nodes. More...

Classes

class  Channel
 Data structure for a MEA channel pad neurons: list of neurons within range of the pad total_weight: combined weights of all the neurons. More...
class  CloseNeuron
 Data structure for a neuron that is close to a channel pad. More...

Functions

def countCells
def densityReap
def displace
def diSqPlasma
def gaussConnect
 Calculate the probability of a connection between two neurons, based on their distance apart.
def genPCell
 Takes a 2-D Numpy array and fill it in with a density map.
def grimReap
def nextPowTwo
 Find the next highest power of two, to get a shape that's good for plasma fractal generation.
def renderMap
 Use pygame to render an array.
def squarePlasma

Variables

int axon_growth = 220
 axon_max = dish_width
tuple Ce = Connection(P, P, 'ge')
int cell_density = 900
tuple cells_per_edge = int(dish_width/soma_dia)
tuple Ci = Connection(P, P, 'gi')
tuple close_neurons = Channel()
tuple conn_graph = nx.DiGraph()
list conn_list = []
int connectivity_rate = 55
int dendrite_max = 180
tuple density_map = np.zeros((edge_len, edge_len))
int dish_width = 2500
tuple dist = math.sqrt((neuron_x_loc - pad_x_loc)**2 + (neuron_y_loc - pad_y_loc)**2)
tuple distance = math.sqrt((from_neuron[0][0] - to_neuron[0][0])**2 + (from_neuron[0][1] - to_neuron[0][1])**2)
tuple edge_len = nextPowTwo(cells_per_edge)
string eqs
tuple excitory_count = int(neuron_count * 0.75)
tuple expected_cells = (dish_width/1000)
string file_date = "{0}-{1}-{2}-{3}:{4}:{5}"
 ignore_corners = True
 inhib_count = neuron_count-excitory_count
tuple inhib_neurons = random.sample(xrange(neuron_count), inhib_count)
tuple neuron_count = int(countCells(density_map))
int neuron_id = 0
list neuron_list = []
list neuron_x_loc = neuron[0]
list neuron_y_loc = neuron[0]
tuple now = datetime.datetime.now()
tuple P = NeuronGroup(neuron_count, eqs, threshold=-50*mV, reset=-60*mV)
int pad_cols = 8
int pad_dia = 30
dictionary pad_neuron_map = {}
int pad_rows = 8
int pad_spacing = 200
int pad_threshold = 40
 pad_x_loc = pad_x*pad_spacing
 pad_y_loc = pad_y*pad_spacing
int soma_dia = 30
int survival_rate = 65

Detailed Description

This is a ROS node that is used by itself to generate network connectivity pickle files for the brian_recv.py and brian_to_csv.py nodes.

This node creates the connectivity maps, and those nodes run the actual simulation. You only need to run this node if you do not yet have pickle files or you want to generate new ones.

More info:

Generates a connectivity map by simulating growth of seeded neuron cells.

The growth simulation is a three-stage process: 1. Determine the cell density for each region of the MEA. 2. Assign cells to locations based on density. 3. Connect the cells based on a connectivity function.

Cell density is assigned based on random midpoint displacement fractals, aka "plasma fractals". This approach was chosen because it provides a stochastic approach that is computationally efficient. If it is not a good model of the actual distribution of neurons, a different algorithm can be used.

Cells are probabilistically assigned to locations based on the cell density (actually cell probability) at that point. Cells are modeled as point locations.

For each pair of cells, the probability of their connection is determined based on the distance between the cells and the cells are connected accordingly. Note that this results in N(N-1) comparisons, so roughly n^2 connections. Put that in your NP pipe and smoke it.

Author:
Abraham Shultz
Jonathan Hasenzahl

Function Documentation

def SeedMea.countCells (   density_map)

Definition at line 217 of file SeedMea.py.

def SeedMea.densityReap (   density_map,
  expected_cells 
)

Definition at line 196 of file SeedMea.py.

def SeedMea.displace (   size,
  originalSize 
)

Definition at line 109 of file SeedMea.py.

def SeedMea.diSqPlasma (   array)

Definition at line 114 of file SeedMea.py.

def SeedMea.gaussConnect (   distance,
  center 
)

Calculate the probability of a connection between two neurons, based on their distance apart.

Generates a value from 0 to 1, centered at

Definition at line 159 of file SeedMea.py.

def SeedMea.genPCell (   density_map)

Takes a 2-D Numpy array and fill it in with a density map.

The map values are in the range 0-1 and describe the probability of there being a cell soma located at that location. 1 is a cell, 0 is no cell.

Definition at line 95 of file SeedMea.py.

def SeedMea.grimReap (   density_map,
  survival_rate 
)

Definition at line 188 of file SeedMea.py.

def SeedMea.nextPowTwo (   start)

Find the next highest power of two, to get a shape that's good for plasma fractal generation.

Definition at line 152 of file SeedMea.py.

def SeedMea.renderMap (   densityData,
  title 
)

Use pygame to render an array.

The result is an image of the same dimensionality as the array, with each pixel set to 255*the value of the corresponding array location.

Definition at line 164 of file SeedMea.py.

def SeedMea.squarePlasma (   array)

Definition at line 117 of file SeedMea.py.


Variable Documentation

Definition at line 234 of file SeedMea.py.

Definition at line 236 of file SeedMea.py.

tuple SeedMea::Ce = Connection(P, P, 'ge')

Definition at line 355 of file SeedMea.py.

Definition at line 242 of file SeedMea.py.

Definition at line 246 of file SeedMea.py.

tuple SeedMea::Ci = Connection(P, P, 'gi')

Definition at line 356 of file SeedMea.py.

Definition at line 396 of file SeedMea.py.

tuple SeedMea::conn_graph = nx.DiGraph()

Definition at line 315 of file SeedMea.py.

list SeedMea::conn_list = []

Definition at line 297 of file SeedMea.py.

Definition at line 240 of file SeedMea.py.

Definition at line 232 of file SeedMea.py.

tuple SeedMea::density_map = np.zeros((edge_len, edge_len))

Definition at line 252 of file SeedMea.py.

int SeedMea::dish_width = 2500

Definition at line 231 of file SeedMea.py.

tuple SeedMea::dist = math.sqrt((neuron_x_loc - pad_x_loc)**2 + (neuron_y_loc - pad_y_loc)**2)

Definition at line 402 of file SeedMea.py.

tuple SeedMea::distance = math.sqrt((from_neuron[0][0] - to_neuron[0][0])**2 + (from_neuron[0][1] - to_neuron[0][1])**2)

Definition at line 301 of file SeedMea.py.

Definition at line 249 of file SeedMea.py.

string SeedMea::eqs
Initial value:
00001 '''
00002     dv/dt = (ge+gi-(v+49*mV))/(20*ms) : volt
00003     dge/dt = -ge/(5*ms) : volt
00004     dgi/dt = -gi/(10*ms) : volt
00005     '''

Definition at line 334 of file SeedMea.py.

Definition at line 346 of file SeedMea.py.

Definition at line 269 of file SeedMea.py.

string SeedMea::file_date = "{0}-{1}-{2}-{3}:{4}:{5}"

Definition at line 312 of file SeedMea.py.

Definition at line 370 of file SeedMea.py.

Definition at line 347 of file SeedMea.py.

tuple SeedMea::inhib_neurons = random.sample(xrange(neuron_count), inhib_count)

Definition at line 354 of file SeedMea.py.

Definition at line 341 of file SeedMea.py.

Definition at line 287 of file SeedMea.py.

Definition at line 286 of file SeedMea.py.

list SeedMea::neuron_x_loc = neuron[0]

Definition at line 399 of file SeedMea.py.

list SeedMea::neuron_y_loc = neuron[0]

Definition at line 400 of file SeedMea.py.

tuple SeedMea::now = datetime.datetime.now()

Definition at line 311 of file SeedMea.py.

tuple SeedMea::P = NeuronGroup(neuron_count, eqs, threshold=-50*mV, reset=-60*mV)

Definition at line 342 of file SeedMea.py.

Definition at line 369 of file SeedMea.py.

int SeedMea::pad_dia = 30

Definition at line 371 of file SeedMea.py.

dictionary SeedMea::pad_neuron_map = {}

Definition at line 378 of file SeedMea.py.

Definition at line 368 of file SeedMea.py.

Definition at line 372 of file SeedMea.py.

Definition at line 373 of file SeedMea.py.

Definition at line 392 of file SeedMea.py.

Definition at line 393 of file SeedMea.py.

Definition at line 230 of file SeedMea.py.

Definition at line 238 of file SeedMea.py.



neuro_recv
Author(s): Jonathan Hasenzahl
autogenerated on Sun Jan 5 2014 11:12:29