Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Apr 6, 2024
1 parent 14efdfb commit f453738
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MEArec/generators/recgensteps.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def chunk_uncorrelated_noise_(

if noise_color:
# iir peak filter
b_iir, a_iir = scipy.signal.iirpeak(color_peak, Q=color_q, fs=fs)
b_iir, a_iir = scipy.signal.iirpeak(color_peak, Q=color_q, fs=float(fs))
additive_noise = scipy.signal.filtfilt(b_iir, a_iir, additive_noise, axis=0, padlen=1000)
additive_noise += (
color_noise_floor
Expand Down Expand Up @@ -354,7 +354,7 @@ def chunk_distance_correlated_noise_(
additive_noise = noise_level * np.random.multivariate_normal(np.zeros(n_elec), cov_dist, size=length)
if noise_color:
# iir peak filter
b_iir, a_iir = scipy.signal.iirpeak(color_peak, Q=color_q, fs=fs)
b_iir, a_iir = scipy.signal.iirpeak(color_peak, Q=color_q, fs=float(fs))
additive_noise = scipy.signal.filtfilt(b_iir, a_iir, additive_noise, axis=0, padlen=1000)
additive_noise = additive_noise + color_noise_floor * np.std(additive_noise) * np.random.multivariate_normal(
np.zeros(n_elec), cov_dist, size=length
Expand Down

0 comments on commit f453738

Please sign in to comment.