def _filtering(self, fc, filt_len, num_rep, apbflag): ''' Filtering process of the membrane potential recording to remove high frequency and dc noise. Input ----- fc (double): Cut off frequency of the high pass filter. filt_len (int): Length of low pass smoothing filter num_rep (int): Number of repeats of low pass filtering ''' if apbflag: N = self._num_apbrec else: N = self._num_rec for i in range(N): temph = _dpt.highpassfilter(self.mps[i,:], fc) templ = _dpt.lowpassfilter(_np.real(temph), filt_len, num_rep) self.mps[i,:] = _np.real(templ)
def _filtering_avg(self, fc, filt_len, num_rep, apbflag): temph = _dpt.highpassfilter(self.mp, fc) templ = _dpt.lowpassfilter(_np.real(temph), filt_len, num_rep) self.mp = _np.real(templ)