single_cell_parserwriterwrite_PSTH

write_PSTH

single_cell_parser.writer.write_PSTH(fname=None, PSTH=None, bins=None)

Write PSTH and time bins of PSTH,

Bins contain left and right end of each bin, i.e. len(bins) = len(PSTH) + 1

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

  • PSTH (list) – A list of PSTH values.

  • bins (list) – A list of time bins, including begin and end

Returns:

None. Writes out the PSTH file to fname.

Example

>>> PSTH = [1, 1, 2]
>>> bins = [0.0, 0.1, 0.2, 0.3]
>>> write\_PSTH('PSTH.param', PSTH, bins)
>>> PSTH.param
# bin begin     bin end APs/trial/bin
0.0     0.1     1
0.1     0.2     1
0.2     0.3     2