@@ -226,7 +226,7 @@ def import_stimulus(self):
226
226
227
227
def create_timecourses (self , max_radius = 10.0 , n_xy = 30 ,
228
228
min_slope = 0.1 , max_slope = 1.2 ,
229
- n_slope = 10 ):
229
+ n_slope = 10 , css_exponent = 1 , sampling = 'log' ):
230
230
'''
231
231
creates predicted timecourses based on the effective stimulus
232
232
and a range of isotropic receptive fields.
@@ -244,6 +244,10 @@ def create_timecourses(self, max_radius = 10.0, n_xy = 30,
244
244
upper bound of RF size slope (default = 1.2)
245
245
- n_slope: integer
246
246
steps from lower to upper bound (default = 10)
247
+ - css_exponent: float
248
+ compressive spatial summation (default = 1)
249
+ - sampling: string
250
+ eccentricity sampling (default = log)
247
251
'''
248
252
249
253
self .n_points = (n_xy ** 2 ) * n_slope
@@ -265,7 +269,11 @@ def create_timecourses(self, max_radius = 10.0, n_xy = 30,
265
269
266
270
n_lower = int (np .ceil (n_xy / 2 ))
267
271
n_upper = int (np .floor (n_xy / 2 ))
268
- self .ecc = np .exp (np .linspace (np .log (0.1 ), np .log (max_radius ), n_xy ))
272
+ if sampling == 'log' :
273
+ self .ecc = np .exp (np .linspace (np .log (0.1 ), np .log (max_radius ), n_xy ))
274
+ elif sampling == 'linear' :
275
+ self .ecc = np .linspace (0.1 , max_radius , n_xy )
276
+
269
277
self .pa = np .linspace (0 , (n_xy - 1 ) / n_xy * 2 * np .pi , n_xy )
270
278
self .slope = np .linspace (min_slope , max_slope , n_slope )
271
279
@@ -283,7 +291,7 @@ def create_timecourses(self, max_radius = 10.0, n_xy = 30,
283
291
sys .stdout .write ("[%-20s] %d%%"
284
292
% ('=' * i , 5 * i ))
285
293
286
- tc = np .matmul (W , self .stimulus ).transpose ()
294
+ tc = ( np .matmul (W , self .stimulus ).transpose ()) ** css_exponent
287
295
sys .stdout .write ('\r ' )
288
296
sys .stdout .write ("[%-20s] %d%%" % ('=' * 20 , 100 ))
289
297
self .tc_fft = fft (tc , axis = 0 )
@@ -313,7 +321,7 @@ def mapping(self, data, threshold = 100, mask = []):
313
321
- threshold: float
314
322
minimum voxel intensity (default = 100.0)
315
323
- mask: boolean array
316
- binary mask for selecting voxels (default = None)
324
+ binary mask for selecting voxels (default = None)
317
325
'''
318
326
data = np .reshape (data .astype (float ),
319
327
(self .n_samples ,
0 commit comments