Skip to content

Commit

Permalink
ignore some flake issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Jun 5, 2024
1 parent 2f08658 commit a9cceec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
max-line-length = 100
max-line-length = 100
ignore = E203, W503
6 changes: 3 additions & 3 deletions src/osipi/_convolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def exp_conv(T: float, t: np.ndarray, a: np.ndarray) -> np.ndarray:
n = len(t)
f = np.zeros((n,))

x = (t[1: n - 1] - t[0: n - 2]) / T
da = (a[1: n - 1] - a[0: n - 2]) / x
x = (t[1 : n - 1] - t[0 : n - 2]) / T
da = (a[1 : n - 1] - a[0 : n - 2]) / x

E = np.exp(-x)
E0 = 1 - E
E1 = x - E0

add = a[0: n - 2] * E0 + da * E1
add = a[0 : n - 2] * E0 + da * E1

for i in range(0, n - 2):
f[i + 1] = E[i] * f[i] + add[i]
Expand Down
8 changes: 4 additions & 4 deletions src/osipi/_tissue.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def tofts(

# Discard unwanted points and make sure time spacing
# is correct
ct = convolution[0: len(t)] * t[1]
ct = convolution[0 : len(t)] * t[1]
else:
# Resample at the smallest spacing
dt = np.min(np.diff(t))
Expand Down Expand Up @@ -159,7 +159,7 @@ def tofts(
# Discard unwanted points and make sure time spacing
# is correct
ct_resampled = (
convolution[0: len(t_resampled)] * t_resampled[1]
convolution[0 : len(t_resampled)] * t_resampled[1]
)

# Restore time grid spacing
Expand Down Expand Up @@ -307,7 +307,7 @@ def extended_tofts(

# Discard unwanted points, make sure time spacing is
# correct and add vp*ca term for extended model
ct = convolution[0: len(t)] * t[1] + (vp * ca)
ct = convolution[0 : len(t)] * t[1] + (vp * ca)
else:
# Resample at the smallest spacing
dt = np.min(np.diff(t))
Expand Down Expand Up @@ -336,7 +336,7 @@ def extended_tofts(
# Discard unwanted points, make sure time spacing is
# correct and add vp*ca term for extended model
ct_resampled = convolution[
0: len(t_resampled)
0 : len(t_resampled)
] * t_resampled[1] + (vp * ca_resampled)

# Restore time grid spacing
Expand Down

0 comments on commit a9cceec

Please sign in to comment.