This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from expyfun.stimuli import convolve_hrtf | |
import scipy.signal as sig | |
import matplotlib.pyplot as plt | |
plt.ion | |
fs = 44100 * 4 | |
plt.figure() | |
plt.subplot(211) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() | |
rand = np.random.RandomState() | |
rms = lambda x, axis=-1: np.sqrt((x ** 2).sum(axis=axis)) | |
ms = lambda x, axis=-1: (x ** 2).sum(axis=axis) | |
# bootstrap to guess SNR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expyfun | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() | |
n_iter = 1000 | |
times = np.zeros(n_iter) | |
with expyfun.ExperimentController('wait_test', output_dir=None, participant='', | |
session='') as ec: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import expyfun | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() | |
wait_times = np.array([1, 10, 30]) * 1e-3 | |
n_waits = len(wait_times) | |
n_iter = 1000 | |
times = np.zeros((n_waits, n_iter)) |