miv_simulator.network#

Network initialization routines.

Functions

connect_cell_selection(env)

Loads NeuroH5 connectivity file, instantiates the corresponding synapse and network connection mechanisms for the selected postsynaptic cells.

connect_cells(env)

Loads NeuroH5 connectivity file, instantiates the corresponding synapse and network connection mechanisms for each postsynaptic cell.

connect_gjs(env)

Loads NeuroH5 connectivity file, instantiates the corresponding half-gap mechanisms on the pre- and post-junction cells.

find_gid_pop(celltypes, gid)

Given a celltypes structure and a gid, find the population to which the gid belongs.

init(env)

Initializes the network by calling make_cells, init_input_cells, connect_cells, connect_gjs.

init_input_cells(env)

Initializes cells with predefined spike patterns.

ld_bal(env)

For given cxvec on each rank, calculates the fractional load balance.

lpt_bal(env)

Load-balancing based on the LPT algorithm.

make_cell_selection(env)

Instantiates cell templates for the selected cells according to population ranges and NeuroH5 morphology if present.

make_cells(env)

Instantiates cell templates according to population ranges and NeuroH5 morphology if present.

make_input_cell_selection(env)

Creates cells with predefined spike patterns when only a subset of the network is instantiated.

merge_spiketrain_trials(spiketrain, ...)

rtype:

ndarray

run(env[, output, output_syn_spike_count])

Runs network simulation.

set_union(a, b, datatype)

shutdown(env)

Forces NEURON to make it delete its MPI communicator and shut down properly.

miv_simulator.network.ld_bal(env)[source]#

For given cxvec on each rank, calculates the fractional load balance.

Parameters:

env – an instance of the miv_simulator.Env class.

miv_simulator.network.lpt_bal(env)[source]#

Load-balancing based on the LPT algorithm. Each rank has gidvec, cxvec: gather everything to rank 0, do lpt algorithm and write to a balance file.

Parameters:

env – an instance of the miv_simulator.Env class.

miv_simulator.network.connect_cells(env)[source]#

Loads NeuroH5 connectivity file, instantiates the corresponding synapse and network connection mechanisms for each postsynaptic cell.

Parameters:

env (Env) – an instance of the miv_simulator.Env class

Return type:

None

miv_simulator.network.find_gid_pop(celltypes, gid)[source]#

Given a celltypes structure and a gid, find the population to which the gid belongs.

Return type:

str

miv_simulator.network.connect_cell_selection(env)[source]#

Loads NeuroH5 connectivity file, instantiates the corresponding synapse and network connection mechanisms for the selected postsynaptic cells.

Parameters:

env – an instance of the miv_simulator.Env class

miv_simulator.network.connect_gjs(env)[source]#

Loads NeuroH5 connectivity file, instantiates the corresponding half-gap mechanisms on the pre- and post-junction cells.

Parameters:

env (Env) – an instance of the miv_simulator.Env class

Return type:

None

miv_simulator.network.make_cells(env)[source]#

Instantiates cell templates according to population ranges and NeuroH5 morphology if present.

Parameters:

env (Env) – an instance of the miv_simulator.Env class

Return type:

None

miv_simulator.network.make_cell_selection(env)[source]#

Instantiates cell templates for the selected cells according to population ranges and NeuroH5 morphology if present.

Parameters:

env – an instance of the miv_simulator.Env class

miv_simulator.network.make_input_cell_selection(env)[source]#

Creates cells with predefined spike patterns when only a subset of the network is instantiated.

Parameters:

env – an instance of the miv_simulator.Env class

miv_simulator.network.init_input_cells(env)[source]#

Initializes cells with predefined spike patterns.

Parameters:

env (Env) – an instance of the miv_simulator.Env class

Return type:

None

miv_simulator.network.init(env)[source]#

Initializes the network by calling make_cells, init_input_cells, connect_cells, connect_gjs. If env.optldbal or env.optlptbal are specified, performs load balancing.

Parameters:

env (Env) – an instance of the miv_simulator.Env class

Return type:

None

miv_simulator.network.shutdown(env)[source]#

Forces NEURON to make it delete its MPI communicator and shut down properly.

TODO: This may no longer be required in more recent versions of neurons

miv_simulator.network.run(env, output=True, output_syn_spike_count=False)[source]#

Runs network simulation. Assumes that procedure init has been called with the network configuration provided by the env argument.

Parameters:
  • env (Env) – an instance of the miv_simulator.Env class

  • output (bool) – if True, output spike and cell voltage trace data

  • output_syn_spike_count (bool) – if True, output spike counts per pre-synaptic source for each gid