Skip to content

Commit fc5770c

Browse files
committed
Keep tpattern sample within TR in slice timing test
3dTshift rejects offsets >= TR. The sample list 0.1*i overflowed TR=2.0s once num_slices > 20.
1 parent 8a7cafa commit fc5770c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/integration/functional/test_stc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def test_slice_timing_tpattern_list(test_subject: TestSubjectData) -> None:
2525
"""Test that tpattern accepts a list of slice timing offsets."""
2626
num_slices = nifti_num_slices(test_subject.bold)
2727

28-
# sample tpattern based on total slices
29-
tpattern = [0.1 * i for i in range(num_slices)]
28+
# sample tpattern based on total slices, kept within [0, tr)
29+
tpattern = [round(i * 2.0 / num_slices, 4) for i in range(num_slices)]
3030
corrected = slice_timing_correction(
3131
in_file=test_subject.bold, tr=2.0, tpattern=tpattern
3232
)

0 commit comments

Comments
 (0)