Skip to content

Commit

Permalink
Fixed bug with spurious decimation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
ayshih committed Apr 6, 2016
1 parent d119906 commit 57445d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gripspy/science/aspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _detect_decimation(self, decimation_range):
dead1 = (self.data == 0).sum(1) == NUM_COLS
for step in range(decimation_range[0], decimation_range[1] + 1):
sub_rows = NUM_ROWS // step
dead2 = dead1[:sub_rows * step].reshape(sub_rows, step).sum(0) == sub_rows
dead2 = dead1[:sub_rows * step].reshape(sub_rows, step).max(0)
idx = np.flatnonzero(~dead2)
if len(idx) == 1:
return (step, idx[0])
Expand Down

0 comments on commit 57445d4

Please sign in to comment.