diff --git a/hippocampy/detectors.py b/hippocampy/detectors.py index e6a5863..585cd44 100644 --- a/hippocampy/detectors.py +++ b/hippocampy/detectors.py @@ -139,7 +139,7 @@ def sce( ## TO DO # check the IV from and to bool it seem wrong # incorporate the restrict to quiet period - T = np.array(T) + T = np.array(T, dtype=bool) window_len_samples = int(window_len * fs) n_cells, n_samples = T.shape @@ -159,7 +159,9 @@ def sce( ) T_sum = bn.move_sum(T, window_len_samples, axis=1) - T_sum_shuff = bn.move_sum(T_shuff, window_len_samples, axis=1) # , min_count=1 + T_sum_shuff = bn.move_sum(T_shuff, window_len_samples, axis=1) # , min_count=12 + + # we could restrict the previous vectors here # now we could to a percentile of the shuffling avg = bn.nansum(T_sum, axis=0) diff --git a/hippocampy/utils/gen_utils.py b/hippocampy/utils/gen_utils.py index b374f2d..ee8d56e 100644 --- a/hippocampy/utils/gen_utils.py +++ b/hippocampy/utils/gen_utils.py @@ -47,7 +47,7 @@ def start_stop(B: np.ndarray, axis=-1): stops: np.ndarray boolean array with True values for stops """ - B = np.array(B, dtype=bool, ndmin=2) + B = np.array(B, ndmin=2) start = np.empty_like(B, dtype=bool) stop = np.empty_like(B, dtype=bool) diff --git a/hippocampy/wavelet.py b/hippocampy/wavelet.py index f20bc8c..1c04845 100644 --- a/hippocampy/wavelet.py +++ b/hippocampy/wavelet.py @@ -88,7 +88,7 @@ def _calc_sigma(coeffs, scaling, axis): def wden( data, *, - wavelet_name="sym5", + wavelet_name="sym4", level=None, noise_est_method="sqtwolog", scaling="mln",