Skip to content

Commit 1fd65eb

Browse files
mariomario
authored andcommitted
ensure that passing a stimulus does nt run into problems for convolution
1 parent 2584db4 commit 1fd65eb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

code/python/cni_toolbox/pRF.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,14 @@ def set_hrf(self, hrf):
186186
axis = 0)
187187

188188
def set_stimulus(self, stimulus):
189-
189+
self.stimulus = np.zeros((self.n_samples + self.l_hrf,
190+
self.n_total))
190191
if stimulus.ndim==3:
191-
self.stimulus = np.reshape(stimulus,
192+
self.stimulus[0:self.n_samples,:] = np.reshape(stimulus,
192193
(self.w_stimulus * self.h_stimulus,
193194
self.n_samples))
194195
else:
195-
self.stimulus = stimulus
196+
self.stimulus[0:self.n_samples,:] = stimulus
196197

197198
def import_stimulus(self):
198199

0 commit comments

Comments
 (0)