Skip to content

Commit f7ff2a3

Browse files
authored
Merge pull request #16 from mjt320/develop
*roi_measure* exclude NaNs when calculating percentiles
2 parents e6cf0f5 + 5ef84bc commit f7ff2a3

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Most functionality is demonstrated in Jupyter notebook format in ./demo
4242
---
4343

4444
### Updates
45+
Release 1.1.1 - *roi_measure* exclude NaNs when calculating percentiles
4546
Release 1.1.0 - *roi_measure* modified to generate more ROI statistics
4647
Release 1.0.3 - Add exception handling for some zero/negative inputs.
4748
Release 1.0.2 - Changed AIF interpolation method to linear to further reduce oscillations.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "sepal"
9-
version = "1.1.0"
9+
version = "1.1.1"
1010
description = "Quantitative MRI processing"
1111
readme = "README.md"
1212
authors = [{ name = "Michael Thrippleton", email = "mjt320@googlemail.com" }]

src/sepal/utils/imaging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def roi_measure(image, mask_image):
9696
# measure statistics for masked voxels
9797
masked_voxels = data_2d[mask_1d == 1, :]
9898
stats = [(np.nanmean(m_d), np.nanmedian(m_d), np.nanstd(m_d), np.nanmin(m_d), np.nanmax(m_d),
99-
np.percentile(m_d, 25), np.percentile(m_d, 75))
99+
np.nanpercentile(m_d, 25), np.nanpercentile(m_d, 75))
100100
for m_d in masked_voxels.transpose()]
101101
mean, median, sd, mini, maxi, pct25, pct75 = zip(*stats)
102102

0 commit comments

Comments
 (0)