Skip to content

Instantly share code, notes, and snippets.

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)
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
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:
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))