Skip to content

Commit 65e107f

Browse files
committed
sty: run black
1 parent 879a265 commit 65e107f

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

dmriprep/utils/tests/test_registration.py

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ def setup_module():
2020

2121
# Select some arbitrary chunks of data so this goes quicker
2222
subset_b0 = mean_b0[40:50, 40:50, 40:50]
23-
subset_dwi_data = nb.Nifti1Image(hardi_data[40:50, 40:50, 40:50],
24-
hardi_affine)
23+
subset_dwi_data = nb.Nifti1Image(hardi_data[40:50, 40:50, 40:50], hardi_affine)
2524
subset_t2 = MNI_T2_data[40:60, 40:60, 40:60]
2625
subset_b0_img = nb.Nifti1Image(subset_b0, hardi_affine)
2726
subset_t2_img = nb.Nifti1Image(subset_t2, MNI_T2_affine)
@@ -34,10 +33,10 @@ def setup_module():
3433
@pytest.mark.parametrize("sigmas", [[5.0, 2.5], [0.0]])
3534
@pytest.mark.parametrize("factors", [[4, 2], [1]])
3635
@pytest.mark.parametrize("params0", [np.eye(4), None])
37-
@pytest.mark.parametrize("pipeline", [["rigid"], ["affine"],
38-
["rigid", "affine"]])
39-
def test_affine_registration(nbins, sampling_prop, metric, level_iters,
40-
sigmas, factors, params0, pipeline):
36+
@pytest.mark.parametrize("pipeline", [["rigid"], ["affine"], ["rigid", "affine"]])
37+
def test_affine_registration(
38+
nbins, sampling_prop, metric, level_iters, sigmas, factors, params0, pipeline
39+
):
4140
moving = subset_b0
4241
static = subset_b0
4342
moving_affine = static_affine = np.eye(4)
@@ -52,8 +51,16 @@ def test_affine_registration(nbins, sampling_prop, metric, level_iters,
5251
# If providing nifti image objects, don't need to provide affines:
5352
moving_img = nb.Nifti1Image(moving, moving_affine)
5453
static_img = nb.Nifti1Image(static, static_affine)
55-
xformed, affine = affine_registration(moving_img, static_img, nbins,
56-
sampling_prop, metric, pipeline,
57-
level_iters, sigmas, factors,
58-
params0)
54+
xformed, affine = affine_registration(
55+
moving_img,
56+
static_img,
57+
nbins,
58+
sampling_prop,
59+
metric,
60+
pipeline,
61+
level_iters,
62+
sigmas,
63+
factors,
64+
params0,
65+
)
5966
npt.assert_almost_equal(affine[:3, :3], np.eye(3), decimal=1)

0 commit comments

Comments
 (0)