main

Run a parallel ring network of ball-and-stick cells and write the spike times to a file.

To execute with MPI across 2 processors:

$ mpiexec -n 2 python main.py

To modify any simulation parameters, specify individual variables encased in a string to a sim_var dictionary variable:

$ mpiexec -n 2 python main.py "sim_var['N']=6" \
   "sim_var['spike_out_file']='N6.spk'"

To visualize a few cells, playing back from a recorded spike file, specify a list of cells in the playback variable and run from an interactive python console:

$ python -i main.py "sim_var['playback']=[0,3]"

Note

This code requires numpy and mpi4py and assumes NEURON is also installed in the Python environment.

See also

Hines M.L. and Carnevale N.T, Translating network models to parallel hardware in NEURON, Journal of Neuroscience Methods 169 (2008) 425-455).

AUTHORS:

  • THOMAS MCTAVISH (2010-11-04): initial version.
main.plot_vecs(vecs, ids)[source]

Plot time series data.

Parameters:
  • vecs – Dict containing vectors. Assumes there is at least a ‘t’ key.
  • ids – Cell ids to plot.
main.process_args(in_argv)[source]

Process additional arguments on command line. Any Python statement can be executed, but arguments need to be formatted as strings and each one in the form "sim_var['<var>']=x" will run the simulation with a modification of parameters.

main.run(argv=None)[source]

Run a ring network simulation. Additional arguments on command line can be any Python statement to execute, but strings in the form "sim_var['<var>']=x" will run the simulation with a modification of those parameters.

Previous topic

ballandstick

Next topic

ring

This Page