Readded the try except block to shifted_correlation.
This commit is contained in:
parent
a1d0cee510
commit
8146a9b270
@ -192,13 +192,22 @@ def shifted_correlation(
|
||||
)
|
||||
else:
|
||||
pool = ProcessPool(nodes=nodes)
|
||||
try:
|
||||
result = np.array(
|
||||
pool.map(partial(get_correlation, idx=idx, selector=selector), start_frames)
|
||||
pool.map(
|
||||
partial(get_correlation, idx=idx, selector=selector), start_frames
|
||||
)
|
||||
)
|
||||
except Exception:
|
||||
logger.warning(
|
||||
"WARNING: Something went wrong during multiprocessing "
|
||||
"in shifted_correlation."
|
||||
)
|
||||
finally:
|
||||
pool.terminate()
|
||||
pool.restart()
|
||||
|
||||
if average == True:
|
||||
if average:
|
||||
clean_result = []
|
||||
for entry in result:
|
||||
if np.all(entry == 0):
|
||||
|
Loading…
Reference in New Issue
Block a user