netpyne.sim.wrappers

Module containing wrappers to create, load, simulate, analyze networks

Functions:

create([netParams, simConfig, output, clearAll])

Wrapper function to create a simulation

simulate()

Wrapper function to run a simulation and gather the data

intervalSimulate(interval)

Wrapper function to run a simulation at intervals and gather the data from files

distributedSimulate([filename, includeLFP])

Wrapper function to run a simulation and save/load data to/from files by node

analyze()

Wrapper function to analyze and plot simulation data

createSimulate([netParams, simConfig, output])

Wrapper function to create and run a simulation

createSimulateAnalyze([netParams, ...])

Wrapper function run and analyze a simulation

createSimulateAnalyzeInterval(netParams, ...)

Wrapper function to run a simulation saving data at time intervals

createSimulateAnalyzeDistributed(netParams, ...)

Wrapper function to run a simulation saving data in each node

load(filename[, simConfig, output, ...])

Wrapper function to load a simulation from file

loadSimulate(filename[, simConfig, output])

Wrapper function to load a simulation from file and simulate it

loadSimulateAnalyze(filename[, simConfig, ...])

Wrapper function to load a simulation from file and simulate and anlyze it

createExportNeuroML2([netParams, simConfig, ...])

Wrapper function create and export a NeuroML2 simulation

importNeuroML2SimulateAnalyze(fileName, ...)

Wrapper function to import, simulate, and analyze from a NeuroML2 file

runSimIntervalSaving([interval])

Wrapper function to run a simulation while saving data at intervals

netpyne.sim.wrappers.create(netParams=None, simConfig=None, output=False, clearAll=False)[source]

Wrapper function to create a simulation

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

Returns

data – If output is True, returns (pops, cells, conns, rxd, stims, simData)

Return type

tuple

netpyne.sim.wrappers.simulate()[source]

Wrapper function to run a simulation and gather the data

netpyne.sim.wrappers.intervalSimulate(interval)[source]

Wrapper function to run a simulation at intervals and gather the data from files

Parameters

interval (number) – The time interval at which to save data files. Default: required.

netpyne.sim.wrappers.distributedSimulate(filename=None, includeLFP=True)[source]

Wrapper function to run a simulation and save/load data to/from files by node

Parameters
  • filename (str) – name of saved data files. Default: None uses the name of the simulation.

  • includeLFP (bool) – whether or not to include LFP data Default: True includes LFP data if available.

netpyne.sim.wrappers.analyze()[source]

Wrapper function to analyze and plot simulation data

netpyne.sim.wrappers.createSimulate(netParams=None, simConfig=None, output=False)[source]

Wrapper function to create and run a simulation

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

Returns

data – If output is True, returns (pops, cells, conns, stims, simData)

Return type

tuple

netpyne.sim.wrappers.createSimulateAnalyze(netParams=None, simConfig=None, output=False)[source]

Wrapper function run and analyze a simulation

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

Returns

data – If output is True, returns (pops, cells, conns, stims, simData)

Return type

tuple

netpyne.sim.wrappers.createSimulateAnalyzeInterval(netParams, simConfig, output=False, interval=None)[source]

Wrapper function to run a simulation saving data at time intervals

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

  • interval (number) – The time interval (in ms) to record for. Default: None records the entire simulation in one file. Options: number records the simulation into multiple files split at number ms.

Returns

data – If output is True, returns (pops, cells, conns, stims, simData)

Return type

tuple

netpyne.sim.wrappers.createSimulateAnalyzeDistributed(netParams, simConfig, output=False, filename=None, includeLFP=True)[source]

Wrapper function to run a simulation saving data in each node

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

  • filename (str) – name of saved data files. Default: None uses the name of the simulation.

  • dataDir (str) – name of directory to save data to. Default: None uses the simulation name.

  • includeLFP (bool) – whether or not to include LFP data Default: True includes LFP data if available.

Returns

data – If output is True, returns (pops, cells, conns, stims, simData)

Return type

tuple

netpyne.sim.wrappers.load(filename, simConfig=None, output=False, instantiate=True, instantiateCells=True, instantiateConns=True, instantiateStims=True, instantiateRxD=True, createNEURONObj=True)[source]

Wrapper function to load a simulation from file

Parameters
  • filename (str) – name of data file to load. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: None uses the current simConfig.

  • output (bool) – whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

  • instantiate (bool) – whether or not to instantiate the model. Default: True instantiates the model.

  • instantiateCells (bool) – whether or not to instantiate the cells. Default: True instantiates the cells.

  • instantiateConns (bool) – whether or not to instantiate the connections. Default: True instantiates the connections.

  • instantiateStims (bool) – whether or not to instantiate the stimulations. Default: True instantiates the stimulations.

  • instantiateRxD (bool) – whether or not to instantiate the reaction-diffusion. Default: True instantiates the reaction-diffusion.

  • createNEURONObj (bool) – whether or not to create NEURON objects for the simulation. Default: True creates NEURON objects.

Returns

data – If output is True, returns (pops, cells, conns, stims, rxd, simData)

Return type

tuple

netpyne.sim.wrappers.loadSimulate(filename, simConfig=None, output=False)[source]

Wrapper function to load a simulation from file and simulate it

Parameters
  • filename (str) – name of data file to load. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: None uses the current simConfig.

  • output (bool) – whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

Returns

data – If output is True, returns (pops, cells, conns, stims, rxd, simData)

Return type

tuple

netpyne.sim.wrappers.loadSimulateAnalyze(filename, simConfig=None, output=False)[source]

Wrapper function to load a simulation from file and simulate and anlyze it

Parameters
  • filename (str) – name of data file to load. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: None uses the current simConfig.

  • output (bool) – whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

Returns

data – If output is True, returns (pops, cells, conns, stims, simData)

Return type

tuple

netpyne.sim.wrappers.createExportNeuroML2(netParams=None, simConfig=None, output=False, reference=None, connections=True, stimulations=True, format='xml')[source]

Wrapper function create and export a NeuroML2 simulation

Parameters
  • netParams (netParams object) – NetPyNE netParams object specifying network parameters. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

  • output (bool) – Whether or not to return output from the simulation. Default: False does not return anything. Options: True returns output.

  • reference (str) – Will be used for id of the network

  • connections (bool) – Should connections also be exported? Default: True

  • stimulations (bool) – Should stimulations (current clamps etc) also be exported? Default: True

  • format (str) – Which format, xml or hdf5 Default: 'xml' Options: 'xml' Export as XML format 'hdf5' Export as binary HDF5 format

Returns

data – If output is True, returns (pops, cells, conns, stims, rxd, simData)

Return type

tuple

netpyne.sim.wrappers.importNeuroML2SimulateAnalyze(fileName, simConfig)[source]

Wrapper function to import, simulate, and analyze from a NeuroML2 file

Parameters
  • filename (str) – name of data file to load. Default: required.

  • simConfig (simConfig object) – NetPyNE simConfig object specifying simulation configuration. Default: required.

netpyne.sim.wrappers.runSimIntervalSaving(interval=1000)[source]

Wrapper function to run a simulation while saving data at intervals