run_new_simulations

simrun.run_new_simulations.run_new_simulations(cellParamName, evokedUpParamName, dirPrefix='', nSweeps=1000, nprocs=40, tStop=345, silent=True, scale_apical=None, cell_generator=None, child_process=False, tar=False)

Create and simulate network-embedded neuron models.

This is the core method used throughout simrun to read and build neuron models from Cell parameters files, generate synaptic input patterns based on the Network parameters, and simulate the resulting network-embedded neuron model.

The workflow of this method is as follows:

  1. Initialize the simulation

    1. Set a random seed. Used in the output directory name and for generating network realizations with NetworkMapper.

    2. Build the cell with biophysical properties.

    3. Set up the simulation with recording sites from the neuron parameters

2. Run nSweeps simulations using init_neuron_run(), each time creating a new network embedding and sampling new activity using create_saved_network2(). 3. Parse and write out simulation data, including voltage traces from the soma and additional recording sites defined in the neuron parameters. 4. Finalize the simulation by removing the “_running” suffix from the dirname dirPrefix/results/YYYYMMDD-HHMM_UID_running.

Parameters:
cellParamName : str

Path to a Cell parameters file.

evokedUpParamName : str

Path to a Network parameters file.

dirPrefix : str

Prefix of the output directory. The final directory name will be dirPrefix/results/YYYYMMDD-HHMM_UID.

nSweeps : int

Number of simulations to run per process with these parameters. Trial-to-trial variability is introduced by the random seed in terms of different network activity and connectivity realizations (see create_saved_network2()).

nprocs : int

Number of parallel processes to run. Each process runs nSweeps simulations.

tStop : float

Duration of each simulation in ms.

cell_generator : callable, optional

Function to generate the cell. If provided, cellParamName is ignored.

tar : bool

If True, the output directory is compressed to a tarball after the simulation is finished.

Attention

While the random state is set for the network embedding, capturing animal-to-animal and cell-to-cell anatomical variability, the random state is not used for the synaptic input patterns. Stochasticity in activity is introduced each time the activity generation method is called (see e.g. compute_spike_train_times()). This means that the same seed will produce the same network embedding, but different synaptic input patterns. For this reason, the exact synaptic activations for each simulation run are saved as output data.

Deprecated since version 0.1: The scale_apical argument is deprecated and will be removed in a future version. Use the cell_modify_functions key in the Cell parameters file instead.

Returns:

Path to the output directory containing the simulation results.

Return type:

str