niwrap-mrtrix 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of niwrap-mrtrix might be problematic. Click here for more details.
- niwrap_mrtrix/mrtrix/__init__.py +130 -0
- niwrap_mrtrix/mrtrix/afdconnectivity.py +445 -0
- niwrap_mrtrix/mrtrix/amp2response.py +453 -0
- niwrap_mrtrix/mrtrix/amp2sh.py +656 -0
- niwrap_mrtrix/mrtrix/connectome2tck.py +470 -0
- niwrap_mrtrix/mrtrix/connectomeedit.py +338 -0
- niwrap_mrtrix/mrtrix/connectomestats.py +767 -0
- niwrap_mrtrix/mrtrix/dcmedit.py +440 -0
- niwrap_mrtrix/mrtrix/dcminfo.py +416 -0
- niwrap_mrtrix/mrtrix/dirflip.py +362 -0
- niwrap_mrtrix/mrtrix/dirgen.py +423 -0
- niwrap_mrtrix/mrtrix/dirmerge.py +365 -0
- niwrap_mrtrix/mrtrix/dirorder.py +347 -0
- niwrap_mrtrix/mrtrix/dirsplit.py +358 -0
- niwrap_mrtrix/mrtrix/dirstat.py +530 -0
- niwrap_mrtrix/mrtrix/dwi2adc.py +428 -0
- niwrap_mrtrix/mrtrix/dwi2fod.py +879 -0
- niwrap_mrtrix/mrtrix/dwi2mask.py +463 -0
- niwrap_mrtrix/mrtrix/dwi2response.py +1295 -0
- niwrap_mrtrix/mrtrix/dwi2tensor.py +587 -0
- niwrap_mrtrix/mrtrix/dwibiascorrect.py +467 -0
- niwrap_mrtrix/mrtrix/dwidenoise.py +478 -0
- niwrap_mrtrix/mrtrix/dwiextract.py +825 -0
- niwrap_mrtrix/mrtrix/dwigradcheck.py +534 -0
- niwrap_mrtrix/mrtrix/fixel2peaks.py +452 -0
- niwrap_mrtrix/mrtrix/fixel2sh.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2tsf.py +357 -0
- niwrap_mrtrix/mrtrix/fixel2voxel.py +437 -0
- niwrap_mrtrix/mrtrix/fixelcfestats.py +893 -0
- niwrap_mrtrix/mrtrix/fixelconnectivity.py +391 -0
- niwrap_mrtrix/mrtrix/fixelconvert.py +588 -0
- niwrap_mrtrix/mrtrix/fixelcorrespondence.py +371 -0
- niwrap_mrtrix/mrtrix/fixelcrop.py +348 -0
- niwrap_mrtrix/mrtrix/fixelfilter.py +616 -0
- niwrap_mrtrix/mrtrix/fixelreorient.py +361 -0
- niwrap_mrtrix/mrtrix/fod2dec.py +469 -0
- niwrap_mrtrix/mrtrix/fod2fixel.py +530 -0
- niwrap_mrtrix/mrtrix/label2colour.py +351 -0
- niwrap_mrtrix/mrtrix/label2mesh.py +343 -0
- niwrap_mrtrix/mrtrix/labelconvert.py +377 -0
- niwrap_mrtrix/mrtrix/labelstats.py +344 -0
- niwrap_mrtrix/mrtrix/maskdump.py +336 -0
- niwrap_mrtrix/mrtrix/maskfilter.py +537 -0
- niwrap_mrtrix/mrtrix/mesh2voxel.py +348 -0
- niwrap_mrtrix/mrtrix/meshconvert.py +410 -0
- niwrap_mrtrix/mrtrix/meshfilter.py +370 -0
- niwrap_mrtrix/mrtrix/mraverageheader.py +396 -0
- niwrap_mrtrix/mrtrix/mrcalc.py +3047 -0
- niwrap_mrtrix/mrtrix/mrcat.py +382 -0
- niwrap_mrtrix/mrtrix/mrcentroid.py +344 -0
- niwrap_mrtrix/mrtrix/mrcheckerboardmask.py +363 -0
- niwrap_mrtrix/mrtrix/mrclusterstats.py +736 -0
- niwrap_mrtrix/mrtrix/mrcolour.py +401 -0
- niwrap_mrtrix/mrtrix/mrconvert.py +1423 -0
- niwrap_mrtrix/mrtrix/mrdegibbs.py +443 -0
- niwrap_mrtrix/mrtrix/mrdump.py +351 -0
- niwrap_mrtrix/mrtrix/mredit.py +546 -0
- niwrap_mrtrix/mrtrix/mrfilter.py +716 -0
- niwrap_mrtrix/mrtrix/mrgrid.py +819 -0
- niwrap_mrtrix/mrtrix/mrhistmatch.py +403 -0
- niwrap_mrtrix/mrtrix/mrhistogram.py +393 -0
- niwrap_mrtrix/mrtrix/mrinfo.py +990 -0
- niwrap_mrtrix/mrtrix/mrmath.py +413 -0
- niwrap_mrtrix/mrtrix/mrmetric.py +425 -0
- niwrap_mrtrix/mrtrix/mrregister.py +1676 -0
- niwrap_mrtrix/mrtrix/mrstats.py +427 -0
- niwrap_mrtrix/mrtrix/mrthreshold.py +549 -0
- niwrap_mrtrix/mrtrix/mrtransform.py +1061 -0
- niwrap_mrtrix/mrtrix/mtnormalise.py +596 -0
- niwrap_mrtrix/mrtrix/peaks2amp.py +334 -0
- niwrap_mrtrix/mrtrix/peaks2fixel.py +349 -0
- niwrap_mrtrix/mrtrix/responsemean.py +316 -0
- niwrap_mrtrix/mrtrix/sh2amp.py +640 -0
- niwrap_mrtrix/mrtrix/sh2peaks.py +505 -0
- niwrap_mrtrix/mrtrix/sh2power.py +353 -0
- niwrap_mrtrix/mrtrix/sh2response.py +394 -0
- niwrap_mrtrix/mrtrix/shbasis.py +373 -0
- niwrap_mrtrix/mrtrix/shconv.py +498 -0
- niwrap_mrtrix/mrtrix/tck2connectome.py +580 -0
- niwrap_mrtrix/mrtrix/tck2fixel.py +363 -0
- niwrap_mrtrix/mrtrix/tckconvert.py +580 -0
- niwrap_mrtrix/mrtrix/tckdfc.py +551 -0
- niwrap_mrtrix/mrtrix/tckedit.py +1003 -0
- niwrap_mrtrix/mrtrix/tckgen.py +1983 -0
- niwrap_mrtrix/mrtrix/tckglobal.py +758 -0
- niwrap_mrtrix/mrtrix/tckinfo.py +329 -0
- niwrap_mrtrix/mrtrix/tckmap.py +772 -0
- niwrap_mrtrix/mrtrix/tckresample.py +580 -0
- niwrap_mrtrix/mrtrix/tcksample.py +404 -0
- niwrap_mrtrix/mrtrix/tcksift.py +592 -0
- niwrap_mrtrix/mrtrix/tcksift2.py +730 -0
- niwrap_mrtrix/mrtrix/tckstats.py +441 -0
- niwrap_mrtrix/mrtrix/tcktransform.py +340 -0
- niwrap_mrtrix/mrtrix/tensor2metric.py +544 -0
- niwrap_mrtrix/mrtrix/transformcalc.py +344 -0
- niwrap_mrtrix/mrtrix/transformcompose.py +465 -0
- niwrap_mrtrix/mrtrix/transformconvert.py +346 -0
- niwrap_mrtrix/mrtrix/tsfdivide.py +340 -0
- niwrap_mrtrix/mrtrix/tsfinfo.py +344 -0
- niwrap_mrtrix/mrtrix/tsfmult.py +340 -0
- niwrap_mrtrix/mrtrix/tsfsmooth.py +347 -0
- niwrap_mrtrix/mrtrix/tsfthreshold.py +349 -0
- niwrap_mrtrix/mrtrix/tsfvalidate.py +328 -0
- niwrap_mrtrix/mrtrix/v_5tt2gmwmi.py +359 -0
- niwrap_mrtrix/mrtrix/v_5tt2vis.py +412 -0
- niwrap_mrtrix/mrtrix/v_5ttcheck.py +337 -0
- niwrap_mrtrix/mrtrix/v_5ttedit.py +420 -0
- niwrap_mrtrix/mrtrix/v_5ttgen.py +816 -0
- niwrap_mrtrix/mrtrix/vectorstats.py +585 -0
- niwrap_mrtrix/mrtrix/voxel2fixel.py +350 -0
- niwrap_mrtrix/mrtrix/voxel2mesh.py +376 -0
- niwrap_mrtrix/mrtrix/warp2metric.py +449 -0
- niwrap_mrtrix/mrtrix/warpconvert.py +411 -0
- niwrap_mrtrix/mrtrix/warpcorrect.py +368 -0
- niwrap_mrtrix/mrtrix/warpinit.py +356 -0
- niwrap_mrtrix/mrtrix/warpinvert.py +370 -0
- niwrap_mrtrix-0.5.0.dist-info/METADATA +8 -0
- niwrap_mrtrix-0.5.0.dist-info/RECORD +119 -0
- niwrap_mrtrix-0.5.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,3047 @@
|
|
|
1
|
+
# This file was auto generated by Styx.
|
|
2
|
+
# Do not edit this file directly.
|
|
3
|
+
|
|
4
|
+
import typing
|
|
5
|
+
import pathlib
|
|
6
|
+
from styxdefs import *
|
|
7
|
+
|
|
8
|
+
MRCALC_METADATA = Metadata(
|
|
9
|
+
id="4abff4f051d8a436c35f7a012c41ca90bb2f4df0.boutiques",
|
|
10
|
+
name="mrcalc",
|
|
11
|
+
package="mrtrix",
|
|
12
|
+
container_image_tag="mrtrix3/mrtrix3:3.0.4",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
MrcalcAbsParameters = typing.TypedDict('MrcalcAbsParameters', {
|
|
17
|
+
"__STYX_TYPE__": typing.Literal["abs"],
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
MrcalcNegParameters = typing.TypedDict('MrcalcNegParameters', {
|
|
22
|
+
"__STYX_TYPE__": typing.Literal["neg"],
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
MrcalcAddParameters = typing.TypedDict('MrcalcAddParameters', {
|
|
27
|
+
"__STYX_TYPE__": typing.Literal["add"],
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
MrcalcSubtractParameters = typing.TypedDict('MrcalcSubtractParameters', {
|
|
32
|
+
"__STYX_TYPE__": typing.Literal["subtract"],
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
MrcalcMultiplyParameters = typing.TypedDict('MrcalcMultiplyParameters', {
|
|
37
|
+
"__STYX_TYPE__": typing.Literal["multiply"],
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
MrcalcDivideParameters = typing.TypedDict('MrcalcDivideParameters', {
|
|
42
|
+
"__STYX_TYPE__": typing.Literal["divide"],
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
MrcalcMinParameters = typing.TypedDict('MrcalcMinParameters', {
|
|
47
|
+
"__STYX_TYPE__": typing.Literal["min"],
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
MrcalcMaxParameters = typing.TypedDict('MrcalcMaxParameters', {
|
|
52
|
+
"__STYX_TYPE__": typing.Literal["max"],
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
MrcalcLtParameters = typing.TypedDict('MrcalcLtParameters', {
|
|
57
|
+
"__STYX_TYPE__": typing.Literal["lt"],
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
MrcalcGtParameters = typing.TypedDict('MrcalcGtParameters', {
|
|
62
|
+
"__STYX_TYPE__": typing.Literal["gt"],
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
MrcalcLeParameters = typing.TypedDict('MrcalcLeParameters', {
|
|
67
|
+
"__STYX_TYPE__": typing.Literal["le"],
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
MrcalcGeParameters = typing.TypedDict('MrcalcGeParameters', {
|
|
72
|
+
"__STYX_TYPE__": typing.Literal["ge"],
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
MrcalcEqParameters = typing.TypedDict('MrcalcEqParameters', {
|
|
77
|
+
"__STYX_TYPE__": typing.Literal["eq"],
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
MrcalcNeqParameters = typing.TypedDict('MrcalcNeqParameters', {
|
|
82
|
+
"__STYX_TYPE__": typing.Literal["neq"],
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
MrcalcIfParameters = typing.TypedDict('MrcalcIfParameters', {
|
|
87
|
+
"__STYX_TYPE__": typing.Literal["if"],
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
MrcalcReplaceParameters = typing.TypedDict('MrcalcReplaceParameters', {
|
|
92
|
+
"__STYX_TYPE__": typing.Literal["replace"],
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
MrcalcSqrtParameters = typing.TypedDict('MrcalcSqrtParameters', {
|
|
97
|
+
"__STYX_TYPE__": typing.Literal["sqrt"],
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
MrcalcPowParameters = typing.TypedDict('MrcalcPowParameters', {
|
|
102
|
+
"__STYX_TYPE__": typing.Literal["pow"],
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
MrcalcRoundParameters = typing.TypedDict('MrcalcRoundParameters', {
|
|
107
|
+
"__STYX_TYPE__": typing.Literal["round"],
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
MrcalcCeilParameters = typing.TypedDict('MrcalcCeilParameters', {
|
|
112
|
+
"__STYX_TYPE__": typing.Literal["ceil"],
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
MrcalcFloorParameters = typing.TypedDict('MrcalcFloorParameters', {
|
|
117
|
+
"__STYX_TYPE__": typing.Literal["floor"],
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
MrcalcNotParameters = typing.TypedDict('MrcalcNotParameters', {
|
|
122
|
+
"__STYX_TYPE__": typing.Literal["not"],
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
MrcalcAndParameters = typing.TypedDict('MrcalcAndParameters', {
|
|
127
|
+
"__STYX_TYPE__": typing.Literal["and"],
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
MrcalcOrParameters = typing.TypedDict('MrcalcOrParameters', {
|
|
132
|
+
"__STYX_TYPE__": typing.Literal["or"],
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
MrcalcXorParameters = typing.TypedDict('MrcalcXorParameters', {
|
|
137
|
+
"__STYX_TYPE__": typing.Literal["xor"],
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
MrcalcIsnanParameters = typing.TypedDict('MrcalcIsnanParameters', {
|
|
142
|
+
"__STYX_TYPE__": typing.Literal["isnan"],
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
MrcalcIsinfParameters = typing.TypedDict('MrcalcIsinfParameters', {
|
|
147
|
+
"__STYX_TYPE__": typing.Literal["isinf"],
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
MrcalcFiniteParameters = typing.TypedDict('MrcalcFiniteParameters', {
|
|
152
|
+
"__STYX_TYPE__": typing.Literal["finite"],
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
MrcalcComplexParameters = typing.TypedDict('MrcalcComplexParameters', {
|
|
157
|
+
"__STYX_TYPE__": typing.Literal["complex"],
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
MrcalcPolarParameters = typing.TypedDict('MrcalcPolarParameters', {
|
|
162
|
+
"__STYX_TYPE__": typing.Literal["polar"],
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
MrcalcRealParameters = typing.TypedDict('MrcalcRealParameters', {
|
|
167
|
+
"__STYX_TYPE__": typing.Literal["real"],
|
|
168
|
+
})
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
MrcalcImagParameters = typing.TypedDict('MrcalcImagParameters', {
|
|
172
|
+
"__STYX_TYPE__": typing.Literal["imag"],
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
MrcalcPhaseParameters = typing.TypedDict('MrcalcPhaseParameters', {
|
|
177
|
+
"__STYX_TYPE__": typing.Literal["phase"],
|
|
178
|
+
})
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
MrcalcConjParameters = typing.TypedDict('MrcalcConjParameters', {
|
|
182
|
+
"__STYX_TYPE__": typing.Literal["conj"],
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
MrcalcProjParameters = typing.TypedDict('MrcalcProjParameters', {
|
|
187
|
+
"__STYX_TYPE__": typing.Literal["proj"],
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
MrcalcExpParameters = typing.TypedDict('MrcalcExpParameters', {
|
|
192
|
+
"__STYX_TYPE__": typing.Literal["exp"],
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
MrcalcLogParameters = typing.TypedDict('MrcalcLogParameters', {
|
|
197
|
+
"__STYX_TYPE__": typing.Literal["log"],
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
MrcalcLog10Parameters = typing.TypedDict('MrcalcLog10Parameters', {
|
|
202
|
+
"__STYX_TYPE__": typing.Literal["log10"],
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
MrcalcCosParameters = typing.TypedDict('MrcalcCosParameters', {
|
|
207
|
+
"__STYX_TYPE__": typing.Literal["cos"],
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
MrcalcSinParameters = typing.TypedDict('MrcalcSinParameters', {
|
|
212
|
+
"__STYX_TYPE__": typing.Literal["sin"],
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
MrcalcTanParameters = typing.TypedDict('MrcalcTanParameters', {
|
|
217
|
+
"__STYX_TYPE__": typing.Literal["tan"],
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
MrcalcAcosParameters = typing.TypedDict('MrcalcAcosParameters', {
|
|
222
|
+
"__STYX_TYPE__": typing.Literal["acos"],
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
MrcalcAsinParameters = typing.TypedDict('MrcalcAsinParameters', {
|
|
227
|
+
"__STYX_TYPE__": typing.Literal["asin"],
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
MrcalcAtanParameters = typing.TypedDict('MrcalcAtanParameters', {
|
|
232
|
+
"__STYX_TYPE__": typing.Literal["atan"],
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
MrcalcCoshParameters = typing.TypedDict('MrcalcCoshParameters', {
|
|
237
|
+
"__STYX_TYPE__": typing.Literal["cosh"],
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
MrcalcSinhParameters = typing.TypedDict('MrcalcSinhParameters', {
|
|
242
|
+
"__STYX_TYPE__": typing.Literal["sinh"],
|
|
243
|
+
})
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
MrcalcTanhParameters = typing.TypedDict('MrcalcTanhParameters', {
|
|
247
|
+
"__STYX_TYPE__": typing.Literal["tanh"],
|
|
248
|
+
})
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
MrcalcAcoshParameters = typing.TypedDict('MrcalcAcoshParameters', {
|
|
252
|
+
"__STYX_TYPE__": typing.Literal["acosh"],
|
|
253
|
+
})
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
MrcalcAsinhParameters = typing.TypedDict('MrcalcAsinhParameters', {
|
|
257
|
+
"__STYX_TYPE__": typing.Literal["asinh"],
|
|
258
|
+
})
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
MrcalcAtanhParameters = typing.TypedDict('MrcalcAtanhParameters', {
|
|
262
|
+
"__STYX_TYPE__": typing.Literal["atanh"],
|
|
263
|
+
})
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
MrcalcConfigParameters = typing.TypedDict('MrcalcConfigParameters', {
|
|
267
|
+
"__STYX_TYPE__": typing.Literal["config"],
|
|
268
|
+
"key": str,
|
|
269
|
+
"value": str,
|
|
270
|
+
})
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
MrcalcVariousStringParameters = typing.TypedDict('MrcalcVariousStringParameters', {
|
|
274
|
+
"__STYX_TYPE__": typing.Literal["VariousString"],
|
|
275
|
+
"obj": str,
|
|
276
|
+
})
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
MrcalcVariousFileParameters = typing.TypedDict('MrcalcVariousFileParameters', {
|
|
280
|
+
"__STYX_TYPE__": typing.Literal["VariousFile"],
|
|
281
|
+
"obj": InputPathType,
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
MrcalcParameters = typing.TypedDict('MrcalcParameters', {
|
|
286
|
+
"__STYX_TYPE__": typing.Literal["mrcalc"],
|
|
287
|
+
"abs": typing.NotRequired[list[MrcalcAbsParameters] | None],
|
|
288
|
+
"neg": typing.NotRequired[list[MrcalcNegParameters] | None],
|
|
289
|
+
"add": typing.NotRequired[list[MrcalcAddParameters] | None],
|
|
290
|
+
"subtract": typing.NotRequired[list[MrcalcSubtractParameters] | None],
|
|
291
|
+
"multiply": typing.NotRequired[list[MrcalcMultiplyParameters] | None],
|
|
292
|
+
"divide": typing.NotRequired[list[MrcalcDivideParameters] | None],
|
|
293
|
+
"min": typing.NotRequired[list[MrcalcMinParameters] | None],
|
|
294
|
+
"max": typing.NotRequired[list[MrcalcMaxParameters] | None],
|
|
295
|
+
"lt": typing.NotRequired[list[MrcalcLtParameters] | None],
|
|
296
|
+
"gt": typing.NotRequired[list[MrcalcGtParameters] | None],
|
|
297
|
+
"le": typing.NotRequired[list[MrcalcLeParameters] | None],
|
|
298
|
+
"ge": typing.NotRequired[list[MrcalcGeParameters] | None],
|
|
299
|
+
"eq": typing.NotRequired[list[MrcalcEqParameters] | None],
|
|
300
|
+
"neq": typing.NotRequired[list[MrcalcNeqParameters] | None],
|
|
301
|
+
"if": typing.NotRequired[list[MrcalcIfParameters] | None],
|
|
302
|
+
"replace": typing.NotRequired[list[MrcalcReplaceParameters] | None],
|
|
303
|
+
"sqrt": typing.NotRequired[list[MrcalcSqrtParameters] | None],
|
|
304
|
+
"pow": typing.NotRequired[list[MrcalcPowParameters] | None],
|
|
305
|
+
"round": typing.NotRequired[list[MrcalcRoundParameters] | None],
|
|
306
|
+
"ceil": typing.NotRequired[list[MrcalcCeilParameters] | None],
|
|
307
|
+
"floor": typing.NotRequired[list[MrcalcFloorParameters] | None],
|
|
308
|
+
"not": typing.NotRequired[list[MrcalcNotParameters] | None],
|
|
309
|
+
"and": typing.NotRequired[list[MrcalcAndParameters] | None],
|
|
310
|
+
"or": typing.NotRequired[list[MrcalcOrParameters] | None],
|
|
311
|
+
"xor": typing.NotRequired[list[MrcalcXorParameters] | None],
|
|
312
|
+
"isnan": typing.NotRequired[list[MrcalcIsnanParameters] | None],
|
|
313
|
+
"isinf": typing.NotRequired[list[MrcalcIsinfParameters] | None],
|
|
314
|
+
"finite": typing.NotRequired[list[MrcalcFiniteParameters] | None],
|
|
315
|
+
"complex": typing.NotRequired[list[MrcalcComplexParameters] | None],
|
|
316
|
+
"polar": typing.NotRequired[list[MrcalcPolarParameters] | None],
|
|
317
|
+
"real": typing.NotRequired[list[MrcalcRealParameters] | None],
|
|
318
|
+
"imag": typing.NotRequired[list[MrcalcImagParameters] | None],
|
|
319
|
+
"phase": typing.NotRequired[list[MrcalcPhaseParameters] | None],
|
|
320
|
+
"conj": typing.NotRequired[list[MrcalcConjParameters] | None],
|
|
321
|
+
"proj": typing.NotRequired[list[MrcalcProjParameters] | None],
|
|
322
|
+
"exp": typing.NotRequired[list[MrcalcExpParameters] | None],
|
|
323
|
+
"log": typing.NotRequired[list[MrcalcLogParameters] | None],
|
|
324
|
+
"log10": typing.NotRequired[list[MrcalcLog10Parameters] | None],
|
|
325
|
+
"cos": typing.NotRequired[list[MrcalcCosParameters] | None],
|
|
326
|
+
"sin": typing.NotRequired[list[MrcalcSinParameters] | None],
|
|
327
|
+
"tan": typing.NotRequired[list[MrcalcTanParameters] | None],
|
|
328
|
+
"acos": typing.NotRequired[list[MrcalcAcosParameters] | None],
|
|
329
|
+
"asin": typing.NotRequired[list[MrcalcAsinParameters] | None],
|
|
330
|
+
"atan": typing.NotRequired[list[MrcalcAtanParameters] | None],
|
|
331
|
+
"cosh": typing.NotRequired[list[MrcalcCoshParameters] | None],
|
|
332
|
+
"sinh": typing.NotRequired[list[MrcalcSinhParameters] | None],
|
|
333
|
+
"tanh": typing.NotRequired[list[MrcalcTanhParameters] | None],
|
|
334
|
+
"acosh": typing.NotRequired[list[MrcalcAcoshParameters] | None],
|
|
335
|
+
"asinh": typing.NotRequired[list[MrcalcAsinhParameters] | None],
|
|
336
|
+
"atanh": typing.NotRequired[list[MrcalcAtanhParameters] | None],
|
|
337
|
+
"datatype": typing.NotRequired[str | None],
|
|
338
|
+
"info": bool,
|
|
339
|
+
"quiet": bool,
|
|
340
|
+
"debug": bool,
|
|
341
|
+
"force": bool,
|
|
342
|
+
"nthreads": typing.NotRequired[int | None],
|
|
343
|
+
"config": typing.NotRequired[list[MrcalcConfigParameters] | None],
|
|
344
|
+
"help": bool,
|
|
345
|
+
"version": bool,
|
|
346
|
+
"operand": list[typing.Union[MrcalcVariousStringParameters, MrcalcVariousFileParameters]],
|
|
347
|
+
})
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
def dyn_cargs(
|
|
351
|
+
t: str,
|
|
352
|
+
) -> typing.Any:
|
|
353
|
+
"""
|
|
354
|
+
Get build cargs function by command type.
|
|
355
|
+
|
|
356
|
+
Args:
|
|
357
|
+
t: Command type.
|
|
358
|
+
Returns:
|
|
359
|
+
Build cargs function.
|
|
360
|
+
"""
|
|
361
|
+
return {
|
|
362
|
+
"mrcalc": mrcalc_cargs,
|
|
363
|
+
"abs": mrcalc_abs_cargs,
|
|
364
|
+
"neg": mrcalc_neg_cargs,
|
|
365
|
+
"add": mrcalc_add_cargs,
|
|
366
|
+
"subtract": mrcalc_subtract_cargs,
|
|
367
|
+
"multiply": mrcalc_multiply_cargs,
|
|
368
|
+
"divide": mrcalc_divide_cargs,
|
|
369
|
+
"min": mrcalc_min_cargs,
|
|
370
|
+
"max": mrcalc_max_cargs,
|
|
371
|
+
"lt": mrcalc_lt_cargs,
|
|
372
|
+
"gt": mrcalc_gt_cargs,
|
|
373
|
+
"le": mrcalc_le_cargs,
|
|
374
|
+
"ge": mrcalc_ge_cargs,
|
|
375
|
+
"eq": mrcalc_eq_cargs,
|
|
376
|
+
"neq": mrcalc_neq_cargs,
|
|
377
|
+
"if": mrcalc_if_cargs,
|
|
378
|
+
"replace": mrcalc_replace_cargs,
|
|
379
|
+
"sqrt": mrcalc_sqrt_cargs,
|
|
380
|
+
"pow": mrcalc_pow_cargs,
|
|
381
|
+
"round": mrcalc_round_cargs,
|
|
382
|
+
"ceil": mrcalc_ceil_cargs,
|
|
383
|
+
"floor": mrcalc_floor_cargs,
|
|
384
|
+
"not": mrcalc_not_cargs,
|
|
385
|
+
"and": mrcalc_and_cargs,
|
|
386
|
+
"or": mrcalc_or_cargs,
|
|
387
|
+
"xor": mrcalc_xor_cargs,
|
|
388
|
+
"isnan": mrcalc_isnan_cargs,
|
|
389
|
+
"isinf": mrcalc_isinf_cargs,
|
|
390
|
+
"finite": mrcalc_finite_cargs,
|
|
391
|
+
"complex": mrcalc_complex_cargs,
|
|
392
|
+
"polar": mrcalc_polar_cargs,
|
|
393
|
+
"real": mrcalc_real_cargs,
|
|
394
|
+
"imag": mrcalc_imag_cargs,
|
|
395
|
+
"phase": mrcalc_phase_cargs,
|
|
396
|
+
"conj": mrcalc_conj_cargs,
|
|
397
|
+
"proj": mrcalc_proj_cargs,
|
|
398
|
+
"exp": mrcalc_exp_cargs,
|
|
399
|
+
"log": mrcalc_log_cargs,
|
|
400
|
+
"log10": mrcalc_log10_cargs,
|
|
401
|
+
"cos": mrcalc_cos_cargs,
|
|
402
|
+
"sin": mrcalc_sin_cargs,
|
|
403
|
+
"tan": mrcalc_tan_cargs,
|
|
404
|
+
"acos": mrcalc_acos_cargs,
|
|
405
|
+
"asin": mrcalc_asin_cargs,
|
|
406
|
+
"atan": mrcalc_atan_cargs,
|
|
407
|
+
"cosh": mrcalc_cosh_cargs,
|
|
408
|
+
"sinh": mrcalc_sinh_cargs,
|
|
409
|
+
"tanh": mrcalc_tanh_cargs,
|
|
410
|
+
"acosh": mrcalc_acosh_cargs,
|
|
411
|
+
"asinh": mrcalc_asinh_cargs,
|
|
412
|
+
"atanh": mrcalc_atanh_cargs,
|
|
413
|
+
"config": mrcalc_config_cargs,
|
|
414
|
+
"VariousString": mrcalc_various_string_cargs,
|
|
415
|
+
"VariousFile": mrcalc_various_file_cargs,
|
|
416
|
+
}.get(t)
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
def dyn_outputs(
|
|
420
|
+
t: str,
|
|
421
|
+
) -> typing.Any:
|
|
422
|
+
"""
|
|
423
|
+
Get build outputs function by command type.
|
|
424
|
+
|
|
425
|
+
Args:
|
|
426
|
+
t: Command type.
|
|
427
|
+
Returns:
|
|
428
|
+
Build outputs function.
|
|
429
|
+
"""
|
|
430
|
+
return {
|
|
431
|
+
}.get(t)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
def mrcalc_abs_params(
|
|
435
|
+
) -> MrcalcAbsParameters:
|
|
436
|
+
"""
|
|
437
|
+
Build parameters.
|
|
438
|
+
|
|
439
|
+
Args:
|
|
440
|
+
Returns:
|
|
441
|
+
Parameter dictionary
|
|
442
|
+
"""
|
|
443
|
+
params = {
|
|
444
|
+
"__STYXTYPE__": "abs",
|
|
445
|
+
}
|
|
446
|
+
return params
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
def mrcalc_abs_cargs(
|
|
450
|
+
params: MrcalcAbsParameters,
|
|
451
|
+
execution: Execution,
|
|
452
|
+
) -> list[str]:
|
|
453
|
+
"""
|
|
454
|
+
Build command-line arguments from parameters.
|
|
455
|
+
|
|
456
|
+
Args:
|
|
457
|
+
params: The parameters.
|
|
458
|
+
execution: The execution object for resolving input paths.
|
|
459
|
+
Returns:
|
|
460
|
+
Command-line arguments.
|
|
461
|
+
"""
|
|
462
|
+
cargs = []
|
|
463
|
+
cargs.append("-abs")
|
|
464
|
+
return cargs
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
def mrcalc_neg_params(
|
|
468
|
+
) -> MrcalcNegParameters:
|
|
469
|
+
"""
|
|
470
|
+
Build parameters.
|
|
471
|
+
|
|
472
|
+
Args:
|
|
473
|
+
Returns:
|
|
474
|
+
Parameter dictionary
|
|
475
|
+
"""
|
|
476
|
+
params = {
|
|
477
|
+
"__STYXTYPE__": "neg",
|
|
478
|
+
}
|
|
479
|
+
return params
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
def mrcalc_neg_cargs(
|
|
483
|
+
params: MrcalcNegParameters,
|
|
484
|
+
execution: Execution,
|
|
485
|
+
) -> list[str]:
|
|
486
|
+
"""
|
|
487
|
+
Build command-line arguments from parameters.
|
|
488
|
+
|
|
489
|
+
Args:
|
|
490
|
+
params: The parameters.
|
|
491
|
+
execution: The execution object for resolving input paths.
|
|
492
|
+
Returns:
|
|
493
|
+
Command-line arguments.
|
|
494
|
+
"""
|
|
495
|
+
cargs = []
|
|
496
|
+
cargs.append("-neg")
|
|
497
|
+
return cargs
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
def mrcalc_add_params(
|
|
501
|
+
) -> MrcalcAddParameters:
|
|
502
|
+
"""
|
|
503
|
+
Build parameters.
|
|
504
|
+
|
|
505
|
+
Args:
|
|
506
|
+
Returns:
|
|
507
|
+
Parameter dictionary
|
|
508
|
+
"""
|
|
509
|
+
params = {
|
|
510
|
+
"__STYXTYPE__": "add",
|
|
511
|
+
}
|
|
512
|
+
return params
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
def mrcalc_add_cargs(
|
|
516
|
+
params: MrcalcAddParameters,
|
|
517
|
+
execution: Execution,
|
|
518
|
+
) -> list[str]:
|
|
519
|
+
"""
|
|
520
|
+
Build command-line arguments from parameters.
|
|
521
|
+
|
|
522
|
+
Args:
|
|
523
|
+
params: The parameters.
|
|
524
|
+
execution: The execution object for resolving input paths.
|
|
525
|
+
Returns:
|
|
526
|
+
Command-line arguments.
|
|
527
|
+
"""
|
|
528
|
+
cargs = []
|
|
529
|
+
cargs.append("-add")
|
|
530
|
+
return cargs
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def mrcalc_subtract_params(
|
|
534
|
+
) -> MrcalcSubtractParameters:
|
|
535
|
+
"""
|
|
536
|
+
Build parameters.
|
|
537
|
+
|
|
538
|
+
Args:
|
|
539
|
+
Returns:
|
|
540
|
+
Parameter dictionary
|
|
541
|
+
"""
|
|
542
|
+
params = {
|
|
543
|
+
"__STYXTYPE__": "subtract",
|
|
544
|
+
}
|
|
545
|
+
return params
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
def mrcalc_subtract_cargs(
|
|
549
|
+
params: MrcalcSubtractParameters,
|
|
550
|
+
execution: Execution,
|
|
551
|
+
) -> list[str]:
|
|
552
|
+
"""
|
|
553
|
+
Build command-line arguments from parameters.
|
|
554
|
+
|
|
555
|
+
Args:
|
|
556
|
+
params: The parameters.
|
|
557
|
+
execution: The execution object for resolving input paths.
|
|
558
|
+
Returns:
|
|
559
|
+
Command-line arguments.
|
|
560
|
+
"""
|
|
561
|
+
cargs = []
|
|
562
|
+
cargs.append("-subtract")
|
|
563
|
+
return cargs
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def mrcalc_multiply_params(
|
|
567
|
+
) -> MrcalcMultiplyParameters:
|
|
568
|
+
"""
|
|
569
|
+
Build parameters.
|
|
570
|
+
|
|
571
|
+
Args:
|
|
572
|
+
Returns:
|
|
573
|
+
Parameter dictionary
|
|
574
|
+
"""
|
|
575
|
+
params = {
|
|
576
|
+
"__STYXTYPE__": "multiply",
|
|
577
|
+
}
|
|
578
|
+
return params
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
def mrcalc_multiply_cargs(
|
|
582
|
+
params: MrcalcMultiplyParameters,
|
|
583
|
+
execution: Execution,
|
|
584
|
+
) -> list[str]:
|
|
585
|
+
"""
|
|
586
|
+
Build command-line arguments from parameters.
|
|
587
|
+
|
|
588
|
+
Args:
|
|
589
|
+
params: The parameters.
|
|
590
|
+
execution: The execution object for resolving input paths.
|
|
591
|
+
Returns:
|
|
592
|
+
Command-line arguments.
|
|
593
|
+
"""
|
|
594
|
+
cargs = []
|
|
595
|
+
cargs.append("-multiply")
|
|
596
|
+
return cargs
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
def mrcalc_divide_params(
|
|
600
|
+
) -> MrcalcDivideParameters:
|
|
601
|
+
"""
|
|
602
|
+
Build parameters.
|
|
603
|
+
|
|
604
|
+
Args:
|
|
605
|
+
Returns:
|
|
606
|
+
Parameter dictionary
|
|
607
|
+
"""
|
|
608
|
+
params = {
|
|
609
|
+
"__STYXTYPE__": "divide",
|
|
610
|
+
}
|
|
611
|
+
return params
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
def mrcalc_divide_cargs(
|
|
615
|
+
params: MrcalcDivideParameters,
|
|
616
|
+
execution: Execution,
|
|
617
|
+
) -> list[str]:
|
|
618
|
+
"""
|
|
619
|
+
Build command-line arguments from parameters.
|
|
620
|
+
|
|
621
|
+
Args:
|
|
622
|
+
params: The parameters.
|
|
623
|
+
execution: The execution object for resolving input paths.
|
|
624
|
+
Returns:
|
|
625
|
+
Command-line arguments.
|
|
626
|
+
"""
|
|
627
|
+
cargs = []
|
|
628
|
+
cargs.append("-divide")
|
|
629
|
+
return cargs
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
def mrcalc_min_params(
|
|
633
|
+
) -> MrcalcMinParameters:
|
|
634
|
+
"""
|
|
635
|
+
Build parameters.
|
|
636
|
+
|
|
637
|
+
Args:
|
|
638
|
+
Returns:
|
|
639
|
+
Parameter dictionary
|
|
640
|
+
"""
|
|
641
|
+
params = {
|
|
642
|
+
"__STYXTYPE__": "min",
|
|
643
|
+
}
|
|
644
|
+
return params
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
def mrcalc_min_cargs(
|
|
648
|
+
params: MrcalcMinParameters,
|
|
649
|
+
execution: Execution,
|
|
650
|
+
) -> list[str]:
|
|
651
|
+
"""
|
|
652
|
+
Build command-line arguments from parameters.
|
|
653
|
+
|
|
654
|
+
Args:
|
|
655
|
+
params: The parameters.
|
|
656
|
+
execution: The execution object for resolving input paths.
|
|
657
|
+
Returns:
|
|
658
|
+
Command-line arguments.
|
|
659
|
+
"""
|
|
660
|
+
cargs = []
|
|
661
|
+
cargs.append("-min")
|
|
662
|
+
return cargs
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
def mrcalc_max_params(
|
|
666
|
+
) -> MrcalcMaxParameters:
|
|
667
|
+
"""
|
|
668
|
+
Build parameters.
|
|
669
|
+
|
|
670
|
+
Args:
|
|
671
|
+
Returns:
|
|
672
|
+
Parameter dictionary
|
|
673
|
+
"""
|
|
674
|
+
params = {
|
|
675
|
+
"__STYXTYPE__": "max",
|
|
676
|
+
}
|
|
677
|
+
return params
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
def mrcalc_max_cargs(
|
|
681
|
+
params: MrcalcMaxParameters,
|
|
682
|
+
execution: Execution,
|
|
683
|
+
) -> list[str]:
|
|
684
|
+
"""
|
|
685
|
+
Build command-line arguments from parameters.
|
|
686
|
+
|
|
687
|
+
Args:
|
|
688
|
+
params: The parameters.
|
|
689
|
+
execution: The execution object for resolving input paths.
|
|
690
|
+
Returns:
|
|
691
|
+
Command-line arguments.
|
|
692
|
+
"""
|
|
693
|
+
cargs = []
|
|
694
|
+
cargs.append("-max")
|
|
695
|
+
return cargs
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
def mrcalc_lt_params(
|
|
699
|
+
) -> MrcalcLtParameters:
|
|
700
|
+
"""
|
|
701
|
+
Build parameters.
|
|
702
|
+
|
|
703
|
+
Args:
|
|
704
|
+
Returns:
|
|
705
|
+
Parameter dictionary
|
|
706
|
+
"""
|
|
707
|
+
params = {
|
|
708
|
+
"__STYXTYPE__": "lt",
|
|
709
|
+
}
|
|
710
|
+
return params
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
def mrcalc_lt_cargs(
|
|
714
|
+
params: MrcalcLtParameters,
|
|
715
|
+
execution: Execution,
|
|
716
|
+
) -> list[str]:
|
|
717
|
+
"""
|
|
718
|
+
Build command-line arguments from parameters.
|
|
719
|
+
|
|
720
|
+
Args:
|
|
721
|
+
params: The parameters.
|
|
722
|
+
execution: The execution object for resolving input paths.
|
|
723
|
+
Returns:
|
|
724
|
+
Command-line arguments.
|
|
725
|
+
"""
|
|
726
|
+
cargs = []
|
|
727
|
+
cargs.append("-lt")
|
|
728
|
+
return cargs
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
def mrcalc_gt_params(
|
|
732
|
+
) -> MrcalcGtParameters:
|
|
733
|
+
"""
|
|
734
|
+
Build parameters.
|
|
735
|
+
|
|
736
|
+
Args:
|
|
737
|
+
Returns:
|
|
738
|
+
Parameter dictionary
|
|
739
|
+
"""
|
|
740
|
+
params = {
|
|
741
|
+
"__STYXTYPE__": "gt",
|
|
742
|
+
}
|
|
743
|
+
return params
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
def mrcalc_gt_cargs(
|
|
747
|
+
params: MrcalcGtParameters,
|
|
748
|
+
execution: Execution,
|
|
749
|
+
) -> list[str]:
|
|
750
|
+
"""
|
|
751
|
+
Build command-line arguments from parameters.
|
|
752
|
+
|
|
753
|
+
Args:
|
|
754
|
+
params: The parameters.
|
|
755
|
+
execution: The execution object for resolving input paths.
|
|
756
|
+
Returns:
|
|
757
|
+
Command-line arguments.
|
|
758
|
+
"""
|
|
759
|
+
cargs = []
|
|
760
|
+
cargs.append("-gt")
|
|
761
|
+
return cargs
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
def mrcalc_le_params(
|
|
765
|
+
) -> MrcalcLeParameters:
|
|
766
|
+
"""
|
|
767
|
+
Build parameters.
|
|
768
|
+
|
|
769
|
+
Args:
|
|
770
|
+
Returns:
|
|
771
|
+
Parameter dictionary
|
|
772
|
+
"""
|
|
773
|
+
params = {
|
|
774
|
+
"__STYXTYPE__": "le",
|
|
775
|
+
}
|
|
776
|
+
return params
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
def mrcalc_le_cargs(
|
|
780
|
+
params: MrcalcLeParameters,
|
|
781
|
+
execution: Execution,
|
|
782
|
+
) -> list[str]:
|
|
783
|
+
"""
|
|
784
|
+
Build command-line arguments from parameters.
|
|
785
|
+
|
|
786
|
+
Args:
|
|
787
|
+
params: The parameters.
|
|
788
|
+
execution: The execution object for resolving input paths.
|
|
789
|
+
Returns:
|
|
790
|
+
Command-line arguments.
|
|
791
|
+
"""
|
|
792
|
+
cargs = []
|
|
793
|
+
cargs.append("-le")
|
|
794
|
+
return cargs
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
def mrcalc_ge_params(
|
|
798
|
+
) -> MrcalcGeParameters:
|
|
799
|
+
"""
|
|
800
|
+
Build parameters.
|
|
801
|
+
|
|
802
|
+
Args:
|
|
803
|
+
Returns:
|
|
804
|
+
Parameter dictionary
|
|
805
|
+
"""
|
|
806
|
+
params = {
|
|
807
|
+
"__STYXTYPE__": "ge",
|
|
808
|
+
}
|
|
809
|
+
return params
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
def mrcalc_ge_cargs(
|
|
813
|
+
params: MrcalcGeParameters,
|
|
814
|
+
execution: Execution,
|
|
815
|
+
) -> list[str]:
|
|
816
|
+
"""
|
|
817
|
+
Build command-line arguments from parameters.
|
|
818
|
+
|
|
819
|
+
Args:
|
|
820
|
+
params: The parameters.
|
|
821
|
+
execution: The execution object for resolving input paths.
|
|
822
|
+
Returns:
|
|
823
|
+
Command-line arguments.
|
|
824
|
+
"""
|
|
825
|
+
cargs = []
|
|
826
|
+
cargs.append("-ge")
|
|
827
|
+
return cargs
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
def mrcalc_eq_params(
|
|
831
|
+
) -> MrcalcEqParameters:
|
|
832
|
+
"""
|
|
833
|
+
Build parameters.
|
|
834
|
+
|
|
835
|
+
Args:
|
|
836
|
+
Returns:
|
|
837
|
+
Parameter dictionary
|
|
838
|
+
"""
|
|
839
|
+
params = {
|
|
840
|
+
"__STYXTYPE__": "eq",
|
|
841
|
+
}
|
|
842
|
+
return params
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
def mrcalc_eq_cargs(
|
|
846
|
+
params: MrcalcEqParameters,
|
|
847
|
+
execution: Execution,
|
|
848
|
+
) -> list[str]:
|
|
849
|
+
"""
|
|
850
|
+
Build command-line arguments from parameters.
|
|
851
|
+
|
|
852
|
+
Args:
|
|
853
|
+
params: The parameters.
|
|
854
|
+
execution: The execution object for resolving input paths.
|
|
855
|
+
Returns:
|
|
856
|
+
Command-line arguments.
|
|
857
|
+
"""
|
|
858
|
+
cargs = []
|
|
859
|
+
cargs.append("-eq")
|
|
860
|
+
return cargs
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
def mrcalc_neq_params(
|
|
864
|
+
) -> MrcalcNeqParameters:
|
|
865
|
+
"""
|
|
866
|
+
Build parameters.
|
|
867
|
+
|
|
868
|
+
Args:
|
|
869
|
+
Returns:
|
|
870
|
+
Parameter dictionary
|
|
871
|
+
"""
|
|
872
|
+
params = {
|
|
873
|
+
"__STYXTYPE__": "neq",
|
|
874
|
+
}
|
|
875
|
+
return params
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
def mrcalc_neq_cargs(
|
|
879
|
+
params: MrcalcNeqParameters,
|
|
880
|
+
execution: Execution,
|
|
881
|
+
) -> list[str]:
|
|
882
|
+
"""
|
|
883
|
+
Build command-line arguments from parameters.
|
|
884
|
+
|
|
885
|
+
Args:
|
|
886
|
+
params: The parameters.
|
|
887
|
+
execution: The execution object for resolving input paths.
|
|
888
|
+
Returns:
|
|
889
|
+
Command-line arguments.
|
|
890
|
+
"""
|
|
891
|
+
cargs = []
|
|
892
|
+
cargs.append("-neq")
|
|
893
|
+
return cargs
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
def mrcalc_if_params(
|
|
897
|
+
) -> MrcalcIfParameters:
|
|
898
|
+
"""
|
|
899
|
+
Build parameters.
|
|
900
|
+
|
|
901
|
+
Args:
|
|
902
|
+
Returns:
|
|
903
|
+
Parameter dictionary
|
|
904
|
+
"""
|
|
905
|
+
params = {
|
|
906
|
+
"__STYXTYPE__": "if",
|
|
907
|
+
}
|
|
908
|
+
return params
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
def mrcalc_if_cargs(
|
|
912
|
+
params: MrcalcIfParameters,
|
|
913
|
+
execution: Execution,
|
|
914
|
+
) -> list[str]:
|
|
915
|
+
"""
|
|
916
|
+
Build command-line arguments from parameters.
|
|
917
|
+
|
|
918
|
+
Args:
|
|
919
|
+
params: The parameters.
|
|
920
|
+
execution: The execution object for resolving input paths.
|
|
921
|
+
Returns:
|
|
922
|
+
Command-line arguments.
|
|
923
|
+
"""
|
|
924
|
+
cargs = []
|
|
925
|
+
cargs.append("-if")
|
|
926
|
+
return cargs
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
def mrcalc_replace_params(
|
|
930
|
+
) -> MrcalcReplaceParameters:
|
|
931
|
+
"""
|
|
932
|
+
Build parameters.
|
|
933
|
+
|
|
934
|
+
Args:
|
|
935
|
+
Returns:
|
|
936
|
+
Parameter dictionary
|
|
937
|
+
"""
|
|
938
|
+
params = {
|
|
939
|
+
"__STYXTYPE__": "replace",
|
|
940
|
+
}
|
|
941
|
+
return params
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
def mrcalc_replace_cargs(
|
|
945
|
+
params: MrcalcReplaceParameters,
|
|
946
|
+
execution: Execution,
|
|
947
|
+
) -> list[str]:
|
|
948
|
+
"""
|
|
949
|
+
Build command-line arguments from parameters.
|
|
950
|
+
|
|
951
|
+
Args:
|
|
952
|
+
params: The parameters.
|
|
953
|
+
execution: The execution object for resolving input paths.
|
|
954
|
+
Returns:
|
|
955
|
+
Command-line arguments.
|
|
956
|
+
"""
|
|
957
|
+
cargs = []
|
|
958
|
+
cargs.append("-replace")
|
|
959
|
+
return cargs
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
def mrcalc_sqrt_params(
|
|
963
|
+
) -> MrcalcSqrtParameters:
|
|
964
|
+
"""
|
|
965
|
+
Build parameters.
|
|
966
|
+
|
|
967
|
+
Args:
|
|
968
|
+
Returns:
|
|
969
|
+
Parameter dictionary
|
|
970
|
+
"""
|
|
971
|
+
params = {
|
|
972
|
+
"__STYXTYPE__": "sqrt",
|
|
973
|
+
}
|
|
974
|
+
return params
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
def mrcalc_sqrt_cargs(
|
|
978
|
+
params: MrcalcSqrtParameters,
|
|
979
|
+
execution: Execution,
|
|
980
|
+
) -> list[str]:
|
|
981
|
+
"""
|
|
982
|
+
Build command-line arguments from parameters.
|
|
983
|
+
|
|
984
|
+
Args:
|
|
985
|
+
params: The parameters.
|
|
986
|
+
execution: The execution object for resolving input paths.
|
|
987
|
+
Returns:
|
|
988
|
+
Command-line arguments.
|
|
989
|
+
"""
|
|
990
|
+
cargs = []
|
|
991
|
+
cargs.append("-sqrt")
|
|
992
|
+
return cargs
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
def mrcalc_pow_params(
|
|
996
|
+
) -> MrcalcPowParameters:
|
|
997
|
+
"""
|
|
998
|
+
Build parameters.
|
|
999
|
+
|
|
1000
|
+
Args:
|
|
1001
|
+
Returns:
|
|
1002
|
+
Parameter dictionary
|
|
1003
|
+
"""
|
|
1004
|
+
params = {
|
|
1005
|
+
"__STYXTYPE__": "pow",
|
|
1006
|
+
}
|
|
1007
|
+
return params
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
def mrcalc_pow_cargs(
|
|
1011
|
+
params: MrcalcPowParameters,
|
|
1012
|
+
execution: Execution,
|
|
1013
|
+
) -> list[str]:
|
|
1014
|
+
"""
|
|
1015
|
+
Build command-line arguments from parameters.
|
|
1016
|
+
|
|
1017
|
+
Args:
|
|
1018
|
+
params: The parameters.
|
|
1019
|
+
execution: The execution object for resolving input paths.
|
|
1020
|
+
Returns:
|
|
1021
|
+
Command-line arguments.
|
|
1022
|
+
"""
|
|
1023
|
+
cargs = []
|
|
1024
|
+
cargs.append("-pow")
|
|
1025
|
+
return cargs
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
def mrcalc_round_params(
|
|
1029
|
+
) -> MrcalcRoundParameters:
|
|
1030
|
+
"""
|
|
1031
|
+
Build parameters.
|
|
1032
|
+
|
|
1033
|
+
Args:
|
|
1034
|
+
Returns:
|
|
1035
|
+
Parameter dictionary
|
|
1036
|
+
"""
|
|
1037
|
+
params = {
|
|
1038
|
+
"__STYXTYPE__": "round",
|
|
1039
|
+
}
|
|
1040
|
+
return params
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
def mrcalc_round_cargs(
|
|
1044
|
+
params: MrcalcRoundParameters,
|
|
1045
|
+
execution: Execution,
|
|
1046
|
+
) -> list[str]:
|
|
1047
|
+
"""
|
|
1048
|
+
Build command-line arguments from parameters.
|
|
1049
|
+
|
|
1050
|
+
Args:
|
|
1051
|
+
params: The parameters.
|
|
1052
|
+
execution: The execution object for resolving input paths.
|
|
1053
|
+
Returns:
|
|
1054
|
+
Command-line arguments.
|
|
1055
|
+
"""
|
|
1056
|
+
cargs = []
|
|
1057
|
+
cargs.append("-round")
|
|
1058
|
+
return cargs
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
def mrcalc_ceil_params(
|
|
1062
|
+
) -> MrcalcCeilParameters:
|
|
1063
|
+
"""
|
|
1064
|
+
Build parameters.
|
|
1065
|
+
|
|
1066
|
+
Args:
|
|
1067
|
+
Returns:
|
|
1068
|
+
Parameter dictionary
|
|
1069
|
+
"""
|
|
1070
|
+
params = {
|
|
1071
|
+
"__STYXTYPE__": "ceil",
|
|
1072
|
+
}
|
|
1073
|
+
return params
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
def mrcalc_ceil_cargs(
|
|
1077
|
+
params: MrcalcCeilParameters,
|
|
1078
|
+
execution: Execution,
|
|
1079
|
+
) -> list[str]:
|
|
1080
|
+
"""
|
|
1081
|
+
Build command-line arguments from parameters.
|
|
1082
|
+
|
|
1083
|
+
Args:
|
|
1084
|
+
params: The parameters.
|
|
1085
|
+
execution: The execution object for resolving input paths.
|
|
1086
|
+
Returns:
|
|
1087
|
+
Command-line arguments.
|
|
1088
|
+
"""
|
|
1089
|
+
cargs = []
|
|
1090
|
+
cargs.append("-ceil")
|
|
1091
|
+
return cargs
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
def mrcalc_floor_params(
|
|
1095
|
+
) -> MrcalcFloorParameters:
|
|
1096
|
+
"""
|
|
1097
|
+
Build parameters.
|
|
1098
|
+
|
|
1099
|
+
Args:
|
|
1100
|
+
Returns:
|
|
1101
|
+
Parameter dictionary
|
|
1102
|
+
"""
|
|
1103
|
+
params = {
|
|
1104
|
+
"__STYXTYPE__": "floor",
|
|
1105
|
+
}
|
|
1106
|
+
return params
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
def mrcalc_floor_cargs(
|
|
1110
|
+
params: MrcalcFloorParameters,
|
|
1111
|
+
execution: Execution,
|
|
1112
|
+
) -> list[str]:
|
|
1113
|
+
"""
|
|
1114
|
+
Build command-line arguments from parameters.
|
|
1115
|
+
|
|
1116
|
+
Args:
|
|
1117
|
+
params: The parameters.
|
|
1118
|
+
execution: The execution object for resolving input paths.
|
|
1119
|
+
Returns:
|
|
1120
|
+
Command-line arguments.
|
|
1121
|
+
"""
|
|
1122
|
+
cargs = []
|
|
1123
|
+
cargs.append("-floor")
|
|
1124
|
+
return cargs
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
def mrcalc_not_params(
|
|
1128
|
+
) -> MrcalcNotParameters:
|
|
1129
|
+
"""
|
|
1130
|
+
Build parameters.
|
|
1131
|
+
|
|
1132
|
+
Args:
|
|
1133
|
+
Returns:
|
|
1134
|
+
Parameter dictionary
|
|
1135
|
+
"""
|
|
1136
|
+
params = {
|
|
1137
|
+
"__STYXTYPE__": "not",
|
|
1138
|
+
}
|
|
1139
|
+
return params
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
def mrcalc_not_cargs(
|
|
1143
|
+
params: MrcalcNotParameters,
|
|
1144
|
+
execution: Execution,
|
|
1145
|
+
) -> list[str]:
|
|
1146
|
+
"""
|
|
1147
|
+
Build command-line arguments from parameters.
|
|
1148
|
+
|
|
1149
|
+
Args:
|
|
1150
|
+
params: The parameters.
|
|
1151
|
+
execution: The execution object for resolving input paths.
|
|
1152
|
+
Returns:
|
|
1153
|
+
Command-line arguments.
|
|
1154
|
+
"""
|
|
1155
|
+
cargs = []
|
|
1156
|
+
cargs.append("-not")
|
|
1157
|
+
return cargs
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
def mrcalc_and_params(
|
|
1161
|
+
) -> MrcalcAndParameters:
|
|
1162
|
+
"""
|
|
1163
|
+
Build parameters.
|
|
1164
|
+
|
|
1165
|
+
Args:
|
|
1166
|
+
Returns:
|
|
1167
|
+
Parameter dictionary
|
|
1168
|
+
"""
|
|
1169
|
+
params = {
|
|
1170
|
+
"__STYXTYPE__": "and",
|
|
1171
|
+
}
|
|
1172
|
+
return params
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
def mrcalc_and_cargs(
|
|
1176
|
+
params: MrcalcAndParameters,
|
|
1177
|
+
execution: Execution,
|
|
1178
|
+
) -> list[str]:
|
|
1179
|
+
"""
|
|
1180
|
+
Build command-line arguments from parameters.
|
|
1181
|
+
|
|
1182
|
+
Args:
|
|
1183
|
+
params: The parameters.
|
|
1184
|
+
execution: The execution object for resolving input paths.
|
|
1185
|
+
Returns:
|
|
1186
|
+
Command-line arguments.
|
|
1187
|
+
"""
|
|
1188
|
+
cargs = []
|
|
1189
|
+
cargs.append("-and")
|
|
1190
|
+
return cargs
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
def mrcalc_or_params(
|
|
1194
|
+
) -> MrcalcOrParameters:
|
|
1195
|
+
"""
|
|
1196
|
+
Build parameters.
|
|
1197
|
+
|
|
1198
|
+
Args:
|
|
1199
|
+
Returns:
|
|
1200
|
+
Parameter dictionary
|
|
1201
|
+
"""
|
|
1202
|
+
params = {
|
|
1203
|
+
"__STYXTYPE__": "or",
|
|
1204
|
+
}
|
|
1205
|
+
return params
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
def mrcalc_or_cargs(
|
|
1209
|
+
params: MrcalcOrParameters,
|
|
1210
|
+
execution: Execution,
|
|
1211
|
+
) -> list[str]:
|
|
1212
|
+
"""
|
|
1213
|
+
Build command-line arguments from parameters.
|
|
1214
|
+
|
|
1215
|
+
Args:
|
|
1216
|
+
params: The parameters.
|
|
1217
|
+
execution: The execution object for resolving input paths.
|
|
1218
|
+
Returns:
|
|
1219
|
+
Command-line arguments.
|
|
1220
|
+
"""
|
|
1221
|
+
cargs = []
|
|
1222
|
+
cargs.append("-or")
|
|
1223
|
+
return cargs
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
def mrcalc_xor_params(
|
|
1227
|
+
) -> MrcalcXorParameters:
|
|
1228
|
+
"""
|
|
1229
|
+
Build parameters.
|
|
1230
|
+
|
|
1231
|
+
Args:
|
|
1232
|
+
Returns:
|
|
1233
|
+
Parameter dictionary
|
|
1234
|
+
"""
|
|
1235
|
+
params = {
|
|
1236
|
+
"__STYXTYPE__": "xor",
|
|
1237
|
+
}
|
|
1238
|
+
return params
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
def mrcalc_xor_cargs(
|
|
1242
|
+
params: MrcalcXorParameters,
|
|
1243
|
+
execution: Execution,
|
|
1244
|
+
) -> list[str]:
|
|
1245
|
+
"""
|
|
1246
|
+
Build command-line arguments from parameters.
|
|
1247
|
+
|
|
1248
|
+
Args:
|
|
1249
|
+
params: The parameters.
|
|
1250
|
+
execution: The execution object for resolving input paths.
|
|
1251
|
+
Returns:
|
|
1252
|
+
Command-line arguments.
|
|
1253
|
+
"""
|
|
1254
|
+
cargs = []
|
|
1255
|
+
cargs.append("-xor")
|
|
1256
|
+
return cargs
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
def mrcalc_isnan_params(
|
|
1260
|
+
) -> MrcalcIsnanParameters:
|
|
1261
|
+
"""
|
|
1262
|
+
Build parameters.
|
|
1263
|
+
|
|
1264
|
+
Args:
|
|
1265
|
+
Returns:
|
|
1266
|
+
Parameter dictionary
|
|
1267
|
+
"""
|
|
1268
|
+
params = {
|
|
1269
|
+
"__STYXTYPE__": "isnan",
|
|
1270
|
+
}
|
|
1271
|
+
return params
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
def mrcalc_isnan_cargs(
|
|
1275
|
+
params: MrcalcIsnanParameters,
|
|
1276
|
+
execution: Execution,
|
|
1277
|
+
) -> list[str]:
|
|
1278
|
+
"""
|
|
1279
|
+
Build command-line arguments from parameters.
|
|
1280
|
+
|
|
1281
|
+
Args:
|
|
1282
|
+
params: The parameters.
|
|
1283
|
+
execution: The execution object for resolving input paths.
|
|
1284
|
+
Returns:
|
|
1285
|
+
Command-line arguments.
|
|
1286
|
+
"""
|
|
1287
|
+
cargs = []
|
|
1288
|
+
cargs.append("-isnan")
|
|
1289
|
+
return cargs
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
def mrcalc_isinf_params(
|
|
1293
|
+
) -> MrcalcIsinfParameters:
|
|
1294
|
+
"""
|
|
1295
|
+
Build parameters.
|
|
1296
|
+
|
|
1297
|
+
Args:
|
|
1298
|
+
Returns:
|
|
1299
|
+
Parameter dictionary
|
|
1300
|
+
"""
|
|
1301
|
+
params = {
|
|
1302
|
+
"__STYXTYPE__": "isinf",
|
|
1303
|
+
}
|
|
1304
|
+
return params
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
def mrcalc_isinf_cargs(
|
|
1308
|
+
params: MrcalcIsinfParameters,
|
|
1309
|
+
execution: Execution,
|
|
1310
|
+
) -> list[str]:
|
|
1311
|
+
"""
|
|
1312
|
+
Build command-line arguments from parameters.
|
|
1313
|
+
|
|
1314
|
+
Args:
|
|
1315
|
+
params: The parameters.
|
|
1316
|
+
execution: The execution object for resolving input paths.
|
|
1317
|
+
Returns:
|
|
1318
|
+
Command-line arguments.
|
|
1319
|
+
"""
|
|
1320
|
+
cargs = []
|
|
1321
|
+
cargs.append("-isinf")
|
|
1322
|
+
return cargs
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
def mrcalc_finite_params(
|
|
1326
|
+
) -> MrcalcFiniteParameters:
|
|
1327
|
+
"""
|
|
1328
|
+
Build parameters.
|
|
1329
|
+
|
|
1330
|
+
Args:
|
|
1331
|
+
Returns:
|
|
1332
|
+
Parameter dictionary
|
|
1333
|
+
"""
|
|
1334
|
+
params = {
|
|
1335
|
+
"__STYXTYPE__": "finite",
|
|
1336
|
+
}
|
|
1337
|
+
return params
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
def mrcalc_finite_cargs(
|
|
1341
|
+
params: MrcalcFiniteParameters,
|
|
1342
|
+
execution: Execution,
|
|
1343
|
+
) -> list[str]:
|
|
1344
|
+
"""
|
|
1345
|
+
Build command-line arguments from parameters.
|
|
1346
|
+
|
|
1347
|
+
Args:
|
|
1348
|
+
params: The parameters.
|
|
1349
|
+
execution: The execution object for resolving input paths.
|
|
1350
|
+
Returns:
|
|
1351
|
+
Command-line arguments.
|
|
1352
|
+
"""
|
|
1353
|
+
cargs = []
|
|
1354
|
+
cargs.append("-finite")
|
|
1355
|
+
return cargs
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
def mrcalc_complex_params(
|
|
1359
|
+
) -> MrcalcComplexParameters:
|
|
1360
|
+
"""
|
|
1361
|
+
Build parameters.
|
|
1362
|
+
|
|
1363
|
+
Args:
|
|
1364
|
+
Returns:
|
|
1365
|
+
Parameter dictionary
|
|
1366
|
+
"""
|
|
1367
|
+
params = {
|
|
1368
|
+
"__STYXTYPE__": "complex",
|
|
1369
|
+
}
|
|
1370
|
+
return params
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
def mrcalc_complex_cargs(
|
|
1374
|
+
params: MrcalcComplexParameters,
|
|
1375
|
+
execution: Execution,
|
|
1376
|
+
) -> list[str]:
|
|
1377
|
+
"""
|
|
1378
|
+
Build command-line arguments from parameters.
|
|
1379
|
+
|
|
1380
|
+
Args:
|
|
1381
|
+
params: The parameters.
|
|
1382
|
+
execution: The execution object for resolving input paths.
|
|
1383
|
+
Returns:
|
|
1384
|
+
Command-line arguments.
|
|
1385
|
+
"""
|
|
1386
|
+
cargs = []
|
|
1387
|
+
cargs.append("-complex")
|
|
1388
|
+
return cargs
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
def mrcalc_polar_params(
|
|
1392
|
+
) -> MrcalcPolarParameters:
|
|
1393
|
+
"""
|
|
1394
|
+
Build parameters.
|
|
1395
|
+
|
|
1396
|
+
Args:
|
|
1397
|
+
Returns:
|
|
1398
|
+
Parameter dictionary
|
|
1399
|
+
"""
|
|
1400
|
+
params = {
|
|
1401
|
+
"__STYXTYPE__": "polar",
|
|
1402
|
+
}
|
|
1403
|
+
return params
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
def mrcalc_polar_cargs(
|
|
1407
|
+
params: MrcalcPolarParameters,
|
|
1408
|
+
execution: Execution,
|
|
1409
|
+
) -> list[str]:
|
|
1410
|
+
"""
|
|
1411
|
+
Build command-line arguments from parameters.
|
|
1412
|
+
|
|
1413
|
+
Args:
|
|
1414
|
+
params: The parameters.
|
|
1415
|
+
execution: The execution object for resolving input paths.
|
|
1416
|
+
Returns:
|
|
1417
|
+
Command-line arguments.
|
|
1418
|
+
"""
|
|
1419
|
+
cargs = []
|
|
1420
|
+
cargs.append("-polar")
|
|
1421
|
+
return cargs
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
def mrcalc_real_params(
|
|
1425
|
+
) -> MrcalcRealParameters:
|
|
1426
|
+
"""
|
|
1427
|
+
Build parameters.
|
|
1428
|
+
|
|
1429
|
+
Args:
|
|
1430
|
+
Returns:
|
|
1431
|
+
Parameter dictionary
|
|
1432
|
+
"""
|
|
1433
|
+
params = {
|
|
1434
|
+
"__STYXTYPE__": "real",
|
|
1435
|
+
}
|
|
1436
|
+
return params
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
def mrcalc_real_cargs(
|
|
1440
|
+
params: MrcalcRealParameters,
|
|
1441
|
+
execution: Execution,
|
|
1442
|
+
) -> list[str]:
|
|
1443
|
+
"""
|
|
1444
|
+
Build command-line arguments from parameters.
|
|
1445
|
+
|
|
1446
|
+
Args:
|
|
1447
|
+
params: The parameters.
|
|
1448
|
+
execution: The execution object for resolving input paths.
|
|
1449
|
+
Returns:
|
|
1450
|
+
Command-line arguments.
|
|
1451
|
+
"""
|
|
1452
|
+
cargs = []
|
|
1453
|
+
cargs.append("-real")
|
|
1454
|
+
return cargs
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
def mrcalc_imag_params(
|
|
1458
|
+
) -> MrcalcImagParameters:
|
|
1459
|
+
"""
|
|
1460
|
+
Build parameters.
|
|
1461
|
+
|
|
1462
|
+
Args:
|
|
1463
|
+
Returns:
|
|
1464
|
+
Parameter dictionary
|
|
1465
|
+
"""
|
|
1466
|
+
params = {
|
|
1467
|
+
"__STYXTYPE__": "imag",
|
|
1468
|
+
}
|
|
1469
|
+
return params
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
def mrcalc_imag_cargs(
|
|
1473
|
+
params: MrcalcImagParameters,
|
|
1474
|
+
execution: Execution,
|
|
1475
|
+
) -> list[str]:
|
|
1476
|
+
"""
|
|
1477
|
+
Build command-line arguments from parameters.
|
|
1478
|
+
|
|
1479
|
+
Args:
|
|
1480
|
+
params: The parameters.
|
|
1481
|
+
execution: The execution object for resolving input paths.
|
|
1482
|
+
Returns:
|
|
1483
|
+
Command-line arguments.
|
|
1484
|
+
"""
|
|
1485
|
+
cargs = []
|
|
1486
|
+
cargs.append("-imag")
|
|
1487
|
+
return cargs
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
def mrcalc_phase_params(
|
|
1491
|
+
) -> MrcalcPhaseParameters:
|
|
1492
|
+
"""
|
|
1493
|
+
Build parameters.
|
|
1494
|
+
|
|
1495
|
+
Args:
|
|
1496
|
+
Returns:
|
|
1497
|
+
Parameter dictionary
|
|
1498
|
+
"""
|
|
1499
|
+
params = {
|
|
1500
|
+
"__STYXTYPE__": "phase",
|
|
1501
|
+
}
|
|
1502
|
+
return params
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
def mrcalc_phase_cargs(
|
|
1506
|
+
params: MrcalcPhaseParameters,
|
|
1507
|
+
execution: Execution,
|
|
1508
|
+
) -> list[str]:
|
|
1509
|
+
"""
|
|
1510
|
+
Build command-line arguments from parameters.
|
|
1511
|
+
|
|
1512
|
+
Args:
|
|
1513
|
+
params: The parameters.
|
|
1514
|
+
execution: The execution object for resolving input paths.
|
|
1515
|
+
Returns:
|
|
1516
|
+
Command-line arguments.
|
|
1517
|
+
"""
|
|
1518
|
+
cargs = []
|
|
1519
|
+
cargs.append("-phase")
|
|
1520
|
+
return cargs
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
def mrcalc_conj_params(
|
|
1524
|
+
) -> MrcalcConjParameters:
|
|
1525
|
+
"""
|
|
1526
|
+
Build parameters.
|
|
1527
|
+
|
|
1528
|
+
Args:
|
|
1529
|
+
Returns:
|
|
1530
|
+
Parameter dictionary
|
|
1531
|
+
"""
|
|
1532
|
+
params = {
|
|
1533
|
+
"__STYXTYPE__": "conj",
|
|
1534
|
+
}
|
|
1535
|
+
return params
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
def mrcalc_conj_cargs(
|
|
1539
|
+
params: MrcalcConjParameters,
|
|
1540
|
+
execution: Execution,
|
|
1541
|
+
) -> list[str]:
|
|
1542
|
+
"""
|
|
1543
|
+
Build command-line arguments from parameters.
|
|
1544
|
+
|
|
1545
|
+
Args:
|
|
1546
|
+
params: The parameters.
|
|
1547
|
+
execution: The execution object for resolving input paths.
|
|
1548
|
+
Returns:
|
|
1549
|
+
Command-line arguments.
|
|
1550
|
+
"""
|
|
1551
|
+
cargs = []
|
|
1552
|
+
cargs.append("-conj")
|
|
1553
|
+
return cargs
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
def mrcalc_proj_params(
|
|
1557
|
+
) -> MrcalcProjParameters:
|
|
1558
|
+
"""
|
|
1559
|
+
Build parameters.
|
|
1560
|
+
|
|
1561
|
+
Args:
|
|
1562
|
+
Returns:
|
|
1563
|
+
Parameter dictionary
|
|
1564
|
+
"""
|
|
1565
|
+
params = {
|
|
1566
|
+
"__STYXTYPE__": "proj",
|
|
1567
|
+
}
|
|
1568
|
+
return params
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
def mrcalc_proj_cargs(
|
|
1572
|
+
params: MrcalcProjParameters,
|
|
1573
|
+
execution: Execution,
|
|
1574
|
+
) -> list[str]:
|
|
1575
|
+
"""
|
|
1576
|
+
Build command-line arguments from parameters.
|
|
1577
|
+
|
|
1578
|
+
Args:
|
|
1579
|
+
params: The parameters.
|
|
1580
|
+
execution: The execution object for resolving input paths.
|
|
1581
|
+
Returns:
|
|
1582
|
+
Command-line arguments.
|
|
1583
|
+
"""
|
|
1584
|
+
cargs = []
|
|
1585
|
+
cargs.append("-proj")
|
|
1586
|
+
return cargs
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
def mrcalc_exp_params(
|
|
1590
|
+
) -> MrcalcExpParameters:
|
|
1591
|
+
"""
|
|
1592
|
+
Build parameters.
|
|
1593
|
+
|
|
1594
|
+
Args:
|
|
1595
|
+
Returns:
|
|
1596
|
+
Parameter dictionary
|
|
1597
|
+
"""
|
|
1598
|
+
params = {
|
|
1599
|
+
"__STYXTYPE__": "exp",
|
|
1600
|
+
}
|
|
1601
|
+
return params
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
def mrcalc_exp_cargs(
|
|
1605
|
+
params: MrcalcExpParameters,
|
|
1606
|
+
execution: Execution,
|
|
1607
|
+
) -> list[str]:
|
|
1608
|
+
"""
|
|
1609
|
+
Build command-line arguments from parameters.
|
|
1610
|
+
|
|
1611
|
+
Args:
|
|
1612
|
+
params: The parameters.
|
|
1613
|
+
execution: The execution object for resolving input paths.
|
|
1614
|
+
Returns:
|
|
1615
|
+
Command-line arguments.
|
|
1616
|
+
"""
|
|
1617
|
+
cargs = []
|
|
1618
|
+
cargs.append("-exp")
|
|
1619
|
+
return cargs
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
def mrcalc_log_params(
|
|
1623
|
+
) -> MrcalcLogParameters:
|
|
1624
|
+
"""
|
|
1625
|
+
Build parameters.
|
|
1626
|
+
|
|
1627
|
+
Args:
|
|
1628
|
+
Returns:
|
|
1629
|
+
Parameter dictionary
|
|
1630
|
+
"""
|
|
1631
|
+
params = {
|
|
1632
|
+
"__STYXTYPE__": "log",
|
|
1633
|
+
}
|
|
1634
|
+
return params
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
def mrcalc_log_cargs(
|
|
1638
|
+
params: MrcalcLogParameters,
|
|
1639
|
+
execution: Execution,
|
|
1640
|
+
) -> list[str]:
|
|
1641
|
+
"""
|
|
1642
|
+
Build command-line arguments from parameters.
|
|
1643
|
+
|
|
1644
|
+
Args:
|
|
1645
|
+
params: The parameters.
|
|
1646
|
+
execution: The execution object for resolving input paths.
|
|
1647
|
+
Returns:
|
|
1648
|
+
Command-line arguments.
|
|
1649
|
+
"""
|
|
1650
|
+
cargs = []
|
|
1651
|
+
cargs.append("-log")
|
|
1652
|
+
return cargs
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
def mrcalc_log10_params(
|
|
1656
|
+
) -> MrcalcLog10Parameters:
|
|
1657
|
+
"""
|
|
1658
|
+
Build parameters.
|
|
1659
|
+
|
|
1660
|
+
Args:
|
|
1661
|
+
Returns:
|
|
1662
|
+
Parameter dictionary
|
|
1663
|
+
"""
|
|
1664
|
+
params = {
|
|
1665
|
+
"__STYXTYPE__": "log10",
|
|
1666
|
+
}
|
|
1667
|
+
return params
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
def mrcalc_log10_cargs(
|
|
1671
|
+
params: MrcalcLog10Parameters,
|
|
1672
|
+
execution: Execution,
|
|
1673
|
+
) -> list[str]:
|
|
1674
|
+
"""
|
|
1675
|
+
Build command-line arguments from parameters.
|
|
1676
|
+
|
|
1677
|
+
Args:
|
|
1678
|
+
params: The parameters.
|
|
1679
|
+
execution: The execution object for resolving input paths.
|
|
1680
|
+
Returns:
|
|
1681
|
+
Command-line arguments.
|
|
1682
|
+
"""
|
|
1683
|
+
cargs = []
|
|
1684
|
+
cargs.append("-log10")
|
|
1685
|
+
return cargs
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
def mrcalc_cos_params(
|
|
1689
|
+
) -> MrcalcCosParameters:
|
|
1690
|
+
"""
|
|
1691
|
+
Build parameters.
|
|
1692
|
+
|
|
1693
|
+
Args:
|
|
1694
|
+
Returns:
|
|
1695
|
+
Parameter dictionary
|
|
1696
|
+
"""
|
|
1697
|
+
params = {
|
|
1698
|
+
"__STYXTYPE__": "cos",
|
|
1699
|
+
}
|
|
1700
|
+
return params
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
def mrcalc_cos_cargs(
|
|
1704
|
+
params: MrcalcCosParameters,
|
|
1705
|
+
execution: Execution,
|
|
1706
|
+
) -> list[str]:
|
|
1707
|
+
"""
|
|
1708
|
+
Build command-line arguments from parameters.
|
|
1709
|
+
|
|
1710
|
+
Args:
|
|
1711
|
+
params: The parameters.
|
|
1712
|
+
execution: The execution object for resolving input paths.
|
|
1713
|
+
Returns:
|
|
1714
|
+
Command-line arguments.
|
|
1715
|
+
"""
|
|
1716
|
+
cargs = []
|
|
1717
|
+
cargs.append("-cos")
|
|
1718
|
+
return cargs
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
def mrcalc_sin_params(
|
|
1722
|
+
) -> MrcalcSinParameters:
|
|
1723
|
+
"""
|
|
1724
|
+
Build parameters.
|
|
1725
|
+
|
|
1726
|
+
Args:
|
|
1727
|
+
Returns:
|
|
1728
|
+
Parameter dictionary
|
|
1729
|
+
"""
|
|
1730
|
+
params = {
|
|
1731
|
+
"__STYXTYPE__": "sin",
|
|
1732
|
+
}
|
|
1733
|
+
return params
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
def mrcalc_sin_cargs(
|
|
1737
|
+
params: MrcalcSinParameters,
|
|
1738
|
+
execution: Execution,
|
|
1739
|
+
) -> list[str]:
|
|
1740
|
+
"""
|
|
1741
|
+
Build command-line arguments from parameters.
|
|
1742
|
+
|
|
1743
|
+
Args:
|
|
1744
|
+
params: The parameters.
|
|
1745
|
+
execution: The execution object for resolving input paths.
|
|
1746
|
+
Returns:
|
|
1747
|
+
Command-line arguments.
|
|
1748
|
+
"""
|
|
1749
|
+
cargs = []
|
|
1750
|
+
cargs.append("-sin")
|
|
1751
|
+
return cargs
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
def mrcalc_tan_params(
|
|
1755
|
+
) -> MrcalcTanParameters:
|
|
1756
|
+
"""
|
|
1757
|
+
Build parameters.
|
|
1758
|
+
|
|
1759
|
+
Args:
|
|
1760
|
+
Returns:
|
|
1761
|
+
Parameter dictionary
|
|
1762
|
+
"""
|
|
1763
|
+
params = {
|
|
1764
|
+
"__STYXTYPE__": "tan",
|
|
1765
|
+
}
|
|
1766
|
+
return params
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
def mrcalc_tan_cargs(
|
|
1770
|
+
params: MrcalcTanParameters,
|
|
1771
|
+
execution: Execution,
|
|
1772
|
+
) -> list[str]:
|
|
1773
|
+
"""
|
|
1774
|
+
Build command-line arguments from parameters.
|
|
1775
|
+
|
|
1776
|
+
Args:
|
|
1777
|
+
params: The parameters.
|
|
1778
|
+
execution: The execution object for resolving input paths.
|
|
1779
|
+
Returns:
|
|
1780
|
+
Command-line arguments.
|
|
1781
|
+
"""
|
|
1782
|
+
cargs = []
|
|
1783
|
+
cargs.append("-tan")
|
|
1784
|
+
return cargs
|
|
1785
|
+
|
|
1786
|
+
|
|
1787
|
+
def mrcalc_acos_params(
|
|
1788
|
+
) -> MrcalcAcosParameters:
|
|
1789
|
+
"""
|
|
1790
|
+
Build parameters.
|
|
1791
|
+
|
|
1792
|
+
Args:
|
|
1793
|
+
Returns:
|
|
1794
|
+
Parameter dictionary
|
|
1795
|
+
"""
|
|
1796
|
+
params = {
|
|
1797
|
+
"__STYXTYPE__": "acos",
|
|
1798
|
+
}
|
|
1799
|
+
return params
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
def mrcalc_acos_cargs(
|
|
1803
|
+
params: MrcalcAcosParameters,
|
|
1804
|
+
execution: Execution,
|
|
1805
|
+
) -> list[str]:
|
|
1806
|
+
"""
|
|
1807
|
+
Build command-line arguments from parameters.
|
|
1808
|
+
|
|
1809
|
+
Args:
|
|
1810
|
+
params: The parameters.
|
|
1811
|
+
execution: The execution object for resolving input paths.
|
|
1812
|
+
Returns:
|
|
1813
|
+
Command-line arguments.
|
|
1814
|
+
"""
|
|
1815
|
+
cargs = []
|
|
1816
|
+
cargs.append("-acos")
|
|
1817
|
+
return cargs
|
|
1818
|
+
|
|
1819
|
+
|
|
1820
|
+
def mrcalc_asin_params(
|
|
1821
|
+
) -> MrcalcAsinParameters:
|
|
1822
|
+
"""
|
|
1823
|
+
Build parameters.
|
|
1824
|
+
|
|
1825
|
+
Args:
|
|
1826
|
+
Returns:
|
|
1827
|
+
Parameter dictionary
|
|
1828
|
+
"""
|
|
1829
|
+
params = {
|
|
1830
|
+
"__STYXTYPE__": "asin",
|
|
1831
|
+
}
|
|
1832
|
+
return params
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
def mrcalc_asin_cargs(
|
|
1836
|
+
params: MrcalcAsinParameters,
|
|
1837
|
+
execution: Execution,
|
|
1838
|
+
) -> list[str]:
|
|
1839
|
+
"""
|
|
1840
|
+
Build command-line arguments from parameters.
|
|
1841
|
+
|
|
1842
|
+
Args:
|
|
1843
|
+
params: The parameters.
|
|
1844
|
+
execution: The execution object for resolving input paths.
|
|
1845
|
+
Returns:
|
|
1846
|
+
Command-line arguments.
|
|
1847
|
+
"""
|
|
1848
|
+
cargs = []
|
|
1849
|
+
cargs.append("-asin")
|
|
1850
|
+
return cargs
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
def mrcalc_atan_params(
|
|
1854
|
+
) -> MrcalcAtanParameters:
|
|
1855
|
+
"""
|
|
1856
|
+
Build parameters.
|
|
1857
|
+
|
|
1858
|
+
Args:
|
|
1859
|
+
Returns:
|
|
1860
|
+
Parameter dictionary
|
|
1861
|
+
"""
|
|
1862
|
+
params = {
|
|
1863
|
+
"__STYXTYPE__": "atan",
|
|
1864
|
+
}
|
|
1865
|
+
return params
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
def mrcalc_atan_cargs(
|
|
1869
|
+
params: MrcalcAtanParameters,
|
|
1870
|
+
execution: Execution,
|
|
1871
|
+
) -> list[str]:
|
|
1872
|
+
"""
|
|
1873
|
+
Build command-line arguments from parameters.
|
|
1874
|
+
|
|
1875
|
+
Args:
|
|
1876
|
+
params: The parameters.
|
|
1877
|
+
execution: The execution object for resolving input paths.
|
|
1878
|
+
Returns:
|
|
1879
|
+
Command-line arguments.
|
|
1880
|
+
"""
|
|
1881
|
+
cargs = []
|
|
1882
|
+
cargs.append("-atan")
|
|
1883
|
+
return cargs
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
def mrcalc_cosh_params(
|
|
1887
|
+
) -> MrcalcCoshParameters:
|
|
1888
|
+
"""
|
|
1889
|
+
Build parameters.
|
|
1890
|
+
|
|
1891
|
+
Args:
|
|
1892
|
+
Returns:
|
|
1893
|
+
Parameter dictionary
|
|
1894
|
+
"""
|
|
1895
|
+
params = {
|
|
1896
|
+
"__STYXTYPE__": "cosh",
|
|
1897
|
+
}
|
|
1898
|
+
return params
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
def mrcalc_cosh_cargs(
|
|
1902
|
+
params: MrcalcCoshParameters,
|
|
1903
|
+
execution: Execution,
|
|
1904
|
+
) -> list[str]:
|
|
1905
|
+
"""
|
|
1906
|
+
Build command-line arguments from parameters.
|
|
1907
|
+
|
|
1908
|
+
Args:
|
|
1909
|
+
params: The parameters.
|
|
1910
|
+
execution: The execution object for resolving input paths.
|
|
1911
|
+
Returns:
|
|
1912
|
+
Command-line arguments.
|
|
1913
|
+
"""
|
|
1914
|
+
cargs = []
|
|
1915
|
+
cargs.append("-cosh")
|
|
1916
|
+
return cargs
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
def mrcalc_sinh_params(
|
|
1920
|
+
) -> MrcalcSinhParameters:
|
|
1921
|
+
"""
|
|
1922
|
+
Build parameters.
|
|
1923
|
+
|
|
1924
|
+
Args:
|
|
1925
|
+
Returns:
|
|
1926
|
+
Parameter dictionary
|
|
1927
|
+
"""
|
|
1928
|
+
params = {
|
|
1929
|
+
"__STYXTYPE__": "sinh",
|
|
1930
|
+
}
|
|
1931
|
+
return params
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
def mrcalc_sinh_cargs(
|
|
1935
|
+
params: MrcalcSinhParameters,
|
|
1936
|
+
execution: Execution,
|
|
1937
|
+
) -> list[str]:
|
|
1938
|
+
"""
|
|
1939
|
+
Build command-line arguments from parameters.
|
|
1940
|
+
|
|
1941
|
+
Args:
|
|
1942
|
+
params: The parameters.
|
|
1943
|
+
execution: The execution object for resolving input paths.
|
|
1944
|
+
Returns:
|
|
1945
|
+
Command-line arguments.
|
|
1946
|
+
"""
|
|
1947
|
+
cargs = []
|
|
1948
|
+
cargs.append("-sinh")
|
|
1949
|
+
return cargs
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
def mrcalc_tanh_params(
|
|
1953
|
+
) -> MrcalcTanhParameters:
|
|
1954
|
+
"""
|
|
1955
|
+
Build parameters.
|
|
1956
|
+
|
|
1957
|
+
Args:
|
|
1958
|
+
Returns:
|
|
1959
|
+
Parameter dictionary
|
|
1960
|
+
"""
|
|
1961
|
+
params = {
|
|
1962
|
+
"__STYXTYPE__": "tanh",
|
|
1963
|
+
}
|
|
1964
|
+
return params
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
def mrcalc_tanh_cargs(
|
|
1968
|
+
params: MrcalcTanhParameters,
|
|
1969
|
+
execution: Execution,
|
|
1970
|
+
) -> list[str]:
|
|
1971
|
+
"""
|
|
1972
|
+
Build command-line arguments from parameters.
|
|
1973
|
+
|
|
1974
|
+
Args:
|
|
1975
|
+
params: The parameters.
|
|
1976
|
+
execution: The execution object for resolving input paths.
|
|
1977
|
+
Returns:
|
|
1978
|
+
Command-line arguments.
|
|
1979
|
+
"""
|
|
1980
|
+
cargs = []
|
|
1981
|
+
cargs.append("-tanh")
|
|
1982
|
+
return cargs
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
def mrcalc_acosh_params(
|
|
1986
|
+
) -> MrcalcAcoshParameters:
|
|
1987
|
+
"""
|
|
1988
|
+
Build parameters.
|
|
1989
|
+
|
|
1990
|
+
Args:
|
|
1991
|
+
Returns:
|
|
1992
|
+
Parameter dictionary
|
|
1993
|
+
"""
|
|
1994
|
+
params = {
|
|
1995
|
+
"__STYXTYPE__": "acosh",
|
|
1996
|
+
}
|
|
1997
|
+
return params
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
def mrcalc_acosh_cargs(
|
|
2001
|
+
params: MrcalcAcoshParameters,
|
|
2002
|
+
execution: Execution,
|
|
2003
|
+
) -> list[str]:
|
|
2004
|
+
"""
|
|
2005
|
+
Build command-line arguments from parameters.
|
|
2006
|
+
|
|
2007
|
+
Args:
|
|
2008
|
+
params: The parameters.
|
|
2009
|
+
execution: The execution object for resolving input paths.
|
|
2010
|
+
Returns:
|
|
2011
|
+
Command-line arguments.
|
|
2012
|
+
"""
|
|
2013
|
+
cargs = []
|
|
2014
|
+
cargs.append("-acosh")
|
|
2015
|
+
return cargs
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
def mrcalc_asinh_params(
|
|
2019
|
+
) -> MrcalcAsinhParameters:
|
|
2020
|
+
"""
|
|
2021
|
+
Build parameters.
|
|
2022
|
+
|
|
2023
|
+
Args:
|
|
2024
|
+
Returns:
|
|
2025
|
+
Parameter dictionary
|
|
2026
|
+
"""
|
|
2027
|
+
params = {
|
|
2028
|
+
"__STYXTYPE__": "asinh",
|
|
2029
|
+
}
|
|
2030
|
+
return params
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
def mrcalc_asinh_cargs(
|
|
2034
|
+
params: MrcalcAsinhParameters,
|
|
2035
|
+
execution: Execution,
|
|
2036
|
+
) -> list[str]:
|
|
2037
|
+
"""
|
|
2038
|
+
Build command-line arguments from parameters.
|
|
2039
|
+
|
|
2040
|
+
Args:
|
|
2041
|
+
params: The parameters.
|
|
2042
|
+
execution: The execution object for resolving input paths.
|
|
2043
|
+
Returns:
|
|
2044
|
+
Command-line arguments.
|
|
2045
|
+
"""
|
|
2046
|
+
cargs = []
|
|
2047
|
+
cargs.append("-asinh")
|
|
2048
|
+
return cargs
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
def mrcalc_atanh_params(
|
|
2052
|
+
) -> MrcalcAtanhParameters:
|
|
2053
|
+
"""
|
|
2054
|
+
Build parameters.
|
|
2055
|
+
|
|
2056
|
+
Args:
|
|
2057
|
+
Returns:
|
|
2058
|
+
Parameter dictionary
|
|
2059
|
+
"""
|
|
2060
|
+
params = {
|
|
2061
|
+
"__STYXTYPE__": "atanh",
|
|
2062
|
+
}
|
|
2063
|
+
return params
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
def mrcalc_atanh_cargs(
|
|
2067
|
+
params: MrcalcAtanhParameters,
|
|
2068
|
+
execution: Execution,
|
|
2069
|
+
) -> list[str]:
|
|
2070
|
+
"""
|
|
2071
|
+
Build command-line arguments from parameters.
|
|
2072
|
+
|
|
2073
|
+
Args:
|
|
2074
|
+
params: The parameters.
|
|
2075
|
+
execution: The execution object for resolving input paths.
|
|
2076
|
+
Returns:
|
|
2077
|
+
Command-line arguments.
|
|
2078
|
+
"""
|
|
2079
|
+
cargs = []
|
|
2080
|
+
cargs.append("-atanh")
|
|
2081
|
+
return cargs
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
def mrcalc_config_params(
|
|
2085
|
+
key: str,
|
|
2086
|
+
value: str,
|
|
2087
|
+
) -> MrcalcConfigParameters:
|
|
2088
|
+
"""
|
|
2089
|
+
Build parameters.
|
|
2090
|
+
|
|
2091
|
+
Args:
|
|
2092
|
+
key: temporarily set the value of an MRtrix config file entry.
|
|
2093
|
+
value: temporarily set the value of an MRtrix config file entry.
|
|
2094
|
+
Returns:
|
|
2095
|
+
Parameter dictionary
|
|
2096
|
+
"""
|
|
2097
|
+
params = {
|
|
2098
|
+
"__STYXTYPE__": "config",
|
|
2099
|
+
"key": key,
|
|
2100
|
+
"value": value,
|
|
2101
|
+
}
|
|
2102
|
+
return params
|
|
2103
|
+
|
|
2104
|
+
|
|
2105
|
+
def mrcalc_config_cargs(
|
|
2106
|
+
params: MrcalcConfigParameters,
|
|
2107
|
+
execution: Execution,
|
|
2108
|
+
) -> list[str]:
|
|
2109
|
+
"""
|
|
2110
|
+
Build command-line arguments from parameters.
|
|
2111
|
+
|
|
2112
|
+
Args:
|
|
2113
|
+
params: The parameters.
|
|
2114
|
+
execution: The execution object for resolving input paths.
|
|
2115
|
+
Returns:
|
|
2116
|
+
Command-line arguments.
|
|
2117
|
+
"""
|
|
2118
|
+
cargs = []
|
|
2119
|
+
cargs.append("-config")
|
|
2120
|
+
cargs.append(params.get("key"))
|
|
2121
|
+
cargs.append(params.get("value"))
|
|
2122
|
+
return cargs
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
def mrcalc_various_string_params(
|
|
2126
|
+
obj: str,
|
|
2127
|
+
) -> MrcalcVariousStringParameters:
|
|
2128
|
+
"""
|
|
2129
|
+
Build parameters.
|
|
2130
|
+
|
|
2131
|
+
Args:
|
|
2132
|
+
obj: String object.
|
|
2133
|
+
Returns:
|
|
2134
|
+
Parameter dictionary
|
|
2135
|
+
"""
|
|
2136
|
+
params = {
|
|
2137
|
+
"__STYXTYPE__": "VariousString",
|
|
2138
|
+
"obj": obj,
|
|
2139
|
+
}
|
|
2140
|
+
return params
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
def mrcalc_various_string_cargs(
|
|
2144
|
+
params: MrcalcVariousStringParameters,
|
|
2145
|
+
execution: Execution,
|
|
2146
|
+
) -> list[str]:
|
|
2147
|
+
"""
|
|
2148
|
+
Build command-line arguments from parameters.
|
|
2149
|
+
|
|
2150
|
+
Args:
|
|
2151
|
+
params: The parameters.
|
|
2152
|
+
execution: The execution object for resolving input paths.
|
|
2153
|
+
Returns:
|
|
2154
|
+
Command-line arguments.
|
|
2155
|
+
"""
|
|
2156
|
+
cargs = []
|
|
2157
|
+
cargs.append(params.get("obj"))
|
|
2158
|
+
return cargs
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
def mrcalc_various_file_params(
|
|
2162
|
+
obj: InputPathType,
|
|
2163
|
+
) -> MrcalcVariousFileParameters:
|
|
2164
|
+
"""
|
|
2165
|
+
Build parameters.
|
|
2166
|
+
|
|
2167
|
+
Args:
|
|
2168
|
+
obj: File object.
|
|
2169
|
+
Returns:
|
|
2170
|
+
Parameter dictionary
|
|
2171
|
+
"""
|
|
2172
|
+
params = {
|
|
2173
|
+
"__STYXTYPE__": "VariousFile",
|
|
2174
|
+
"obj": obj,
|
|
2175
|
+
}
|
|
2176
|
+
return params
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
def mrcalc_various_file_cargs(
|
|
2180
|
+
params: MrcalcVariousFileParameters,
|
|
2181
|
+
execution: Execution,
|
|
2182
|
+
) -> list[str]:
|
|
2183
|
+
"""
|
|
2184
|
+
Build command-line arguments from parameters.
|
|
2185
|
+
|
|
2186
|
+
Args:
|
|
2187
|
+
params: The parameters.
|
|
2188
|
+
execution: The execution object for resolving input paths.
|
|
2189
|
+
Returns:
|
|
2190
|
+
Command-line arguments.
|
|
2191
|
+
"""
|
|
2192
|
+
cargs = []
|
|
2193
|
+
cargs.append(execution.input_file(params.get("obj")))
|
|
2194
|
+
return cargs
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
class MrcalcOutputs(typing.NamedTuple):
|
|
2198
|
+
"""
|
|
2199
|
+
Output object returned when calling `mrcalc(...)`.
|
|
2200
|
+
"""
|
|
2201
|
+
root: OutputPathType
|
|
2202
|
+
"""Output root folder. This is the root folder for all outputs."""
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
def mrcalc_params(
|
|
2206
|
+
operand: list[typing.Union[MrcalcVariousStringParameters, MrcalcVariousFileParameters]],
|
|
2207
|
+
abs_: list[MrcalcAbsParameters] | None = None,
|
|
2208
|
+
neg: list[MrcalcNegParameters] | None = None,
|
|
2209
|
+
add: list[MrcalcAddParameters] | None = None,
|
|
2210
|
+
subtract: list[MrcalcSubtractParameters] | None = None,
|
|
2211
|
+
multiply: list[MrcalcMultiplyParameters] | None = None,
|
|
2212
|
+
divide: list[MrcalcDivideParameters] | None = None,
|
|
2213
|
+
min_: list[MrcalcMinParameters] | None = None,
|
|
2214
|
+
max_: list[MrcalcMaxParameters] | None = None,
|
|
2215
|
+
lt: list[MrcalcLtParameters] | None = None,
|
|
2216
|
+
gt: list[MrcalcGtParameters] | None = None,
|
|
2217
|
+
le: list[MrcalcLeParameters] | None = None,
|
|
2218
|
+
ge: list[MrcalcGeParameters] | None = None,
|
|
2219
|
+
eq: list[MrcalcEqParameters] | None = None,
|
|
2220
|
+
neq: list[MrcalcNeqParameters] | None = None,
|
|
2221
|
+
if_: list[MrcalcIfParameters] | None = None,
|
|
2222
|
+
replace: list[MrcalcReplaceParameters] | None = None,
|
|
2223
|
+
sqrt: list[MrcalcSqrtParameters] | None = None,
|
|
2224
|
+
pow_: list[MrcalcPowParameters] | None = None,
|
|
2225
|
+
round_: list[MrcalcRoundParameters] | None = None,
|
|
2226
|
+
ceil: list[MrcalcCeilParameters] | None = None,
|
|
2227
|
+
floor: list[MrcalcFloorParameters] | None = None,
|
|
2228
|
+
not_: list[MrcalcNotParameters] | None = None,
|
|
2229
|
+
and_: list[MrcalcAndParameters] | None = None,
|
|
2230
|
+
or_: list[MrcalcOrParameters] | None = None,
|
|
2231
|
+
xor: list[MrcalcXorParameters] | None = None,
|
|
2232
|
+
isnan: list[MrcalcIsnanParameters] | None = None,
|
|
2233
|
+
isinf: list[MrcalcIsinfParameters] | None = None,
|
|
2234
|
+
finite: list[MrcalcFiniteParameters] | None = None,
|
|
2235
|
+
complex_: list[MrcalcComplexParameters] | None = None,
|
|
2236
|
+
polar: list[MrcalcPolarParameters] | None = None,
|
|
2237
|
+
real: list[MrcalcRealParameters] | None = None,
|
|
2238
|
+
imag: list[MrcalcImagParameters] | None = None,
|
|
2239
|
+
phase: list[MrcalcPhaseParameters] | None = None,
|
|
2240
|
+
conj: list[MrcalcConjParameters] | None = None,
|
|
2241
|
+
proj: list[MrcalcProjParameters] | None = None,
|
|
2242
|
+
exp: list[MrcalcExpParameters] | None = None,
|
|
2243
|
+
log: list[MrcalcLogParameters] | None = None,
|
|
2244
|
+
log10: list[MrcalcLog10Parameters] | None = None,
|
|
2245
|
+
cos: list[MrcalcCosParameters] | None = None,
|
|
2246
|
+
sin: list[MrcalcSinParameters] | None = None,
|
|
2247
|
+
tan: list[MrcalcTanParameters] | None = None,
|
|
2248
|
+
acos: list[MrcalcAcosParameters] | None = None,
|
|
2249
|
+
asin: list[MrcalcAsinParameters] | None = None,
|
|
2250
|
+
atan: list[MrcalcAtanParameters] | None = None,
|
|
2251
|
+
cosh: list[MrcalcCoshParameters] | None = None,
|
|
2252
|
+
sinh: list[MrcalcSinhParameters] | None = None,
|
|
2253
|
+
tanh: list[MrcalcTanhParameters] | None = None,
|
|
2254
|
+
acosh: list[MrcalcAcoshParameters] | None = None,
|
|
2255
|
+
asinh: list[MrcalcAsinhParameters] | None = None,
|
|
2256
|
+
atanh: list[MrcalcAtanhParameters] | None = None,
|
|
2257
|
+
datatype: str | None = None,
|
|
2258
|
+
info: bool = False,
|
|
2259
|
+
quiet: bool = False,
|
|
2260
|
+
debug: bool = False,
|
|
2261
|
+
force: bool = False,
|
|
2262
|
+
nthreads: int | None = None,
|
|
2263
|
+
config: list[MrcalcConfigParameters] | None = None,
|
|
2264
|
+
help_: bool = False,
|
|
2265
|
+
version: bool = False,
|
|
2266
|
+
) -> MrcalcParameters:
|
|
2267
|
+
"""
|
|
2268
|
+
Build parameters.
|
|
2269
|
+
|
|
2270
|
+
Args:
|
|
2271
|
+
operand: an input image, intensity value, or the special keywords\
|
|
2272
|
+
'rand' (random number between 0 and 1) or 'randn' (random number from\
|
|
2273
|
+
unit std.dev. normal distribution) or the mathematical constants 'e'\
|
|
2274
|
+
and 'pi'.
|
|
2275
|
+
abs_: |%1| : return absolute value (magnitude) of real or complex\
|
|
2276
|
+
number.
|
|
2277
|
+
neg: -%1 : negative value.
|
|
2278
|
+
add: (%1 + %2) : add values.
|
|
2279
|
+
subtract: (%1 - %2) : subtract nth operand from (n-1)th.
|
|
2280
|
+
multiply: (%1 * %2) : multiply values.
|
|
2281
|
+
divide: (%1 / %2) : divide (n-1)th operand by nth.
|
|
2282
|
+
min_: min (%1, %2) : smallest of last two operands.
|
|
2283
|
+
max_: max (%1, %2) : greatest of last two operands.
|
|
2284
|
+
lt: (%1 < %2) : less-than operator (true=1, false=0).
|
|
2285
|
+
gt: (%1 > %2) : greater-than operator (true=1, false=0).
|
|
2286
|
+
le: (%1 <= %2) : less-than-or-equal-to operator (true=1, false=0).
|
|
2287
|
+
ge: (%1 >= %2) : greater-than-or-equal-to operator (true=1, false=0).
|
|
2288
|
+
eq: (%1 == %2) : equal-to operator (true=1, false=0).
|
|
2289
|
+
neq: (%1 != %2) : not-equal-to operator (true=1, false=0).
|
|
2290
|
+
if_: (%1 ? %2 : %3) : if first operand is true (non-zero), return\
|
|
2291
|
+
second operand, otherwise return third operand.
|
|
2292
|
+
replace: (%1, %2 -> %3) : Wherever first operand is equal to the second\
|
|
2293
|
+
operand, replace with third operand.
|
|
2294
|
+
sqrt: sqrt (%1) : square root.
|
|
2295
|
+
pow_: %1^%2 : raise (n-1)th operand to nth power.
|
|
2296
|
+
round_: round (%1) : round to nearest integer.
|
|
2297
|
+
ceil: ceil (%1) : round up to nearest integer.
|
|
2298
|
+
floor: floor (%1) : round down to nearest integer.
|
|
2299
|
+
not_: !%1 : NOT operator: true (1) if operand is false (i.e. zero).
|
|
2300
|
+
and_: (%1 && %2) : AND operator: true (1) if both operands are true\
|
|
2301
|
+
(i.e. non-zero).
|
|
2302
|
+
or_: (%1 || %2) : OR operator: true (1) if either operand is true (i.e.\
|
|
2303
|
+
non-zero).
|
|
2304
|
+
xor: (%1 ^^ %2) : XOR operator: true (1) if only one of the operands is\
|
|
2305
|
+
true (i.e. non-zero).
|
|
2306
|
+
isnan: isnan (%1) : true (1) if operand is not-a-number (NaN).
|
|
2307
|
+
isinf: isinf (%1) : true (1) if operand is infinite (Inf).
|
|
2308
|
+
finite: finite (%1) : true (1) if operand is finite (i.e. not NaN or\
|
|
2309
|
+
Inf).
|
|
2310
|
+
complex_: (%1 + %2 i) : create complex number using the last two\
|
|
2311
|
+
operands as real,imaginary components.
|
|
2312
|
+
polar: (%1 /_ %2) : create complex number using the last two operands\
|
|
2313
|
+
as magnitude,phase components (phase in radians).
|
|
2314
|
+
real: real (%1) : real part of complex number.
|
|
2315
|
+
imag: imag (%1) : imaginary part of complex number.
|
|
2316
|
+
phase: phase (%1) : phase of complex number (use -abs for magnitude).
|
|
2317
|
+
conj: conj (%1) : complex conjugate.
|
|
2318
|
+
proj: proj (%1) : projection onto the Riemann sphere.
|
|
2319
|
+
exp: exp (%1) : exponential function.
|
|
2320
|
+
log: log (%1) : natural logarithm.
|
|
2321
|
+
log10: log10 (%1) : common logarithm.
|
|
2322
|
+
cos: cos (%1) : cosine.
|
|
2323
|
+
sin: sin (%1) : sine.
|
|
2324
|
+
tan: tan (%1) : tangent.
|
|
2325
|
+
acos: acos (%1) : inverse cosine.
|
|
2326
|
+
asin: asin (%1) : inverse sine.
|
|
2327
|
+
atan: atan (%1) : inverse tangent.
|
|
2328
|
+
cosh: cosh (%1) : hyperbolic cosine.
|
|
2329
|
+
sinh: sinh (%1) : hyperbolic sine.
|
|
2330
|
+
tanh: tanh (%1) : hyperbolic tangent.
|
|
2331
|
+
acosh: acosh (%1) : inverse hyperbolic cosine.
|
|
2332
|
+
asinh: asinh (%1) : inverse hyperbolic sine.
|
|
2333
|
+
atanh: atanh (%1) : inverse hyperbolic tangent.
|
|
2334
|
+
datatype: specify output image data type. Valid choices are: float32,\
|
|
2335
|
+
float32le, float32be, float64, float64le, float64be, int64, uint64,\
|
|
2336
|
+
int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
|
|
2337
|
+
int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
|
|
2338
|
+
cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
|
|
2339
|
+
int8, uint8, bit.
|
|
2340
|
+
info: display information messages.
|
|
2341
|
+
quiet: do not display information messages or progress status;\
|
|
2342
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
2343
|
+
environment variable to a non-empty string.
|
|
2344
|
+
debug: display debugging messages.
|
|
2345
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
2346
|
+
input and output might cause unexpected behaviour).
|
|
2347
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
2348
|
+
(set to 0 to disable multi-threading).
|
|
2349
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
2350
|
+
help_: display this information page and exit.
|
|
2351
|
+
version: display version information and exit.
|
|
2352
|
+
Returns:
|
|
2353
|
+
Parameter dictionary
|
|
2354
|
+
"""
|
|
2355
|
+
params = {
|
|
2356
|
+
"__STYXTYPE__": "mrcalc",
|
|
2357
|
+
"info": info,
|
|
2358
|
+
"quiet": quiet,
|
|
2359
|
+
"debug": debug,
|
|
2360
|
+
"force": force,
|
|
2361
|
+
"help": help_,
|
|
2362
|
+
"version": version,
|
|
2363
|
+
"operand": operand,
|
|
2364
|
+
}
|
|
2365
|
+
if abs_ is not None:
|
|
2366
|
+
params["abs"] = abs_
|
|
2367
|
+
if neg is not None:
|
|
2368
|
+
params["neg"] = neg
|
|
2369
|
+
if add is not None:
|
|
2370
|
+
params["add"] = add
|
|
2371
|
+
if subtract is not None:
|
|
2372
|
+
params["subtract"] = subtract
|
|
2373
|
+
if multiply is not None:
|
|
2374
|
+
params["multiply"] = multiply
|
|
2375
|
+
if divide is not None:
|
|
2376
|
+
params["divide"] = divide
|
|
2377
|
+
if min_ is not None:
|
|
2378
|
+
params["min"] = min_
|
|
2379
|
+
if max_ is not None:
|
|
2380
|
+
params["max"] = max_
|
|
2381
|
+
if lt is not None:
|
|
2382
|
+
params["lt"] = lt
|
|
2383
|
+
if gt is not None:
|
|
2384
|
+
params["gt"] = gt
|
|
2385
|
+
if le is not None:
|
|
2386
|
+
params["le"] = le
|
|
2387
|
+
if ge is not None:
|
|
2388
|
+
params["ge"] = ge
|
|
2389
|
+
if eq is not None:
|
|
2390
|
+
params["eq"] = eq
|
|
2391
|
+
if neq is not None:
|
|
2392
|
+
params["neq"] = neq
|
|
2393
|
+
if if_ is not None:
|
|
2394
|
+
params["if"] = if_
|
|
2395
|
+
if replace is not None:
|
|
2396
|
+
params["replace"] = replace
|
|
2397
|
+
if sqrt is not None:
|
|
2398
|
+
params["sqrt"] = sqrt
|
|
2399
|
+
if pow_ is not None:
|
|
2400
|
+
params["pow"] = pow_
|
|
2401
|
+
if round_ is not None:
|
|
2402
|
+
params["round"] = round_
|
|
2403
|
+
if ceil is not None:
|
|
2404
|
+
params["ceil"] = ceil
|
|
2405
|
+
if floor is not None:
|
|
2406
|
+
params["floor"] = floor
|
|
2407
|
+
if not_ is not None:
|
|
2408
|
+
params["not"] = not_
|
|
2409
|
+
if and_ is not None:
|
|
2410
|
+
params["and"] = and_
|
|
2411
|
+
if or_ is not None:
|
|
2412
|
+
params["or"] = or_
|
|
2413
|
+
if xor is not None:
|
|
2414
|
+
params["xor"] = xor
|
|
2415
|
+
if isnan is not None:
|
|
2416
|
+
params["isnan"] = isnan
|
|
2417
|
+
if isinf is not None:
|
|
2418
|
+
params["isinf"] = isinf
|
|
2419
|
+
if finite is not None:
|
|
2420
|
+
params["finite"] = finite
|
|
2421
|
+
if complex_ is not None:
|
|
2422
|
+
params["complex"] = complex_
|
|
2423
|
+
if polar is not None:
|
|
2424
|
+
params["polar"] = polar
|
|
2425
|
+
if real is not None:
|
|
2426
|
+
params["real"] = real
|
|
2427
|
+
if imag is not None:
|
|
2428
|
+
params["imag"] = imag
|
|
2429
|
+
if phase is not None:
|
|
2430
|
+
params["phase"] = phase
|
|
2431
|
+
if conj is not None:
|
|
2432
|
+
params["conj"] = conj
|
|
2433
|
+
if proj is not None:
|
|
2434
|
+
params["proj"] = proj
|
|
2435
|
+
if exp is not None:
|
|
2436
|
+
params["exp"] = exp
|
|
2437
|
+
if log is not None:
|
|
2438
|
+
params["log"] = log
|
|
2439
|
+
if log10 is not None:
|
|
2440
|
+
params["log10"] = log10
|
|
2441
|
+
if cos is not None:
|
|
2442
|
+
params["cos"] = cos
|
|
2443
|
+
if sin is not None:
|
|
2444
|
+
params["sin"] = sin
|
|
2445
|
+
if tan is not None:
|
|
2446
|
+
params["tan"] = tan
|
|
2447
|
+
if acos is not None:
|
|
2448
|
+
params["acos"] = acos
|
|
2449
|
+
if asin is not None:
|
|
2450
|
+
params["asin"] = asin
|
|
2451
|
+
if atan is not None:
|
|
2452
|
+
params["atan"] = atan
|
|
2453
|
+
if cosh is not None:
|
|
2454
|
+
params["cosh"] = cosh
|
|
2455
|
+
if sinh is not None:
|
|
2456
|
+
params["sinh"] = sinh
|
|
2457
|
+
if tanh is not None:
|
|
2458
|
+
params["tanh"] = tanh
|
|
2459
|
+
if acosh is not None:
|
|
2460
|
+
params["acosh"] = acosh
|
|
2461
|
+
if asinh is not None:
|
|
2462
|
+
params["asinh"] = asinh
|
|
2463
|
+
if atanh is not None:
|
|
2464
|
+
params["atanh"] = atanh
|
|
2465
|
+
if datatype is not None:
|
|
2466
|
+
params["datatype"] = datatype
|
|
2467
|
+
if nthreads is not None:
|
|
2468
|
+
params["nthreads"] = nthreads
|
|
2469
|
+
if config is not None:
|
|
2470
|
+
params["config"] = config
|
|
2471
|
+
return params
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
def mrcalc_cargs(
|
|
2475
|
+
params: MrcalcParameters,
|
|
2476
|
+
execution: Execution,
|
|
2477
|
+
) -> list[str]:
|
|
2478
|
+
"""
|
|
2479
|
+
Build command-line arguments from parameters.
|
|
2480
|
+
|
|
2481
|
+
Args:
|
|
2482
|
+
params: The parameters.
|
|
2483
|
+
execution: The execution object for resolving input paths.
|
|
2484
|
+
Returns:
|
|
2485
|
+
Command-line arguments.
|
|
2486
|
+
"""
|
|
2487
|
+
cargs = []
|
|
2488
|
+
cargs.append("mrcalc")
|
|
2489
|
+
if params.get("abs") is not None:
|
|
2490
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("abs")] for a in c])
|
|
2491
|
+
if params.get("neg") is not None:
|
|
2492
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("neg")] for a in c])
|
|
2493
|
+
if params.get("add") is not None:
|
|
2494
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("add")] for a in c])
|
|
2495
|
+
if params.get("subtract") is not None:
|
|
2496
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("subtract")] for a in c])
|
|
2497
|
+
if params.get("multiply") is not None:
|
|
2498
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("multiply")] for a in c])
|
|
2499
|
+
if params.get("divide") is not None:
|
|
2500
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("divide")] for a in c])
|
|
2501
|
+
if params.get("min") is not None:
|
|
2502
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("min")] for a in c])
|
|
2503
|
+
if params.get("max") is not None:
|
|
2504
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("max")] for a in c])
|
|
2505
|
+
if params.get("lt") is not None:
|
|
2506
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("lt")] for a in c])
|
|
2507
|
+
if params.get("gt") is not None:
|
|
2508
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("gt")] for a in c])
|
|
2509
|
+
if params.get("le") is not None:
|
|
2510
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("le")] for a in c])
|
|
2511
|
+
if params.get("ge") is not None:
|
|
2512
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("ge")] for a in c])
|
|
2513
|
+
if params.get("eq") is not None:
|
|
2514
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("eq")] for a in c])
|
|
2515
|
+
if params.get("neq") is not None:
|
|
2516
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("neq")] for a in c])
|
|
2517
|
+
if params.get("if") is not None:
|
|
2518
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("if")] for a in c])
|
|
2519
|
+
if params.get("replace") is not None:
|
|
2520
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("replace")] for a in c])
|
|
2521
|
+
if params.get("sqrt") is not None:
|
|
2522
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("sqrt")] for a in c])
|
|
2523
|
+
if params.get("pow") is not None:
|
|
2524
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("pow")] for a in c])
|
|
2525
|
+
if params.get("round") is not None:
|
|
2526
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("round")] for a in c])
|
|
2527
|
+
if params.get("ceil") is not None:
|
|
2528
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("ceil")] for a in c])
|
|
2529
|
+
if params.get("floor") is not None:
|
|
2530
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("floor")] for a in c])
|
|
2531
|
+
if params.get("not") is not None:
|
|
2532
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("not")] for a in c])
|
|
2533
|
+
if params.get("and") is not None:
|
|
2534
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("and")] for a in c])
|
|
2535
|
+
if params.get("or") is not None:
|
|
2536
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("or")] for a in c])
|
|
2537
|
+
if params.get("xor") is not None:
|
|
2538
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("xor")] for a in c])
|
|
2539
|
+
if params.get("isnan") is not None:
|
|
2540
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("isnan")] for a in c])
|
|
2541
|
+
if params.get("isinf") is not None:
|
|
2542
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("isinf")] for a in c])
|
|
2543
|
+
if params.get("finite") is not None:
|
|
2544
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("finite")] for a in c])
|
|
2545
|
+
if params.get("complex") is not None:
|
|
2546
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("complex")] for a in c])
|
|
2547
|
+
if params.get("polar") is not None:
|
|
2548
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("polar")] for a in c])
|
|
2549
|
+
if params.get("real") is not None:
|
|
2550
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("real")] for a in c])
|
|
2551
|
+
if params.get("imag") is not None:
|
|
2552
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("imag")] for a in c])
|
|
2553
|
+
if params.get("phase") is not None:
|
|
2554
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("phase")] for a in c])
|
|
2555
|
+
if params.get("conj") is not None:
|
|
2556
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("conj")] for a in c])
|
|
2557
|
+
if params.get("proj") is not None:
|
|
2558
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("proj")] for a in c])
|
|
2559
|
+
if params.get("exp") is not None:
|
|
2560
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("exp")] for a in c])
|
|
2561
|
+
if params.get("log") is not None:
|
|
2562
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("log")] for a in c])
|
|
2563
|
+
if params.get("log10") is not None:
|
|
2564
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("log10")] for a in c])
|
|
2565
|
+
if params.get("cos") is not None:
|
|
2566
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("cos")] for a in c])
|
|
2567
|
+
if params.get("sin") is not None:
|
|
2568
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("sin")] for a in c])
|
|
2569
|
+
if params.get("tan") is not None:
|
|
2570
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("tan")] for a in c])
|
|
2571
|
+
if params.get("acos") is not None:
|
|
2572
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("acos")] for a in c])
|
|
2573
|
+
if params.get("asin") is not None:
|
|
2574
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("asin")] for a in c])
|
|
2575
|
+
if params.get("atan") is not None:
|
|
2576
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("atan")] for a in c])
|
|
2577
|
+
if params.get("cosh") is not None:
|
|
2578
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("cosh")] for a in c])
|
|
2579
|
+
if params.get("sinh") is not None:
|
|
2580
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("sinh")] for a in c])
|
|
2581
|
+
if params.get("tanh") is not None:
|
|
2582
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("tanh")] for a in c])
|
|
2583
|
+
if params.get("acosh") is not None:
|
|
2584
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("acosh")] for a in c])
|
|
2585
|
+
if params.get("asinh") is not None:
|
|
2586
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("asinh")] for a in c])
|
|
2587
|
+
if params.get("atanh") is not None:
|
|
2588
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("atanh")] for a in c])
|
|
2589
|
+
if params.get("datatype") is not None:
|
|
2590
|
+
cargs.extend([
|
|
2591
|
+
"-datatype",
|
|
2592
|
+
params.get("datatype")
|
|
2593
|
+
])
|
|
2594
|
+
if params.get("info"):
|
|
2595
|
+
cargs.append("-info")
|
|
2596
|
+
if params.get("quiet"):
|
|
2597
|
+
cargs.append("-quiet")
|
|
2598
|
+
if params.get("debug"):
|
|
2599
|
+
cargs.append("-debug")
|
|
2600
|
+
if params.get("force"):
|
|
2601
|
+
cargs.append("-force")
|
|
2602
|
+
if params.get("nthreads") is not None:
|
|
2603
|
+
cargs.extend([
|
|
2604
|
+
"-nthreads",
|
|
2605
|
+
str(params.get("nthreads"))
|
|
2606
|
+
])
|
|
2607
|
+
if params.get("config") is not None:
|
|
2608
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("config")] for a in c])
|
|
2609
|
+
if params.get("help"):
|
|
2610
|
+
cargs.append("-help")
|
|
2611
|
+
if params.get("version"):
|
|
2612
|
+
cargs.append("-version")
|
|
2613
|
+
cargs.extend([a for c in [dyn_cargs(s["__STYXTYPE__"])(s, execution) for s in params.get("operand")] for a in c])
|
|
2614
|
+
return cargs
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
def mrcalc_outputs(
|
|
2618
|
+
params: MrcalcParameters,
|
|
2619
|
+
execution: Execution,
|
|
2620
|
+
) -> MrcalcOutputs:
|
|
2621
|
+
"""
|
|
2622
|
+
Build outputs object containing output file paths and possibly stdout/stderr.
|
|
2623
|
+
|
|
2624
|
+
Args:
|
|
2625
|
+
params: The parameters.
|
|
2626
|
+
execution: The execution object for resolving input paths.
|
|
2627
|
+
Returns:
|
|
2628
|
+
Outputs object.
|
|
2629
|
+
"""
|
|
2630
|
+
ret = MrcalcOutputs(
|
|
2631
|
+
root=execution.output_file("."),
|
|
2632
|
+
)
|
|
2633
|
+
return ret
|
|
2634
|
+
|
|
2635
|
+
|
|
2636
|
+
def mrcalc_execute(
|
|
2637
|
+
params: MrcalcParameters,
|
|
2638
|
+
execution: Execution,
|
|
2639
|
+
) -> MrcalcOutputs:
|
|
2640
|
+
"""
|
|
2641
|
+
Apply generic voxel-wise mathematical operations to images.
|
|
2642
|
+
|
|
2643
|
+
This command will only compute per-voxel operations. Use 'mrmath' to compute
|
|
2644
|
+
summary statistics across images or along image axes.
|
|
2645
|
+
|
|
2646
|
+
This command uses a stack-based syntax, with operators (specified using
|
|
2647
|
+
options) operating on the top-most entries (i.e. images or values) in the
|
|
2648
|
+
stack. Operands (values or images) are pushed onto the stack in the order
|
|
2649
|
+
they appear (as arguments) on the command-line, and operators (specified as
|
|
2650
|
+
options) operate on and consume the top-most entries in the stack, and push
|
|
2651
|
+
their output as a new entry on the stack.
|
|
2652
|
+
|
|
2653
|
+
As an additional feature, this command will allow images with different
|
|
2654
|
+
dimensions to be processed, provided they satisfy the following conditions:
|
|
2655
|
+
for each axis, the dimensions match if they are the same size, or one of
|
|
2656
|
+
them has size one. In the latter case, the entire image will be replicated
|
|
2657
|
+
along that axis. This allows for example a 4D image of size [ X Y Z N ] to
|
|
2658
|
+
be added to a 3D image of size [ X Y Z ], as if it consisted of N copies of
|
|
2659
|
+
the 3D image along the 4th axis (the missing dimension is assumed to have
|
|
2660
|
+
size 1). Another example would a single-voxel 4D image of size [ 1 1 1 N ],
|
|
2661
|
+
multiplied by a 3D image of size [ X Y Z ], which would allow the creation
|
|
2662
|
+
of a 4D image where each volume consists of the 3D image scaled by the
|
|
2663
|
+
corresponding value for that volume in the single-voxel image.
|
|
2664
|
+
|
|
2665
|
+
References:
|
|
2666
|
+
|
|
2667
|
+
.
|
|
2668
|
+
|
|
2669
|
+
Author: MRTrix3 Developers
|
|
2670
|
+
|
|
2671
|
+
URL: https://www.mrtrix.org/
|
|
2672
|
+
|
|
2673
|
+
Args:
|
|
2674
|
+
params: The parameters.
|
|
2675
|
+
execution: The execution object.
|
|
2676
|
+
Returns:
|
|
2677
|
+
NamedTuple of outputs (described in `MrcalcOutputs`).
|
|
2678
|
+
"""
|
|
2679
|
+
params = execution.params(params)
|
|
2680
|
+
cargs = mrcalc_cargs(params, execution)
|
|
2681
|
+
ret = mrcalc_outputs(params, execution)
|
|
2682
|
+
execution.run(cargs)
|
|
2683
|
+
return ret
|
|
2684
|
+
|
|
2685
|
+
|
|
2686
|
+
def mrcalc(
|
|
2687
|
+
operand: list[typing.Union[MrcalcVariousStringParameters, MrcalcVariousFileParameters]],
|
|
2688
|
+
abs_: list[MrcalcAbsParameters] | None = None,
|
|
2689
|
+
neg: list[MrcalcNegParameters] | None = None,
|
|
2690
|
+
add: list[MrcalcAddParameters] | None = None,
|
|
2691
|
+
subtract: list[MrcalcSubtractParameters] | None = None,
|
|
2692
|
+
multiply: list[MrcalcMultiplyParameters] | None = None,
|
|
2693
|
+
divide: list[MrcalcDivideParameters] | None = None,
|
|
2694
|
+
min_: list[MrcalcMinParameters] | None = None,
|
|
2695
|
+
max_: list[MrcalcMaxParameters] | None = None,
|
|
2696
|
+
lt: list[MrcalcLtParameters] | None = None,
|
|
2697
|
+
gt: list[MrcalcGtParameters] | None = None,
|
|
2698
|
+
le: list[MrcalcLeParameters] | None = None,
|
|
2699
|
+
ge: list[MrcalcGeParameters] | None = None,
|
|
2700
|
+
eq: list[MrcalcEqParameters] | None = None,
|
|
2701
|
+
neq: list[MrcalcNeqParameters] | None = None,
|
|
2702
|
+
if_: list[MrcalcIfParameters] | None = None,
|
|
2703
|
+
replace: list[MrcalcReplaceParameters] | None = None,
|
|
2704
|
+
sqrt: list[MrcalcSqrtParameters] | None = None,
|
|
2705
|
+
pow_: list[MrcalcPowParameters] | None = None,
|
|
2706
|
+
round_: list[MrcalcRoundParameters] | None = None,
|
|
2707
|
+
ceil: list[MrcalcCeilParameters] | None = None,
|
|
2708
|
+
floor: list[MrcalcFloorParameters] | None = None,
|
|
2709
|
+
not_: list[MrcalcNotParameters] | None = None,
|
|
2710
|
+
and_: list[MrcalcAndParameters] | None = None,
|
|
2711
|
+
or_: list[MrcalcOrParameters] | None = None,
|
|
2712
|
+
xor: list[MrcalcXorParameters] | None = None,
|
|
2713
|
+
isnan: list[MrcalcIsnanParameters] | None = None,
|
|
2714
|
+
isinf: list[MrcalcIsinfParameters] | None = None,
|
|
2715
|
+
finite: list[MrcalcFiniteParameters] | None = None,
|
|
2716
|
+
complex_: list[MrcalcComplexParameters] | None = None,
|
|
2717
|
+
polar: list[MrcalcPolarParameters] | None = None,
|
|
2718
|
+
real: list[MrcalcRealParameters] | None = None,
|
|
2719
|
+
imag: list[MrcalcImagParameters] | None = None,
|
|
2720
|
+
phase: list[MrcalcPhaseParameters] | None = None,
|
|
2721
|
+
conj: list[MrcalcConjParameters] | None = None,
|
|
2722
|
+
proj: list[MrcalcProjParameters] | None = None,
|
|
2723
|
+
exp: list[MrcalcExpParameters] | None = None,
|
|
2724
|
+
log: list[MrcalcLogParameters] | None = None,
|
|
2725
|
+
log10: list[MrcalcLog10Parameters] | None = None,
|
|
2726
|
+
cos: list[MrcalcCosParameters] | None = None,
|
|
2727
|
+
sin: list[MrcalcSinParameters] | None = None,
|
|
2728
|
+
tan: list[MrcalcTanParameters] | None = None,
|
|
2729
|
+
acos: list[MrcalcAcosParameters] | None = None,
|
|
2730
|
+
asin: list[MrcalcAsinParameters] | None = None,
|
|
2731
|
+
atan: list[MrcalcAtanParameters] | None = None,
|
|
2732
|
+
cosh: list[MrcalcCoshParameters] | None = None,
|
|
2733
|
+
sinh: list[MrcalcSinhParameters] | None = None,
|
|
2734
|
+
tanh: list[MrcalcTanhParameters] | None = None,
|
|
2735
|
+
acosh: list[MrcalcAcoshParameters] | None = None,
|
|
2736
|
+
asinh: list[MrcalcAsinhParameters] | None = None,
|
|
2737
|
+
atanh: list[MrcalcAtanhParameters] | None = None,
|
|
2738
|
+
datatype: str | None = None,
|
|
2739
|
+
info: bool = False,
|
|
2740
|
+
quiet: bool = False,
|
|
2741
|
+
debug: bool = False,
|
|
2742
|
+
force: bool = False,
|
|
2743
|
+
nthreads: int | None = None,
|
|
2744
|
+
config: list[MrcalcConfigParameters] | None = None,
|
|
2745
|
+
help_: bool = False,
|
|
2746
|
+
version: bool = False,
|
|
2747
|
+
runner: Runner | None = None,
|
|
2748
|
+
) -> MrcalcOutputs:
|
|
2749
|
+
"""
|
|
2750
|
+
Apply generic voxel-wise mathematical operations to images.
|
|
2751
|
+
|
|
2752
|
+
This command will only compute per-voxel operations. Use 'mrmath' to compute
|
|
2753
|
+
summary statistics across images or along image axes.
|
|
2754
|
+
|
|
2755
|
+
This command uses a stack-based syntax, with operators (specified using
|
|
2756
|
+
options) operating on the top-most entries (i.e. images or values) in the
|
|
2757
|
+
stack. Operands (values or images) are pushed onto the stack in the order
|
|
2758
|
+
they appear (as arguments) on the command-line, and operators (specified as
|
|
2759
|
+
options) operate on and consume the top-most entries in the stack, and push
|
|
2760
|
+
their output as a new entry on the stack.
|
|
2761
|
+
|
|
2762
|
+
As an additional feature, this command will allow images with different
|
|
2763
|
+
dimensions to be processed, provided they satisfy the following conditions:
|
|
2764
|
+
for each axis, the dimensions match if they are the same size, or one of
|
|
2765
|
+
them has size one. In the latter case, the entire image will be replicated
|
|
2766
|
+
along that axis. This allows for example a 4D image of size [ X Y Z N ] to
|
|
2767
|
+
be added to a 3D image of size [ X Y Z ], as if it consisted of N copies of
|
|
2768
|
+
the 3D image along the 4th axis (the missing dimension is assumed to have
|
|
2769
|
+
size 1). Another example would a single-voxel 4D image of size [ 1 1 1 N ],
|
|
2770
|
+
multiplied by a 3D image of size [ X Y Z ], which would allow the creation
|
|
2771
|
+
of a 4D image where each volume consists of the 3D image scaled by the
|
|
2772
|
+
corresponding value for that volume in the single-voxel image.
|
|
2773
|
+
|
|
2774
|
+
References:
|
|
2775
|
+
|
|
2776
|
+
.
|
|
2777
|
+
|
|
2778
|
+
Author: MRTrix3 Developers
|
|
2779
|
+
|
|
2780
|
+
URL: https://www.mrtrix.org/
|
|
2781
|
+
|
|
2782
|
+
Args:
|
|
2783
|
+
operand: an input image, intensity value, or the special keywords\
|
|
2784
|
+
'rand' (random number between 0 and 1) or 'randn' (random number from\
|
|
2785
|
+
unit std.dev. normal distribution) or the mathematical constants 'e'\
|
|
2786
|
+
and 'pi'.
|
|
2787
|
+
abs_: |%1| : return absolute value (magnitude) of real or complex\
|
|
2788
|
+
number.
|
|
2789
|
+
neg: -%1 : negative value.
|
|
2790
|
+
add: (%1 + %2) : add values.
|
|
2791
|
+
subtract: (%1 - %2) : subtract nth operand from (n-1)th.
|
|
2792
|
+
multiply: (%1 * %2) : multiply values.
|
|
2793
|
+
divide: (%1 / %2) : divide (n-1)th operand by nth.
|
|
2794
|
+
min_: min (%1, %2) : smallest of last two operands.
|
|
2795
|
+
max_: max (%1, %2) : greatest of last two operands.
|
|
2796
|
+
lt: (%1 < %2) : less-than operator (true=1, false=0).
|
|
2797
|
+
gt: (%1 > %2) : greater-than operator (true=1, false=0).
|
|
2798
|
+
le: (%1 <= %2) : less-than-or-equal-to operator (true=1, false=0).
|
|
2799
|
+
ge: (%1 >= %2) : greater-than-or-equal-to operator (true=1, false=0).
|
|
2800
|
+
eq: (%1 == %2) : equal-to operator (true=1, false=0).
|
|
2801
|
+
neq: (%1 != %2) : not-equal-to operator (true=1, false=0).
|
|
2802
|
+
if_: (%1 ? %2 : %3) : if first operand is true (non-zero), return\
|
|
2803
|
+
second operand, otherwise return third operand.
|
|
2804
|
+
replace: (%1, %2 -> %3) : Wherever first operand is equal to the second\
|
|
2805
|
+
operand, replace with third operand.
|
|
2806
|
+
sqrt: sqrt (%1) : square root.
|
|
2807
|
+
pow_: %1^%2 : raise (n-1)th operand to nth power.
|
|
2808
|
+
round_: round (%1) : round to nearest integer.
|
|
2809
|
+
ceil: ceil (%1) : round up to nearest integer.
|
|
2810
|
+
floor: floor (%1) : round down to nearest integer.
|
|
2811
|
+
not_: !%1 : NOT operator: true (1) if operand is false (i.e. zero).
|
|
2812
|
+
and_: (%1 && %2) : AND operator: true (1) if both operands are true\
|
|
2813
|
+
(i.e. non-zero).
|
|
2814
|
+
or_: (%1 || %2) : OR operator: true (1) if either operand is true (i.e.\
|
|
2815
|
+
non-zero).
|
|
2816
|
+
xor: (%1 ^^ %2) : XOR operator: true (1) if only one of the operands is\
|
|
2817
|
+
true (i.e. non-zero).
|
|
2818
|
+
isnan: isnan (%1) : true (1) if operand is not-a-number (NaN).
|
|
2819
|
+
isinf: isinf (%1) : true (1) if operand is infinite (Inf).
|
|
2820
|
+
finite: finite (%1) : true (1) if operand is finite (i.e. not NaN or\
|
|
2821
|
+
Inf).
|
|
2822
|
+
complex_: (%1 + %2 i) : create complex number using the last two\
|
|
2823
|
+
operands as real,imaginary components.
|
|
2824
|
+
polar: (%1 /_ %2) : create complex number using the last two operands\
|
|
2825
|
+
as magnitude,phase components (phase in radians).
|
|
2826
|
+
real: real (%1) : real part of complex number.
|
|
2827
|
+
imag: imag (%1) : imaginary part of complex number.
|
|
2828
|
+
phase: phase (%1) : phase of complex number (use -abs for magnitude).
|
|
2829
|
+
conj: conj (%1) : complex conjugate.
|
|
2830
|
+
proj: proj (%1) : projection onto the Riemann sphere.
|
|
2831
|
+
exp: exp (%1) : exponential function.
|
|
2832
|
+
log: log (%1) : natural logarithm.
|
|
2833
|
+
log10: log10 (%1) : common logarithm.
|
|
2834
|
+
cos: cos (%1) : cosine.
|
|
2835
|
+
sin: sin (%1) : sine.
|
|
2836
|
+
tan: tan (%1) : tangent.
|
|
2837
|
+
acos: acos (%1) : inverse cosine.
|
|
2838
|
+
asin: asin (%1) : inverse sine.
|
|
2839
|
+
atan: atan (%1) : inverse tangent.
|
|
2840
|
+
cosh: cosh (%1) : hyperbolic cosine.
|
|
2841
|
+
sinh: sinh (%1) : hyperbolic sine.
|
|
2842
|
+
tanh: tanh (%1) : hyperbolic tangent.
|
|
2843
|
+
acosh: acosh (%1) : inverse hyperbolic cosine.
|
|
2844
|
+
asinh: asinh (%1) : inverse hyperbolic sine.
|
|
2845
|
+
atanh: atanh (%1) : inverse hyperbolic tangent.
|
|
2846
|
+
datatype: specify output image data type. Valid choices are: float32,\
|
|
2847
|
+
float32le, float32be, float64, float64le, float64be, int64, uint64,\
|
|
2848
|
+
int64le, uint64le, int64be, uint64be, int32, uint32, int32le, uint32le,\
|
|
2849
|
+
int32be, uint32be, int16, uint16, int16le, uint16le, int16be, uint16be,\
|
|
2850
|
+
cfloat32, cfloat32le, cfloat32be, cfloat64, cfloat64le, cfloat64be,\
|
|
2851
|
+
int8, uint8, bit.
|
|
2852
|
+
info: display information messages.
|
|
2853
|
+
quiet: do not display information messages or progress status;\
|
|
2854
|
+
alternatively, this can be achieved by setting the MRTRIX_QUIET\
|
|
2855
|
+
environment variable to a non-empty string.
|
|
2856
|
+
debug: display debugging messages.
|
|
2857
|
+
force: force overwrite of output files (caution: using the same file as\
|
|
2858
|
+
input and output might cause unexpected behaviour).
|
|
2859
|
+
nthreads: use this number of threads in multi-threaded applications\
|
|
2860
|
+
(set to 0 to disable multi-threading).
|
|
2861
|
+
config: temporarily set the value of an MRtrix config file entry.
|
|
2862
|
+
help_: display this information page and exit.
|
|
2863
|
+
version: display version information and exit.
|
|
2864
|
+
runner: Command runner.
|
|
2865
|
+
Returns:
|
|
2866
|
+
NamedTuple of outputs (described in `MrcalcOutputs`).
|
|
2867
|
+
"""
|
|
2868
|
+
runner = runner or get_global_runner()
|
|
2869
|
+
execution = runner.start_execution(MRCALC_METADATA)
|
|
2870
|
+
params = mrcalc_params(
|
|
2871
|
+
abs_=abs_,
|
|
2872
|
+
neg=neg,
|
|
2873
|
+
add=add,
|
|
2874
|
+
subtract=subtract,
|
|
2875
|
+
multiply=multiply,
|
|
2876
|
+
divide=divide,
|
|
2877
|
+
min_=min_,
|
|
2878
|
+
max_=max_,
|
|
2879
|
+
lt=lt,
|
|
2880
|
+
gt=gt,
|
|
2881
|
+
le=le,
|
|
2882
|
+
ge=ge,
|
|
2883
|
+
eq=eq,
|
|
2884
|
+
neq=neq,
|
|
2885
|
+
if_=if_,
|
|
2886
|
+
replace=replace,
|
|
2887
|
+
sqrt=sqrt,
|
|
2888
|
+
pow_=pow_,
|
|
2889
|
+
round_=round_,
|
|
2890
|
+
ceil=ceil,
|
|
2891
|
+
floor=floor,
|
|
2892
|
+
not_=not_,
|
|
2893
|
+
and_=and_,
|
|
2894
|
+
or_=or_,
|
|
2895
|
+
xor=xor,
|
|
2896
|
+
isnan=isnan,
|
|
2897
|
+
isinf=isinf,
|
|
2898
|
+
finite=finite,
|
|
2899
|
+
complex_=complex_,
|
|
2900
|
+
polar=polar,
|
|
2901
|
+
real=real,
|
|
2902
|
+
imag=imag,
|
|
2903
|
+
phase=phase,
|
|
2904
|
+
conj=conj,
|
|
2905
|
+
proj=proj,
|
|
2906
|
+
exp=exp,
|
|
2907
|
+
log=log,
|
|
2908
|
+
log10=log10,
|
|
2909
|
+
cos=cos,
|
|
2910
|
+
sin=sin,
|
|
2911
|
+
tan=tan,
|
|
2912
|
+
acos=acos,
|
|
2913
|
+
asin=asin,
|
|
2914
|
+
atan=atan,
|
|
2915
|
+
cosh=cosh,
|
|
2916
|
+
sinh=sinh,
|
|
2917
|
+
tanh=tanh,
|
|
2918
|
+
acosh=acosh,
|
|
2919
|
+
asinh=asinh,
|
|
2920
|
+
atanh=atanh,
|
|
2921
|
+
datatype=datatype,
|
|
2922
|
+
info=info,
|
|
2923
|
+
quiet=quiet,
|
|
2924
|
+
debug=debug,
|
|
2925
|
+
force=force,
|
|
2926
|
+
nthreads=nthreads,
|
|
2927
|
+
config=config,
|
|
2928
|
+
help_=help_,
|
|
2929
|
+
version=version,
|
|
2930
|
+
operand=operand,
|
|
2931
|
+
)
|
|
2932
|
+
return mrcalc_execute(params, execution)
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
__all__ = [
|
|
2936
|
+
"MRCALC_METADATA",
|
|
2937
|
+
"MrcalcAbsParameters",
|
|
2938
|
+
"MrcalcAcosParameters",
|
|
2939
|
+
"MrcalcAcoshParameters",
|
|
2940
|
+
"MrcalcAddParameters",
|
|
2941
|
+
"MrcalcAndParameters",
|
|
2942
|
+
"MrcalcAsinParameters",
|
|
2943
|
+
"MrcalcAsinhParameters",
|
|
2944
|
+
"MrcalcAtanParameters",
|
|
2945
|
+
"MrcalcAtanhParameters",
|
|
2946
|
+
"MrcalcCeilParameters",
|
|
2947
|
+
"MrcalcComplexParameters",
|
|
2948
|
+
"MrcalcConfigParameters",
|
|
2949
|
+
"MrcalcConjParameters",
|
|
2950
|
+
"MrcalcCosParameters",
|
|
2951
|
+
"MrcalcCoshParameters",
|
|
2952
|
+
"MrcalcDivideParameters",
|
|
2953
|
+
"MrcalcEqParameters",
|
|
2954
|
+
"MrcalcExpParameters",
|
|
2955
|
+
"MrcalcFiniteParameters",
|
|
2956
|
+
"MrcalcFloorParameters",
|
|
2957
|
+
"MrcalcGeParameters",
|
|
2958
|
+
"MrcalcGtParameters",
|
|
2959
|
+
"MrcalcIfParameters",
|
|
2960
|
+
"MrcalcImagParameters",
|
|
2961
|
+
"MrcalcIsinfParameters",
|
|
2962
|
+
"MrcalcIsnanParameters",
|
|
2963
|
+
"MrcalcLeParameters",
|
|
2964
|
+
"MrcalcLog10Parameters",
|
|
2965
|
+
"MrcalcLogParameters",
|
|
2966
|
+
"MrcalcLtParameters",
|
|
2967
|
+
"MrcalcMaxParameters",
|
|
2968
|
+
"MrcalcMinParameters",
|
|
2969
|
+
"MrcalcMultiplyParameters",
|
|
2970
|
+
"MrcalcNegParameters",
|
|
2971
|
+
"MrcalcNeqParameters",
|
|
2972
|
+
"MrcalcNotParameters",
|
|
2973
|
+
"MrcalcOrParameters",
|
|
2974
|
+
"MrcalcOutputs",
|
|
2975
|
+
"MrcalcParameters",
|
|
2976
|
+
"MrcalcPhaseParameters",
|
|
2977
|
+
"MrcalcPolarParameters",
|
|
2978
|
+
"MrcalcPowParameters",
|
|
2979
|
+
"MrcalcProjParameters",
|
|
2980
|
+
"MrcalcRealParameters",
|
|
2981
|
+
"MrcalcReplaceParameters",
|
|
2982
|
+
"MrcalcRoundParameters",
|
|
2983
|
+
"MrcalcSinParameters",
|
|
2984
|
+
"MrcalcSinhParameters",
|
|
2985
|
+
"MrcalcSqrtParameters",
|
|
2986
|
+
"MrcalcSubtractParameters",
|
|
2987
|
+
"MrcalcTanParameters",
|
|
2988
|
+
"MrcalcTanhParameters",
|
|
2989
|
+
"MrcalcVariousFileParameters",
|
|
2990
|
+
"MrcalcVariousStringParameters",
|
|
2991
|
+
"MrcalcXorParameters",
|
|
2992
|
+
"mrcalc",
|
|
2993
|
+
"mrcalc_abs_params",
|
|
2994
|
+
"mrcalc_acos_params",
|
|
2995
|
+
"mrcalc_acosh_params",
|
|
2996
|
+
"mrcalc_add_params",
|
|
2997
|
+
"mrcalc_and_params",
|
|
2998
|
+
"mrcalc_asin_params",
|
|
2999
|
+
"mrcalc_asinh_params",
|
|
3000
|
+
"mrcalc_atan_params",
|
|
3001
|
+
"mrcalc_atanh_params",
|
|
3002
|
+
"mrcalc_ceil_params",
|
|
3003
|
+
"mrcalc_complex_params",
|
|
3004
|
+
"mrcalc_config_params",
|
|
3005
|
+
"mrcalc_conj_params",
|
|
3006
|
+
"mrcalc_cos_params",
|
|
3007
|
+
"mrcalc_cosh_params",
|
|
3008
|
+
"mrcalc_divide_params",
|
|
3009
|
+
"mrcalc_eq_params",
|
|
3010
|
+
"mrcalc_exp_params",
|
|
3011
|
+
"mrcalc_finite_params",
|
|
3012
|
+
"mrcalc_floor_params",
|
|
3013
|
+
"mrcalc_ge_params",
|
|
3014
|
+
"mrcalc_gt_params",
|
|
3015
|
+
"mrcalc_if_params",
|
|
3016
|
+
"mrcalc_imag_params",
|
|
3017
|
+
"mrcalc_isinf_params",
|
|
3018
|
+
"mrcalc_isnan_params",
|
|
3019
|
+
"mrcalc_le_params",
|
|
3020
|
+
"mrcalc_log10_params",
|
|
3021
|
+
"mrcalc_log_params",
|
|
3022
|
+
"mrcalc_lt_params",
|
|
3023
|
+
"mrcalc_max_params",
|
|
3024
|
+
"mrcalc_min_params",
|
|
3025
|
+
"mrcalc_multiply_params",
|
|
3026
|
+
"mrcalc_neg_params",
|
|
3027
|
+
"mrcalc_neq_params",
|
|
3028
|
+
"mrcalc_not_params",
|
|
3029
|
+
"mrcalc_or_params",
|
|
3030
|
+
"mrcalc_params",
|
|
3031
|
+
"mrcalc_phase_params",
|
|
3032
|
+
"mrcalc_polar_params",
|
|
3033
|
+
"mrcalc_pow_params",
|
|
3034
|
+
"mrcalc_proj_params",
|
|
3035
|
+
"mrcalc_real_params",
|
|
3036
|
+
"mrcalc_replace_params",
|
|
3037
|
+
"mrcalc_round_params",
|
|
3038
|
+
"mrcalc_sin_params",
|
|
3039
|
+
"mrcalc_sinh_params",
|
|
3040
|
+
"mrcalc_sqrt_params",
|
|
3041
|
+
"mrcalc_subtract_params",
|
|
3042
|
+
"mrcalc_tan_params",
|
|
3043
|
+
"mrcalc_tanh_params",
|
|
3044
|
+
"mrcalc_various_file_params",
|
|
3045
|
+
"mrcalc_various_string_params",
|
|
3046
|
+
"mrcalc_xor_params",
|
|
3047
|
+
]
|