Fixed da stimulus generation and odin question file
This commit is contained in:
+3
-2
@@ -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,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?
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user