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,