Skip to content

Commit 072ac92

Browse files
committed
FIX: Specify standardization strategy in carpet plot data cleaning
Specify standardization strategy in carpet plot data cleaning: set the standardization explicitly to `zscore_sample` to keep the current strategy. Fixes: ``` nireports/tests/test_dwi.py::test_nii_to_carpetplot_data nireports/tests/test_interfaces.py::test_FMRISummary nireports/reportlets/nuisance.py:300: FutureWarning: The default strategy for standardize is currently 'zscore' which incorrectly uses population std to calculate sample zscores. The new strategy 'zscore_sample' corrects this behavior by using the sample std. In release 0.14.0, the default strategy will be replaced by the new strategy, the 'zscore' option will be removed. and using standardize=True will fall back to 'zscore_sample'. To avoid this warning, please use 'zscore_sample' instead. data = clean(data.T, t_r=tr, filter=False).T ``` raised for example at: https://github.com/nipreps/nireports/actions/runs/22579217636/job/65406364989#step:14:342
1 parent f6d58b0 commit 072ac92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nireports/reportlets/nuisance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def plot_carpet(
304304
if detrend:
305305
from nilearn.signal import clean
306306

307-
data = clean(data.T, t_r=tr, filter=False).T
307+
data = clean(data.T, t_r=tr, filter=False, standardize="zscore_sample").T
308308

309309
# We want all subplots to have the same dynamic range
310310
vminmax = np.percentile(data[:, drop_trs:], [2, 98])

0 commit comments

Comments
 (0)