Skip to content

Commit 8447e31

Browse files
committed
fixup! 👔 Resequence motion
1 parent ca554ba commit 8447e31

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

CPAC/func_preproc/func_motion.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,19 +1005,17 @@ def stack_motion_blocks(
10051005
rpool: "ResourcePool",
10061006
) -> list[NodeBlockFunction | list[NodeBlockFunction]]:
10071007
"""Create a stack of motion correction nodeblocks."""
1008-
func_motion_blocks: list[NodeBlockFunction | list[NodeBlockFunction]] = (
1009-
[motion_estimate_filter]
1010-
if rpool.check_rpool("desc-movementParameters_motion")
1011-
else [
1012-
*get_motion_refs,
1013-
func_motion_estimates,
1014-
motion_estimate_filter,
1015-
]
1016-
)
1008+
func_blocks["motion"] = []
1009+
if not rpool.check_rpool("motion-basefile"):
1010+
func_blocks["motion"].extend(get_motion_refs)
1011+
assert calc_motion_stats.inputs
1012+
if not all(rpool.check_rpool(resource) for resource in calc_motion_stats.inputs):
1013+
func_blocks["motion"].append(func_motion_estimates)
1014+
func_blocks["motion"].append(motion_estimate_filter)
10171015
return [
10181016
*func_blocks["init"],
10191017
*func_blocks["preproc"],
1020-
*func_motion_blocks,
1018+
*func_blocks["motion"],
10211019
func_motion_correct,
10221020
*func_blocks["mask"],
10231021
calc_motion_stats,

0 commit comments

Comments
 (0)