Exemplo n.º 1
0
    def __init__(self, cscSignal, sampleFreq, tags={}, header=None):

        signal.__init__(
            self, tags=tags, header=header
        )  # NOTE: possiblity of name clashes! AnalogSignal ahs an Attribute signal!
        self.sampleFreq = sampleFreq  # [Hz]
        dt = 1000. / sampleFreq  # [ms] expects sampling frequency in [Hz]

        NTsig.AnalogSignal.__init__(self, cscSignal, dt)
Exemplo n.º 2
0
    def __init__(self, fileName):
        signal.__init__(self)
        self.inputParams = io._read_metadata(fileName)
        for key in self.inputParams.keys():              # convert dictionary to variables of the inputSignals object
            exec 'self.'+key+'='+str(self.inputParams[key])

        self.fileName=fileName
        self.inputs=[]
        self.loadInputs(fileName)
        self.numInputs=self.inputs.__len__()
        self.timeOffset=0.0
Exemplo n.º 3
0
 def __init__(self, fileName=None, timeUnit='ms', **kwargs):
     signal.__init__(self)
     self.timeUnit = timeUnit
     if fileName:
         data=numpy.loadtxt(fileName)
         data=numpy.hstack((data[:,[1]], data[:,[0]]))     # swap left and right columns in data, necessary to use SpikeList.__init__ properly
         data=[tuple(t) for t in data]
         self.meta = io._read_metadata(fileName)
         NTsig.SpikeList.__init__(self, data, range(self.meta['first_id'], self.meta['last_id']+1))
     else:
         NTsig.SpikeList.__init__(self, [], [], t_start=kwargs['t_start'],\
             t_stop=kwargs['t_stop'], dims=kwargs['dims'])
Exemplo n.º 4
0
 def __init__(self):
     signal.__init__(self)
     NTsig.AnalogSignalList.__init__(self, [], [], 1.)
Exemplo n.º 5
0
 def __init__(self, spike_times, timeUnit='ms'):
     signal.__init__(self)
     NTsig.SpikeTrain.__init__(self, spike_times)
Exemplo n.º 6
0
 def __init__(self, spike_times, spiketrain_type='', t_start=None, t_stop=None, timeUnit='ms'):
     signal.__init__(self)
     NTsig.SpikeTrain.__init__(self, spike_times, t_start=None, t_stop=None)
     self.spiketrain_type = spiketrain_type          # e.g. '' (empty), rightward, leftward