@@ -28,28 +28,31 @@ class Bar(Stimulus, dj.Manual):
2828 max_res : smallint
2929 """
3030
31- cond_tables = ['Bar' ]
32- default_key = {
33- "max_res" : 1000 ,
34- "bar_width" : 4 , # degrees
35- "bar_speed" : 2 , # degrees/sec
36- "flash_speed" : 2 ,
37- "grat_width" : 10 , # degrees
38- "grat_freq" : 1 ,
39- "grid_width" : 10 ,
40- "grit_freq" : 0.1 ,
41- "style" : "checkerboard" , # checkerboard, grating
42- "direction" : 1 , # 1 for UD LR, -1 for DU RL
43- "flatness_correction" : 1 ,
44- "intertrial_duration" : 0 ,
45- }
31+ def __init__ (self ):
32+ super ().__init__ ()
33+ self .cond_tables = ['Bar' ]
34+ self .default_key = {
35+ 'axis' : 'vertical' ,
36+ "max_res" : 1000 ,
37+ "bar_width" : 4 , # degrees
38+ "bar_speed" : 2 , # degrees/sec
39+ "flash_speed" : 2 ,
40+ "grat_width" : 10 , # degrees
41+ "grat_freq" : 1 ,
42+ "grid_width" : 10 ,
43+ "grit_freq" : 0.1 ,
44+ "style" : "checkerboard" , # checkerboard, grating
45+ "direction" : 1 , # 1 for UD LR, -1 for DU RL
46+ "flatness_correction" : 1 ,
47+ "intertrial_duration" : 0 ,
48+ }
4649
4750 def setup (self ):
4851 super ().setup ()
4952 ymonsize = self .monitor .size * 2.54 / np .sqrt (1 + self .monitor .aspect ** 2 ) # cm Y monitor size
5053 monSize = [ymonsize * self .monitor .aspect , ymonsize ]
51- y_res = int (self .exp .params ['max_res' ] / self .monitor .aspect )
52- self .monRes = [self .exp .params ['max_res' ], int (y_res + np .ceil (y_res % 2 ))]
54+ y_res = int (self .exp .curr_cond ['max_res' ] / self .monitor .aspect )
55+ self .monRes = [self .exp .curr_cond ['max_res' ], int (y_res + np .ceil (y_res % 2 ))]
5356 self .FoV = np .arctan (np .array (monSize ) / 2 / self .monitor .distance ) * 2 * 180 / np .pi # in degrees
5457 self .FoV [1 ] = self .FoV [0 ] / self .monitor .aspect
5558
0 commit comments