-
Notifications
You must be signed in to change notification settings - Fork 533
/
Copy pathtest_auto_Allineate.py
115 lines (109 loc) · 4.31 KB
/
test_auto_Allineate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import Allineate
def test_Allineate_inputs():
input_map = dict(
allcostx=dict(
argstr="-allcostx |& tee %s",
extensions=None,
position=-1,
xor=["out_file", "out_matrix", "out_param_file", "out_weight_file"],
),
args=dict(argstr="%s",),
autobox=dict(argstr="-autobox",),
automask=dict(argstr="-automask+%d",),
autoweight=dict(argstr="-autoweight%s",),
center_of_mass=dict(argstr="-cmass%s",),
check=dict(argstr="-check %s",),
convergence=dict(argstr="-conv %f",),
cost=dict(argstr="-cost %s",),
environ=dict(nohash=True, usedefault=True,),
epi=dict(argstr="-EPI",),
final_interpolation=dict(argstr="-final %s",),
fine_blur=dict(argstr="-fineblur %f",),
in_file=dict(
argstr="-source %s", copyfile=False, extensions=None, mandatory=True,
),
in_matrix=dict(
argstr="-1Dmatrix_apply %s",
extensions=None,
position=-3,
xor=["out_matrix"],
),
in_param_file=dict(
argstr="-1Dparam_apply %s", extensions=None, xor=["out_param_file"],
),
interpolation=dict(argstr="-interp %s",),
master=dict(argstr="-master %s", extensions=None,),
maxrot=dict(argstr="-maxrot %f",),
maxscl=dict(argstr="-maxscl %f",),
maxshf=dict(argstr="-maxshf %f",),
maxshr=dict(argstr="-maxshr %f",),
newgrid=dict(argstr="-newgrid %f",),
nmatch=dict(argstr="-nmatch %d",),
no_pad=dict(argstr="-nopad",),
nomask=dict(argstr="-nomask",),
num_threads=dict(nohash=True, usedefault=True,),
nwarp=dict(argstr="-nwarp %s",),
nwarp_fixdep=dict(argstr="-nwarp_fixdep%s...",),
nwarp_fixmot=dict(argstr="-nwarp_fixmot%s...",),
one_pass=dict(argstr="-onepass",),
out_file=dict(
argstr="-prefix %s",
extensions=None,
hash_files=False,
name_source="in_file",
name_template="%s_allineate",
xor=["allcostx"],
),
out_matrix=dict(
argstr="-1Dmatrix_save %s",
extensions=None,
keep_extension=False,
name_source="in_file",
name_template="%s_allineated.aff12.1D",
xor=["in_matrix", "allcostx"],
),
out_param_file=dict(
argstr="-1Dparam_save %s",
extensions=None,
xor=["in_param_file", "allcostx"],
),
out_weight_file=dict(argstr="-wtprefix %s", extensions=None, xor=["allcostx"],),
outputtype=dict(),
overwrite=dict(argstr="-overwrite",),
quiet=dict(argstr="-quiet",),
reference=dict(argstr="-base %s", extensions=None,),
replacebase=dict(argstr="-replacebase",),
replacemeth=dict(argstr="-replacemeth %s",),
source_automask=dict(argstr="-source_automask+%d",),
source_mask=dict(argstr="-source_mask %s", extensions=None,),
two_best=dict(argstr="-twobest %d",),
two_blur=dict(argstr="-twoblur %f",),
two_first=dict(argstr="-twofirst",),
two_pass=dict(argstr="-twopass",),
usetemp=dict(argstr="-usetemp",),
verbose=dict(argstr="-verb",),
warp_type=dict(argstr="-warp %s",),
warpfreeze=dict(argstr="-warpfreeze",),
weight=dict(argstr="-weight %s",),
weight_file=dict(
argstr="-weight %s", deprecated="1.0.0", extensions=None, new_name="weight",
),
zclip=dict(argstr="-zclip",),
)
inputs = Allineate.input_spec()
for key, metadata in list(input_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(inputs.traits()[key], metakey) == value
def test_Allineate_outputs():
output_map = dict(
allcostx=dict(extensions=None,),
out_file=dict(extensions=None,),
out_matrix=dict(extensions=None,),
out_param_file=dict(extensions=None,),
out_weight_file=dict(extensions=None,),
)
outputs = Allineate.output_spec()
for key, metadata in list(output_map.items()):
for metakey, value in list(metadata.items()):
assert getattr(outputs.traits()[key], metakey) == value