single_cell_parser
❭ reader
❭ read_spike_times_file
read_spike_times_file¶
- single_cell_parser.reader.read_spike_times_file(fname)¶
Reads all trials and spike times within these trials.
Deprecated since version This: format is now commonly a pandas or dask dataframe. They can still be explicitly read with this function using Python’s
open()
andread()
capabilities, but this is not recommended, or efficient.- Parameters:¶
fname (str) – file of format: trial nr. activation times (comma-separated list or empty)
- Raises:¶
RuntimeError – If a trial number is found twice in the file
- Returns:¶
Dictionary with trial numbers as keys (integers), and tuples of spike times in each trial as values
- Return type:¶
dict
Example
>>> spike_file # Spike times file # trial nr. activation times (ms) 1 100.2,698.1 2 100.2,698.1,1000.0 ... >>> read_spike_times_file(spike_file) { 1: (100.2, 698.1), 2: (100.2, 698.1, 1000.0), ... }