report progress
This commit is contained in:
parent
0358e7343b
commit
0774e12169
|
@ -743,7 +743,7 @@ class DADF5():
|
||||||
'label': '|{}|_{}'.format(x['label'],o),
|
'label': '|{}|_{}'.format(x['label'],o),
|
||||||
'meta': {
|
'meta': {
|
||||||
'Unit': x['meta']['Unit'],
|
'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)
|
'Creator': 'dadf5.py:add_norm v{}'.format(version)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -980,7 +980,9 @@ class DADF5():
|
||||||
|
|
||||||
groups = self.groups_with_datasets(datasets.values())
|
groups = self.groups_with_datasets(datasets.values())
|
||||||
default_arg = partial(self.job,func=func,datasets=datasets,args=args,lock=lock)
|
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
|
if not result: continue
|
||||||
lock.acquire()
|
lock.acquire()
|
||||||
with h5py.File(self.fname, 'a') as f:
|
with h5py.File(self.fname, 'a') as f:
|
||||||
|
|
Loading…
Reference in New Issue