# -*- coding: utf-8 -*- """ Classe for reading/writing SpikeTrains in a text file. It is the simple case where different spiketrains are written line by line. Supported : Read/Write Author: sgarcia """ import os import numpy as np import quantities as pq from neo.io.baseio import BaseIO from neo.core import Segment, SpikeTrain class AsciiSpikeTrainIO(BaseIO): """ Class for reading/writing SpikeTrains in a text file. Each Spiketrain is a line. Usage: >>> from neo import io >>> r = io.AsciiSpikeTrainIO( filename = 'File_ascii_spiketrain_1.txt') >>> seg = r.read_segment() >>> print seg.spiketrains # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE [