Skip to content

Commit

Permalink
make bursts test updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhammonds committed Sep 8, 2021
1 parent 16b22f6 commit 16bb2a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion neurodsp/tests/sim/test_periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,14 @@ def test_sim_damped_oscillation():
def test_make_bursts():

is_osc = np.array([False, False, True, True, False, True, False, True, True, False])
cycle = np.ones([10])
cycle = np.ones([100])

sig = make_bursts(N_SECONDS, FS, is_osc, cycle)
check_sim_output(sig)

# Three is added since each of the three continuous bursts are fully completed
assert sig.sum() == (is_osc.sum() * 100) + 3

# Test make bursts with uneven division of signal and cycle divisions
# In this test, there aren't enough samples in the signal to add last cycle
is_osc = np.array([False, True, True])
Expand Down

0 comments on commit 16bb2a2

Please sign in to comment.