Skip to content
Snippets Groups Projects
Commit 336ee16e authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Apply focus metric filters on unflattened arrays

parent 9161ccbf
No related branches found
No related tags found
No related merge requests found
......@@ -113,11 +113,11 @@ def export_3d_patches_with_focus_metrics(
'max_sobel': lambda x: np.max(sobel(x)),
'rms_sobel': lambda x: sqrt(np.mean(sobel(x) ** 2)),
'entropy': lambda x: shannon_entropy(x),
'moment': lambda x: moment(x, moment=2),
'moment': lambda x: moment(x.flatten(), moment=2),
}
dd = {}
for zi in range(0, nz):
spf = zs[:, :, :, zi].flatten()
spf = zs[:, :, :, zi]
dd[zi] = {k: me[k](spf) for k in me.keys()}
return dd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment