# -*- coding: utf-8 -*- """ Class for reading/writing analog signals in a text file. Each column represents an AnalogSignal. All AnalogSignals have the same sampling rate. Covers many case when part of a file can be viewed as a CSV format. Supported : Read/Write Author: sgarcia """ import csv import os import numpy as np import quantities as pq from neo.io.baseio import BaseIO from neo.core import AnalogSignal, Segment class AsciiSignalIO(BaseIO): """ Class for reading signal in generic ascii format. Columns respresents signals. They all share the same sampling rate. The sampling rate is externally known or the first columns could hold the time vector. Usage: >>> from neo import io >>> r = io.AsciiSignalIO(filename='File_asciisignal_2.txt') >>> seg = r.read_segment() >>> print seg.analogsignals [