Updated da generation script

This commit is contained in:
2019-03-20 14:17:00 +00:00
parent aa2f0c677e
commit bfc254d2ae
+2 -2
View File
@@ -14,8 +14,6 @@ import resampy
def gen_da_stim(n, outpath):
da_file = './BioMAP_da-40ms.wav'
da_stim, fs, enc, fmt = sndio.read(da_file, return_format=True)
da_stim = resampy.resample(da_stim, fs, 44100)
fs = 44100
prestim_size = 0.0158
# Repetition rate in Hz
repetition_rate = 10.9
@@ -29,6 +27,8 @@ def gen_da_stim(n, outpath):
y_2part = np.concatenate([y_part, y_part_inv])
y_r = np.tile(y_2part, n)
y_r = np.insert(y_r, 0, np.zeros(fs))
y_r = resampy.resample(y_r, fs, 44100)
fs = 44100
y_l = np.zeros(y_r.size)
idx = np.arange(y_l.size)