Skip to content

Commit

Permalink
test auc filter
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Dec 10, 2024
1 parent 7b7c132 commit 56ba267
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_curated_spike_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,15 @@ def test_set_mask(csa):
with pytest.raises(ValueError):
csa.set_mask([True, True, True])


def test_auc_filter(csa):
z_scores = {'test' :np.vstack((np.ones((1,2,100)), 2*np.ones((1,2,100))))}
z_bins = {'test': np.linspace(0,100,100)}
csa.z_scores = z_scores
csa.z_bins = z_bins

csa.filter_mask(window=[20,40], filter_params={'test': {'min':-40, 'max': 30}})

assert sum(csa.mask) ==1
csa.filter_mask(window=[20,40], filter_params={'test': {'min':-40, 'max': 80}})
assert sum(csa.mask) == 0

0 comments on commit 56ba267

Please sign in to comment.