Skip to content

Commit bdc5295

Browse files
committed
Fix inner window mean (closes #142)
1 parent 737e0f4 commit bdc5295

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spectral/algorithms/spatial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ def __call__(self, image, rslice=(None,), cslice=(None,)):
472472
mean_out = np.mean(image[outer[0]: outer[1],
473473
outer[2]: outer[3]].reshape(-1, B),
474474
axis=0)
475-
mean_in = np.mean(image[outer[0]: outer[1],
476-
outer[2]: outer[3]].reshape(-1, B),
475+
mean_in = np.mean(image[inner[0]: inner[1],
476+
inner[2]: inner[3]].reshape(-1, B),
477477
axis=0)
478478
mean = mean_out * (float(N_tot) / (N_tot - N_in)) - \
479479
mean_in * (float(N_in) / (N_tot - N_in))

0 commit comments

Comments
 (0)