Skip to content

Commit

Permalink
soften is_otf criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Mar 8, 2019
1 parent 18a136f commit da54e65
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pycudadecon/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ def array_is_otf(arr):
"""
if arr.dtype != "float32":
return False
if arr.shape[0] > arr.shape[1]:
return False
# if arr.shape[0] > arr.shape[1]:
# return False

# the first pixel of an OTF will always be 1.0 and the second column 0s
if arr[0, 0] == 1 and (not arr[:, 1].any()):
# too strict? arr[0, 0] == 1
if not arr[:, 1].any():
return True
else:
print(arr)
print("FALSE 4")
return False


def path_is_otf(fpath):
Expand Down

0 comments on commit da54e65

Please sign in to comment.