Exemplo n.º 1
0
    def downsample(self, factor):
        self.data = sig.downsample(self.data, factor)
        self.markers = sig.downsample(self.markers, factor)

        self.sampRate /= float(factor)
        self.nObs = self.data.shape[0]
        self.nSec = self.nObs / float(self.sampRate)

        return self
Exemplo n.º 2
0
    def decimate(self, factor, *args, **kwargs):
        self.data = sig.decimate(self.data, factor, *args, **kwargs)
        self.markers = sig.downsample(self.markers, factor)

        self.sampRate /= float(factor)
        self.nObs = self.data.shape[0]
        self.nSec = self.nObs / float(self.sampRate)

        return self
Exemplo n.º 3
0
Arquivo: seg.py Projeto: idfah/cebl
    def downsample(self, factor):
        self.data = np.asarray([sig.downsample(seg, factor) for seg in self.data],
                                   dtype=self.dtype)

        self.sampRate /= float(factor)
        self.nObs = self.data.shape[1]
        self.nSec = self.nObs / float(self.sampRate)

        self.setStart()

        return self
Exemplo n.º 4
0
Arquivo: seg.py Projeto: idfah/cebl
    def resample(self, factorDown, factorUp=1, interpKwargs=dict(), **decimKwargs):
        self.data = np.asarray(
            [sig.resample(seg, factorDown=factorDown, factorUp=factorUp,
                          interpKwargs=interpKwargs, **decimKwargs)
             for seg in self.data], dtype=self.dtype)

        self.markers = sig.upsample(self.markers, factorUp)
        self.markers = sig.downsample(self.markers, factorDown)

        self.sampRate *= float(factorUp)
        self.sampRate /= float(factorDown)
        self.nObs = self.data.shape[1]
        self.nSec = self.nObs / float(self.sampRate)

        self.setStart()

        return self
Exemplo n.º 5
0
    def resample(self,
                 factorDown,
                 factorUp=1,
                 interpKwargs=dict(),
                 **decimKwargs):
        self.data = sig.resample(self.data,
                                 factorDown,
                                 factorUp,
                                 interpKwargs=interpKwargs,
                                 **decimKwargs)

        self.markers = sig.upsample(self.markers, factorUp)
        self.markers = sig.downsample(self.markers, factorDown)

        self.sampRate *= float(factorUp)
        self.sampRate /= float(factorDown)
        self.nObs = self.data.shape[0]
        self.nSec = self.nObs / float(self.sampRate)

        return self