Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lab commit #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions hippocampy/detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion hippocampy/utils/gen_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion hippocampy/wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down