Skip to content

Commit

Permalink
Merge pull request #1112 from nipreps/fix/qi2-calculation-protection
Browse files Browse the repository at this point in the history
FIX: Add protection for NaNs and INFs when calculating QI2
  • Loading branch information
oesteban committed Apr 17, 2023
2 parents 8fd60ca + 0fc303b commit b9f065a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mriqc/qc/anatomical.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def art_qi2(
# S. Ogawa was born
np.random.seed(1191935)

data = img[airmask > 0]
data = np.nan_to_num(img[airmask > 0], posinf=0.0)
data[data < 0] = 0

# Write out figure of the fitting
Expand Down

0 comments on commit b9f065a

Please sign in to comment.