Skip to content

Commit

Permalink
ENH: Use explicit name for image type argument in FAST (#62)
Browse files Browse the repository at this point in the history
Use T1, T2 and PD and convert to 1, 2, 3 under the hood.
  • Loading branch information
ghisvail committed Jun 30, 2023
1 parent 9dbfcdb commit 4da385c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pydra/tasks/fsl/fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ class FASTSpec(pydra.specs.ShellSpec):
}
)

image_type: int = attrs.field(
default=1,
image_type: str = attrs.field(
default="T1",
metadata={
"help_string": "type of input image(s) (1: T1, 2: T2, 3: PD)",
"help_string": "type of input image (T1, T2 or PD)",
"argstr": "-t",
"allowed_values": {1, 2, 3},
"allowed_values": {"T1", "T2", "PD"},
"formatter": lambda image_type: "-t {:d}".format({"T1": 1, "T2": 2, "PD": 3}.get(image_type)),
},
)

Expand Down

0 comments on commit 4da385c

Please sign in to comment.