@@ -83,7 +83,7 @@ def make_video_file(filename, codec='mpeg4', rate=25.): # mpeg4 mjpeg libx264
83
83
#~ ax.set_title()
84
84
#~ line.set_markersize(i)
85
85
fig .canvas .draw ()
86
- one_img = np .frombuffer (fig .canvas .tostring_rgb (), dtype = 'u1' ). reshape ( h , w , 3 )
86
+ one_img = np .asarray (fig .canvas .buffer_rgba ())[:,:,: 3 ]
87
87
one_img = one_img [:,:,::- 1 ].copy ()
88
88
#~ one_img = one_img .swapaxes(0,1).copy()
89
89
@@ -158,10 +158,10 @@ def get_tdt_test_files():
158
158
# from neo.utils import download_dataset
159
159
# local_folder = download_dataset(remote_path='tdt/aep_05')
160
160
# return str(local_folder)
161
-
161
+
162
162
# we use old implementation with http
163
163
url_for_tests = "https://web.gin.g-node.org/NeuralEnsemble/ephy_testing_data/raw/master/"
164
-
164
+
165
165
files_to_download = [
166
166
'tdt/aep_05/Block-1/aep_05_Block-1.Tbk' ,
167
167
'tdt/aep_05/Block-1/aep_05_Block-1.Tdx' ,
@@ -170,7 +170,7 @@ def get_tdt_test_files():
170
170
]
171
171
172
172
local_folder = Path .home () / 'ephy_testing_data_http'
173
-
173
+
174
174
for file in files_to_download :
175
175
localfile = local_folder / file
176
176
distantfile = url_for_tests + file
@@ -179,7 +179,7 @@ def get_tdt_test_files():
179
179
dist = urlopen (distantfile )
180
180
with open (localfile , 'wb' ) as f :
181
181
f .write (dist .read ())
182
-
182
+
183
183
tdt_folder = str (local_folder / 'tdt' / 'aep_05' )
184
184
return tdt_folder
185
185
@@ -192,7 +192,7 @@ def get_blackrock_files():
192
192
]
193
193
194
194
local_folder = Path .home () / 'ephy_testing_data_http'
195
-
195
+
196
196
for file in files_to_download :
197
197
localfile = local_folder / file
198
198
distantfile = url_for_tests + file
@@ -201,13 +201,6 @@ def get_blackrock_files():
201
201
dist = urlopen (distantfile )
202
202
with open (localfile , 'wb' ) as f :
203
203
f .write (dist .read ())
204
-
204
+
205
205
filename = str (local_folder / 'blackrock' / 'FileSpec2.3001' )
206
206
return filename
207
-
208
-
209
-
210
-
211
-
212
-
213
-
0 commit comments