netpyne.sim.wrappers module
Module containing wrappers to create, load, simulate, analyze networks
- 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
isTrue
, returns(pops, cells, conns, rxd, stims, simData)
- Return type:
tuple
- 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.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
isTrue
, 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
isTrue
, 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 atnumber
ms.
- Returns:
data – If
output
isTrue
, 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
isTrue
, 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 currentsimConfig
.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
isTrue
, 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 currentsimConfig
.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
isTrue
, 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 currentsimConfig
.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
isTrue
, 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
isTrue
, 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.