Skip to content

Commit 7f8a8fa

Browse files
authored
Merge pull request #40 from LOAMRI/copilot/fix-22
Add default options to cbf, te_asl and dw_asl scripts
2 parents 2a94ac8 + 1f837b1 commit 7f8a8fa

File tree

3 files changed

+32
-24
lines changed

3 files changed

+32
-24
lines changed

asltk/scripts/cbf.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,21 @@
4343
default=os.path.expanduser('~'),
4444
help='The output folder that is the reference to save all the output images in the script. The images selected to be saved are given as tags in the script caller, e.g. the options --cbf_map and --att_map. By default, the TblGM map is placed in the output folder with the name tblgm_map.nii.gz',
4545
)
46-
required.add_argument(
46+
optional.add_argument(
4747
'--pld',
4848
type=str,
4949
nargs='+',
50-
required=True,
51-
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers',
50+
required=False,
51+
default=[170.0, 270.0, 370.0, 520.0, 670.0, 1070.0, 1870.0],
52+
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers. If not passed, the default values will be used.',
5253
)
53-
required.add_argument(
54+
optional.add_argument(
5455
'--ld',
5556
type=str,
5657
nargs='+',
57-
required=True,
58-
help='Labeling Duration trend (LD), arranged in a sequence of float numbers.',
58+
required=False,
59+
default=[100.0, 100.0, 150.0, 150.0, 400.0, 800.0, 1800.0],
60+
help='Labeling Duration trend (LD), arranged in a sequence of float numbers. If not passed, the default values will be used.',
5961
)
6062
optional.add_argument(
6163
'--verbose',

asltk/scripts/dw_asl.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,29 @@
5757
required=False,
5858
help='The ATT map that is provided to skip this step in the MultiTE-ASL calculation. If ATT is not provided, than a ATT map is calculated at the runtime.',
5959
)
60-
required.add_argument(
60+
optional.add_argument(
6161
'--pld',
6262
type=str,
6363
nargs='+',
64-
required=True,
65-
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers',
64+
required=False,
65+
default=[170.0, 270.0, 370.0, 520.0, 670.0, 1070.0, 1870.0],
66+
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers. If not passed, the default values will be used.',
6667
)
67-
required.add_argument(
68+
optional.add_argument(
6869
'--ld',
6970
type=str,
7071
nargs='+',
71-
required=True,
72-
help='Labeling Duration trend (LD), arranged in a sequence of float numbers.',
72+
required=False,
73+
default=[100.0, 100.0, 150.0, 150.0, 400.0, 800.0, 1800.0],
74+
help='Labeling Duration trend (LD), arranged in a sequence of float numbers. If not passed, the default values will be used.',
7375
)
74-
required.add_argument(
76+
optional.add_argument(
7577
'--dw',
7678
type=str,
7779
nargs='+',
78-
required=True,
79-
help='Diffusion b-values arranged in a sequence of float numbers.',
80+
required=False,
81+
default=[0, 50, 100, 250],
82+
help='Diffusion b-values arranged in a sequence of float numbers. If not passed, the default values will be used.',
8083
)
8184
optional.add_argument(
8285
'--verbose',

asltk/scripts/te_asl.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,29 @@
5454
required=False,
5555
help='The ATT map that is provided to skip this step in the MultiTE-ASL calculation. If ATT is not provided, than a ATT map is calculated at the runtime.',
5656
)
57-
required.add_argument(
57+
optional.add_argument(
5858
'--pld',
5959
type=str,
6060
nargs='+',
61-
required=True,
62-
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers',
61+
required=False,
62+
default=[170.0, 270.0, 370.0, 520.0, 670.0, 1070.0, 1870.0],
63+
help='Posts Labeling Delay (PLD) trend, arranged in a sequence of float numbers. If not passed, the default values will be used.',
6364
)
64-
required.add_argument(
65+
optional.add_argument(
6566
'--ld',
6667
type=str,
6768
nargs='+',
68-
required=True,
69-
help='Labeling Duration trend (LD), arranged in a sequence of float numbers.',
69+
required=False,
70+
default=[100.0, 100.0, 150.0, 150.0, 400.0, 800.0, 1800.0],
71+
help='Labeling Duration trend (LD), arranged in a sequence of float numbers. If not passed, the default values will be used.',
7072
)
71-
required.add_argument(
73+
optional.add_argument(
7274
'--te',
7375
type=str,
7476
nargs='+',
75-
required=True,
76-
help='Time of Echos (TE), arranged in a sequence of float numbers.',
77+
required=False,
78+
default=[13.56, 67.82, 122.08, 176.33, 230.59, 284.84, 339.1, 393.36],
79+
help='Time of Echos (TE), arranged in a sequence of float numbers. If not passed, the default values will be used.',
7780
)
7881
optional.add_argument(
7982
'--verbose',

0 commit comments

Comments
 (0)