report progress

This commit is contained in:
Martin Diehl 2020-02-21 21:27:08 +01:00
parent 0358e7343b
commit 0774e12169
1 changed files with 4 additions and 2 deletions

View File

@ -743,7 +743,7 @@ class DADF5():
'label': '|{}|_{}'.format(x['label'],o),
'meta': {
'Unit': x['meta']['Unit'],
'Description': '{}-norm of {} {} ({})'.format(ord,t,x['label'],x['meta']['Description']),
'Description': '{}-norm of {} {} ({})'.format(o,t,x['label'],x['meta']['Description']),
'Creator': 'dadf5.py:add_norm v{}'.format(version)
}
}
@ -980,7 +980,9 @@ class DADF5():
groups = self.groups_with_datasets(datasets.values())
default_arg = partial(self.job,func=func,datasets=datasets,args=args,lock=lock)
for result in pool.imap_unordered(default_arg,groups):
util.progressBar(iteration=0,total=len(groups)-1)
for i,result in enumerate(pool.imap_unordered(default_arg,groups)):
util.progressBar(iteration=i,total=len(groups)-1)
if not result: continue
lock.acquire()
with h5py.File(self.fname, 'a') as f: