Skip to content

Commit

Permalink
Merge pull request #256 from neurodsp-tools/simb
Browse files Browse the repository at this point in the history
[BUG] - Fix bug in `sim_bursty_oscillation`
  • Loading branch information
TomDonoghue authored Mar 15, 2021
2 parents 5a45aaa + 7674199 commit 01645e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neurodsp/sim/periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def sim_oscillation(n_seconds, fs, freq, cycle='sine', phase=0, **cycle_params):
return sig


def sim_bursty_oscillation(n_seconds, fs, freq, burst_def='prob', burst_params={},
def sim_bursty_oscillation(n_seconds, fs, freq, burst_def='prob', burst_params=None,
cycle='sine', phase=0, **cycle_params):
"""Simulate a bursty oscillation.
Expand Down Expand Up @@ -151,6 +151,7 @@ def sim_bursty_oscillation(n_seconds, fs, freq, burst_def='prob', burst_params={

# Consistency fix: catch old parameters, and remap into burst_params
# This preserves the prior default values, and makes the old API work the same
burst_params = {} if not burst_params else burst_params
for burst_param in ['enter_burst', 'leave_burst']:
temp = cycle_params.pop(burst_param, 0.2)
if burst_def == 'prob' and burst_param not in burst_params:
Expand Down

0 comments on commit 01645e2

Please sign in to comment.