Skip to content

Commit 1f8217a

Browse files
committed
revert to previous code
1 parent 9aaa549 commit 1f8217a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

suite2p/io/utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,21 @@ def get_nd2_list(ops):
166166
""" make list of nd2 files to process
167167
if ops['look_one_level_down'], then all nd2's in all folders + one level down
168168
"""
169+
froot = ops['data_path']
169170
fold_list = ops['data_path']
170171
fsall = []
171-
first_nd2s = []
172-
for _, fld in enumerate(fold_list):
173-
fs, fnd2s = list_files(fld, ops['look_one_level_down'],
172+
nfs = 0
173+
first_tiffs = []
174+
for k,fld in enumerate(fold_list):
175+
fs, ftiffs = list_files(fld, ops['look_one_level_down'],
174176
["*.nd2"])
175177
fsall.extend(fs)
176-
first_nd2s.extend(list(fnd2s))
178+
first_tiffs.extend(list(ftiffs))
177179
if len(fs)==0:
178180
print('Could not find any nd2 files')
179181
raise Exception('no nd2s')
180182
else:
181-
ops['first_tiffs'] = np.array(first_nd2s).astype('bool')
183+
ops['first_tiffs'] = np.array(first_tiffs).astype('bool')
182184
print('** Found %d nd2 files - converting to binary **'%(len(fsall)))
183185
return fsall, ops
184186

0 commit comments

Comments
 (0)