Skip to content

Commit d63bb67

Browse files
author
IvanARashid
committed
Signal normalization with the mean of all b0's for osipi_fit_full_volume()
1 parent 0189930 commit d63bb67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/wrappers/OsipiBase.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ def osipi_fit_full_volume(self, data, bvalues=None, **kwargs):
146146
for key in self.result_keys:
147147
results[key] = np.empty(list(data.shape[:-1]))
148148

149-
normalization_factors = np.array([data[..., 0] for i in range(data.shape[-1])])
149+
b0_indices = np.where(bvalues == 0)[0]
150+
b0_mean = np.mean(data[..., b0_indices], axis=-1)
151+
152+
normalization_factors = np.array([b0_mean for i in range(data.shape[-1])])
150153
normalization_factors = np.moveaxis(normalization_factors, 0, -1)
151154
data_normalized = data/normalization_factors
152155

0 commit comments

Comments
 (0)