Skip to content

Commit cb8841c

Browse files
ghisvailtclose
authored andcommitted
ENH: Use explicit name for image type argument in FAST (#62)
Use T1, T2 and PD and convert to 1, 2, 3 under the hood.
1 parent 45177d4 commit cb8841c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/pydra/tasks/fsl/fast.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ class FASTSpec(pydra.specs.ShellSpec):
2828
}
2929
)
3030

31-
image_type: int = attrs.field(
32-
default=1,
31+
image_type: str = attrs.field(
32+
default="T1",
3333
metadata={
34-
"help_string": "type of input image(s) (1: T1, 2: T2, 3: PD)",
34+
"help_string": "type of input image (T1, T2 or PD)",
3535
"argstr": "-t",
36-
"allowed_values": {1, 2, 3},
36+
"allowed_values": {"T1", "T2", "PD"},
37+
"formatter": lambda image_type: "-t {:d}".format({"T1": 1, "T2": 2, "PD": 3}.get(image_type)),
3738
},
3839
)
3940

0 commit comments

Comments
 (0)