Skip to content

Commit

Permalink
Merge pull request #1228 from nipreps/fix/cc-snr-usemad
Browse files Browse the repository at this point in the history
ENH: Use MAD for robust estimation of sigma in the CC mask
  • Loading branch information
oesteban committed Apr 3, 2024
2 parents 3fa5bd9 + b176260 commit aff0d63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mriqc/qc/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
from __future__ import annotations

import numpy as np
from statsmodels.robust.scale import mad


def noise_b0(
Expand Down Expand Up @@ -231,7 +232,7 @@ def cc_snr(
"""

cc_mask = cc_mask > 0 # Ensure it's a boolean mask
std_signal = in_b0[cc_mask].std()
std_signal = mad(in_b0[cc_mask])

cc_snr_estimates = {}

Expand Down

0 comments on commit aff0d63

Please sign in to comment.