bmtk.utils.io package#
Submodules#
bmtk.utils.io.cell_vars module#
- class bmtk.utils.io.cell_vars.CellVarRecorder(file_name, tmp_dir, variables, buffer_data=True, mpi_rank=0, mpi_size=1, **kwargs)[source]#
Bases:
object
Used to save cell membrane variables (V, Ca2+, etc) to the described hdf5 format.
For parallel simulations this class will write to a seperate tmp file on each rank, then use the merge method to combine the results. This is less efficent, but doesn’t require the user to install mpi4py and build h5py in parallel mode. For better performance use the CellVarRecorderParallel class instead.
- class DataTable(var_name)[source]#
Bases:
object
A small struct to keep track of different */data (and buffer) tables
- property dt#
- property is_initialized#
- record_cell(gid, var_name, seg_vals, tstep)[source]#
Record cell parameters.
- Parameters:
gid – gid of cell.
var_name – name of variable being recorded.
seg_vals – list of all segment values
tstep – time step
- record_cell_block(gid, var_name, seg_vals)[source]#
Save cell parameters one block at a time
- Parameters:
gid – gid of cell.
var_name – name of variable being recorded.
seg_vals – A vector/matrix of values being recorded
- property tstart#
- property tstop#
- class bmtk.utils.io.cell_vars.CellVarRecorderParallel(file_name, tmp_dir, variables, buffer_data=True, **kwargs)[source]#
Bases:
CellVarRecorder
Unlike the parent, this take advantage of parallel h5py to writting to the results file across different ranks.
bmtk.utils.io.firing_rates module#
bmtk.utils.io.ioutils module#
bmtk.utils.io.spike_trains module#
- class bmtk.utils.io.spike_trains.DFIndexedGIDs(spikes_input_h5)[source]#
Bases:
SONATAIndexer
- class bmtk.utils.io.spike_trains.DictIndexedGIDs(spikes_input_h5)[source]#
Bases:
SONATAIndexer
- class bmtk.utils.io.spike_trains.HDF5IndexedGIDs(spikes_input_h5)[source]#
Bases:
SONATAIndexer
- class bmtk.utils.io.spike_trains.PoissonSpikesGenerator(gids, firing_rate, tstart=0.0, tstop=1000.0)[source]#
Bases:
object
- class bmtk.utils.io.spike_trains.SpikeTrainWriter(tmp_dir, mpi_rank=0, mpi_size=1)[source]#
Bases:
object
- class bmtk.utils.io.spike_trains.SpikesInputCSV(name, module, input_type, params)[source]#
Bases:
SpikesInput
- class bmtk.utils.io.spike_trains.SpikesInputH5(name, module, input_type, params)[source]#
Bases:
SpikesInput
- property gids#
- property timestamps#
- class bmtk.utils.io.spike_trains.SpikesInputNWBv1(name, module, input_type, params)[source]#
Bases:
SpikesInput
- class bmtk.utils.io.spike_trains.UnindexedGIDs(spikes_input_h5)[source]#
Bases:
SONATAIndexer