def __init__(self, nfft, win_step): def tfc(x): return np.dstack([spectrogram(x[:, ci], nfft, win_step) for ci in range(x.shape[1])]) BaseNode.__init__(self) self.nfft, self.win_step = nfft, win_step self.n = FeatMap(tfc)
def __init__(self, filt_design_func): """ Forward-backward filtering node. filt_design_func is a function that takes the sample rate as an argument, and returns the filter coefficients (b, a). """ BaseNode.__init__(self) self.filt_design_func = filt_design_func
def __init__(self, isi=10, reest=.5): ''' Define a SlowSphering node, with inter-stimulus interval isi in seconds which is reestimated every reest seconds. ''' self.isi = isi self.reest = reest BaseNode.__init__(self)
def __init__(self, cutoff=[0.05, 0.95]): self.cutoff = np.atleast_1d(cutoff) assert self.cutoff.size == 2 BaseNode.__init__(self)
def __init__(self, mark_to_cl, offsets): ''' In contrast to psychic.utils.slice, offsets are specified in *seconds* ''' self.mdict, self.offsets = mark_to_cl, np.asarray(offsets) BaseNode.__init__(self)
def __init__(self, factor, max_marker_delay=0): self.factor = factor self.max_marker_delay = max_marker_delay BaseNode.__init__(self)
def __init__(self, win_size, win_step, ref_point=0.5): BaseNode.__init__(self) self.win_size = win_size self.win_step = win_step self.ref_frame = int(float(ref_point) * (self.win_size - 1))
def __init__(self, ftype): BaseNode.__init__(self) self.W = None self.ftype = ftype