bmtk.simulator.bionet.modules package¶
Submodules¶
bmtk.simulator.bionet.modules.ecp module¶
- class bmtk.simulator.bionet.modules.ecp.EcpMod(tmp_dir, file_name, electrode_positions, contributions_dir=None, cells=None, variable_name='v', electrode_channels=None, cell_bounds=None)[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
- finalize(sim)[source]¶
Call once at the very end of the simulation.
- Parameters
sim – Simulation object
- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
bmtk.simulator.bionet.modules.record_cellvars module¶
- class bmtk.simulator.bionet.modules.record_cellvars.MembraneReport(tmp_dir, file_name, variable_name, cells=None, gids=None, sections='all', buffer_data=True, transform={}, **kwargs)[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
- finalize(sim)[source]¶
Call once at the very end of the simulation.
- Parameters
sim – Simulation object
- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
- class bmtk.simulator.bionet.modules.record_cellvars.SomaReport(tmp_dir, file_name, variable_name, cells, sections='soma', buffer_data=True, transform={}, **kwargs)[source]¶
Bases:
bmtk.simulator.bionet.modules.record_cellvars.MembraneReportSpecial case for when only needing to save the soma variable
- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep, rel_time=0.0)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
bmtk.simulator.bionet.modules.record_clamp module¶
- class bmtk.simulator.bionet.modules.record_clamp.ClampReport(tmp_dir, file_name, variable_name, buffer_data=True, **kwargs)[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
- finalize(sim)[source]¶
Call once at the very end of the simulation.
- Parameters
sim – Simulation object
- initialize(sim, clamps)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
- property variable¶
bmtk.simulator.bionet.modules.record_netcons module¶
- class bmtk.simulator.bionet.modules.record_netcons.NetconReport(tmp_dir, file_name, variable_name, cells, sections='all', syn_type='Exp2Syn', buffer_data=True, transform={})[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
- finalize(sim)[source]¶
Call once at the very end of the simulation.
- Parameters
sim – Simulation object
- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
bmtk.simulator.bionet.modules.record_spikes module¶
- class bmtk.simulator.bionet.modules.record_spikes.SpikesMod(tmp_dir, spikes_file_csv=None, spikes_file=None, spikes_file_nwb=None, cache_to_disk=True, spikes_sort_order=None, mode='a')[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorModModule use for saving spikes
- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
bmtk.simulator.bionet.modules.save_synapses module¶
- class bmtk.simulator.bionet.modules.save_synapses.ConnectionWriter(network_dir)[source]¶
Bases:
object
- class bmtk.simulator.bionet.modules.save_synapses.H5Merger(network_dir, grp_keys)[source]¶
Bases:
object
- class bmtk.simulator.bionet.modules.save_synapses.SaveSynapses(network_dir, single_file=False, **params)[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod
bmtk.simulator.bionet.modules.sim_module module¶
- class bmtk.simulator.bionet.modules.sim_module.SimulatorMod[source]¶
Bases:
objectClass for writing custom bionet functions that will be called during the simulation. To use overwrite one or more of the following methods in a subclass, and bionet will call the function at the appropiate time.
- To call during a simulation:
… sim = Simulation(…) mymod = MyModule(…) sim.add_mod(mymod) sim.run()
- block(sim, block_interval)[source]¶
This method is called once after every block of time, as specified by the configuration.
Unlike the step method which is called during every time-step, the block method will typically be called only a few times over the entire simulation. The block method is preferable for accessing and saving to the disk, summing up existing data, or simular functionality
- Parameters
sim – Simulation object
block_interval – The time interval (tstep_start, tstep_end) for which the block is being called on.
- finalize(sim)[source]¶
Call once at the very end of the simulation.
- Parameters
sim – Simulation object
- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
bmtk.simulator.bionet.modules.xstim module¶
- class bmtk.simulator.bionet.modules.xstim.StimXElectrode(positions_file, waveform, mesh_files_dir, dt)[source]¶
Bases:
objectExtracellular Stimulating electrode
- class bmtk.simulator.bionet.modules.xstim.XStimMod(positions_file, waveform, mesh_files_dir=None, cells=None, set_nrn_mechanisms=True, node_set=None)[source]¶
Bases:
bmtk.simulator.bionet.modules.sim_module.SimulatorMod- initialize(sim)[source]¶
Will be called once at the beginning of the simulation run, after the network and simulation parameters have all been finalized.
- Parameters
sim – Simulation object
- step(sim, tstep)[source]¶
Called on every single time step (dt).
The step method is used for anything that should be recorded or changed continously. dt is determined during the setup, and the sim parameter can be used to access simulation, network and individual cell properties
- Parameters
sim – Simulation object.
tstep – The decrete time-step
bmtk.simulator.bionet.modules.xstim_waveforms module¶
- class bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveform[source]¶
Bases:
objectAbstraction of waveform class to ensure calculate method is implemented
- class bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformType(waveform_config)[source]¶
Bases:
objectSpecific waveform type
- class bmtk.simulator.bionet.modules.xstim_waveforms.ComplexWaveform(el_collection)[source]¶
Bases:
bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformSuperposition of simple waveforms
- class bmtk.simulator.bionet.modules.xstim_waveforms.WaveformCustom(waveform_file)[source]¶
Bases:
bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformCustom waveform defined by csv file
- class bmtk.simulator.bionet.modules.xstim_waveforms.WaveformTypeDC(waveform_config)[source]¶
Bases:
bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformType,bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformDC (step) waveform
- class bmtk.simulator.bionet.modules.xstim_waveforms.WaveformTypeSin(waveform_config)[source]¶
Bases:
bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformType,bmtk.simulator.bionet.modules.xstim_waveforms.BaseWaveformSinusoidal waveform