def __init__(self, pha_f, pha_kind, pha_meth, pha_cycle, amp_f, amp_kind, amp_meth, amp_cycle, sf, npts, window, width, step, time, **kwargs): # Define windows and frequency : self._pha = fextract(kind=pha_kind, method=pha_meth, cycle=pha_cycle, **kwargs) self._amp = fextract(kind=amp_kind, method=amp_meth, cycle=amp_cycle, **kwargs) self._window, xvec = _manageWindow(npts, window=window, width=width, step=step, time=time) self._pha.f, _, _ = _manageFrequencies(pha_f, split=None) self._amp.f, _, _ = _manageFrequencies(amp_f, split=None) if time is None: time = np.arange(npts) if self._window is None: self._window = [(0, npts)] self.time = np.array(self._window).mean() # self.xvec = [0, npts] else: self.time = binArray(time, self._window)[0] # Get variables : self._width = width self._step = step self._nPha = len(self._pha.f) self._nAmp = len(self._amp.f) self._sf = sf self._npts = npts self._nwin = len(self._window) self.pha = [np.mean(k) for k in self._pha.f] self.amp = [np.mean(k) for k in self._amp.f]
def __init__(self, sf, npts, kind, f, baseline, norm, method, window, width, step, split, time, meanT, **kwargs): # Check the type of f: if (len(f) == 4) and isinstance(f[0], (int, float)): f = binarize(f[0], f[1], f[2], f[3], kind='list') # Manage time and frequencies: self._window, self.xvec = _manageWindow(npts, window=window, width=width, step=step, time=time) self.f, self._fSplit, self._fSplitIndex = _manageFrequencies( f, split=split) # Get variables : self._baseline = baseline self._norm = norm self._width = width self._step = step self._split = split self._nf = len(self.f) self._sf = sf self._npts = npts self.yvec = [round((k[0] + k[1]) / 2) for k in self.f] self._kind = kind self._fobj = fextract(method, kind, **kwargs) self._meanT = meanT
def __init__(self, sf, npts, kind, f, baseline, norm, method, window, width, step, split, time, meanT, **kwargs): # Check the type of f: if (len(f) == 4) and isinstance(f[0], (int, float)): f = binarize(f[0], f[1], f[2], f[3], kind='list') # Manage time and frequencies: self._window, self.xvec = _manageWindow( npts, window=window, width=width, step=step, time=time) self.f, self._fSplit, self._fSplitIndex = _manageFrequencies( f, split=split) # Get variables : self._baseline = baseline self._norm = norm self._width = width self._step = step self._split = split self._nf = len(self.f) self._sf = sf self._npts = npts self.yvec = [round((k[0]+k[1])/2) for k in self.f] self._kind = kind self._fobj = fextract(method, kind, **kwargs) self._meanT = meanT if (self._window is not None) and (time is not None): self.xvec = binArray(time, self._window)[0] self.xvec = list(self.xvec)