single_cell_parserwriterwrite_presynaptic_spike_times

write_presynaptic_spike_times

single_cell_parser.writer.write_presynaptic_spike_times(fname=None, cells=None)

Write cell type, presynaptic cell ID and spike times of all connected presynaptic point cells.

Parameters:
  • fname (str) – The name of the file to write to.

  • cells (dict) – A dictionary with cell types as keys and lists of cells as values.

Returns:

None. Writes out the presynaptic spike times file to fname.

Example

>>> cells = {'cell\_type\_1': [cell1, cell2], 'cell\_type\_2': [cell3]}
>>> write\_presynaptic\_spike\_times('presynaptic\_spikes.param', cells)
>>> presynaptic\_spikes.param
# presynaptic cell type cell ID spike times
cell\_type\_1     0       100.4,
cell\_type\_1     1
cell\_type\_2     0       30.6,205.1,500.0,