Fixed da stimulus generation and odin question file

This commit is contained in:
2019-02-18 08:41:09 +00:00
parent 5f554dcdc8
commit aa2f0c677e
3 changed files with 4 additions and 4 deletions
+3 -2
View File
@@ -14,6 +14,8 @@ 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
@@ -32,8 +34,7 @@ def gen_da_stim(n, outpath):
idx = np.arange(y_l.size)
trigger = gen_trigger(idx, 2., 0.01, fs)
y = np.vstack((y_l, y_r, trigger))
y = resampy.resample(y, fs, 44100).T
y = np.vstack((y_l, y_r, trigger)).T
sndio.write(outpath, y, rate = 44100, format = fmt, enc=enc)
return outpath
+1 -1
View File
@@ -1,3 +1,3 @@
1, What items did the dwarves forge?
2, Could they work in peace?
3, Who is, in fact, Gadfly?
3, Who is in fact Gadfly?
1 1, What items did the dwarves forge? 1 What items did the dwarves forge?
2 2, Could they work in peace? 2 Could they work in peace?
3 3, Who is, in fact, Gadfly? 3 Who is in fact Gadfly?
-1
View File
@@ -126,7 +126,6 @@ class EEGStoryTrainThread(BaseThread):
'''
self.wav_files = natsorted(globDir(self.stimDir, '*.wav'))
q_files = natsorted(globDir(self.stimDir, '*.csv'))
set_trace()
for wav_file, q_file in zip(self.wav_files, q_files):
q_lines = []
with open(q_file, 'r') as csvfile: