niwrap-afni 0.5.1__py3-none-any.whl → 0.5.3__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-afni might be problematic. Click here for more details.

Files changed (111) hide show
  1. niwrap_afni/afni/abids_json_tool_py.py +104 -1
  2. niwrap_afni/afni/abids_tool.py +43 -1
  3. niwrap_afni/afni/adjunct_make_script_and_rst_py.py +2 -2
  4. niwrap_afni/afni/afni_batch_r.py +1 -2
  5. niwrap_afni/afni/balloon.py +25 -1
  6. niwrap_afni/afni/brain_skin.py +16 -1
  7. niwrap_afni/afni/build_afni_py.py +28 -1
  8. niwrap_afni/afni/cat_matvec.py +23 -1
  9. niwrap_afni/afni/convert_surface.py +38 -1
  10. niwrap_afni/afni/dicom_hinfo.py +9 -2
  11. niwrap_afni/afni/dsetstat2p.py +19 -1
  12. niwrap_afni/afni/fat_proc_align_anat_pair.py +10 -1
  13. niwrap_afni/afni/fat_proc_convert_dcm_anat.py +16 -1
  14. niwrap_afni/afni/fat_roi_row.py +1 -4
  15. niwrap_afni/afni/fsread_annot.py +2 -2
  16. niwrap_afni/afni/imrotate.py +10 -1
  17. niwrap_afni/afni/myget.py +16 -3
  18. niwrap_afni/afni/nifti_tool.py +3 -2
  19. niwrap_afni/afni/p2dsetstat.py +19 -1
  20. niwrap_afni/afni/plugout_drive.py +93 -1
  21. niwrap_afni/afni/prompt_popup.py +46 -1
  22. niwrap_afni/afni/prompt_user.py +16 -1
  23. niwrap_afni/afni/rbox.py +170 -9
  24. niwrap_afni/afni/samp_bias.py +16 -1
  25. niwrap_afni/afni/sfim.py +9 -2
  26. niwrap_afni/afni/stimband.py +22 -3
  27. niwrap_afni/afni/surf_dist.py +47 -1
  28. niwrap_afni/afni/surf_fwhm.py +1 -5
  29. niwrap_afni/afni/surf_info.py +99 -2
  30. niwrap_afni/afni/surface_metrics.py +179 -172
  31. niwrap_afni/afni/tedana_wrapper_py.py +19 -1
  32. niwrap_afni/afni/v_1d_bport.py +12 -1
  33. niwrap_afni/afni/v_1d_correlate.py +39 -1
  34. niwrap_afni/afni/v_1d_marry.py +1 -2
  35. niwrap_afni/afni/v_1d_rplot.py +233 -4
  36. niwrap_afni/afni/v_1d_sem.py +157 -2
  37. niwrap_afni/afni/v_1d_tsort.py +10 -1
  38. niwrap_afni/afni/v_1ddot.py +5 -4
  39. niwrap_afni/afni/v_1deval.py +16 -1
  40. niwrap_afni/afni/v_1dgen_arma11.py +16 -1
  41. niwrap_afni/afni/v_3_droimaker.py +16 -1
  42. niwrap_afni/afni/v_3d_afnito3_d.py +34 -4
  43. niwrap_afni/afni/v_3d_afnito_niml.py +34 -2
  44. niwrap_afni/afni/v_3d_amp_to_rsfc.py +10 -9
  45. niwrap_afni/afni/v_3d_anova3.py +323 -20
  46. niwrap_afni/afni/v_3d_clip_level.py +38 -2
  47. niwrap_afni/afni/v_3d_clust_sim.py +275 -22
  48. niwrap_afni/afni/v_3d_cm.py +103 -2
  49. niwrap_afni/afni/v_3d_dtto_dwi.py +58 -4
  50. niwrap_afni/afni/v_3d_dwito_dt.py +299 -2
  51. niwrap_afni/afni/v_3d_ecm.py +24 -2
  52. niwrap_afni/afni/v_3d_fdr.py +14 -1
  53. niwrap_afni/afni/v_3d_gen_feature_dist.py +53 -1
  54. niwrap_afni/afni/v_3d_hist.py +14 -1
  55. niwrap_afni/afni/v_3d_icc.py +137 -2
  56. niwrap_afni/afni/v_3d_lfcd.py +24 -5
  57. niwrap_afni/afni/v_3d_lme.py +1 -3
  58. niwrap_afni/afni/v_3d_local_histog.py +32 -1
  59. niwrap_afni/afni/v_3d_lrflip.py +46 -1
  60. niwrap_afni/afni/v_3d_lss.py +107 -4
  61. niwrap_afni/afni/v_3d_mask_to_ascii.py +12 -4
  62. niwrap_afni/afni/v_3d_mema.py +301 -3
  63. niwrap_afni/afni/v_3d_mepfm.py +1 -2
  64. niwrap_afni/afni/v_3d_nlfim.py +487 -30
  65. niwrap_afni/afni/v_3d_nwarp_xyz.py +27 -14
  66. niwrap_afni/afni/v_3d_overlap.py +20 -6
  67. niwrap_afni/afni/v_3d_par2_afni.py +32 -1
  68. niwrap_afni/afni/v_3d_pfm.py +200 -2
  69. niwrap_afni/afni/v_3d_remlfit.py +41 -1
  70. niwrap_afni/afni/v_3d_roistats.py +1 -2
  71. niwrap_afni/afni/v_3d_rsfc.py +240 -6
  72. niwrap_afni/afni/v_3d_stat_clust.py +19 -1
  73. niwrap_afni/afni/v_3d_tcat.py +24 -5
  74. niwrap_afni/afni/v_3d_threeto_rgb.py +1 -2
  75. niwrap_afni/afni/v_3d_toy_prog.py +111 -1
  76. niwrap_afni/afni/v_3d_tsgen.py +18 -1
  77. niwrap_afni/afni/v_3d_tsort.py +10 -1
  78. niwrap_afni/afni/v_3d_tstat.py +25 -15
  79. niwrap_afni/afni/v_3d_undump.py +10 -1
  80. niwrap_afni/afni/v_3d_warp.py +236 -2
  81. niwrap_afni/afni/v_3d_wilcoxon.py +9 -7
  82. niwrap_afni/afni/v_3dbucket.py +14 -1
  83. niwrap_afni/afni/v_3dcalc.py +1 -1
  84. niwrap_afni/afni/v_3dcopy.py +31 -3
  85. niwrap_afni/afni/v_3dmask_svd.py +99 -2
  86. niwrap_afni/afni/v__4_daverage.py +11 -2
  87. niwrap_afni/afni/v__afni_env.py +19 -1
  88. niwrap_afni/afni/v__afni_refacer_run.py +36 -1
  89. niwrap_afni/afni/v__build_afni_xlib.py +21 -1
  90. niwrap_afni/afni/v__chauffeur_afni.py +184 -2
  91. niwrap_afni/afni/v__command_globb.py +13 -7
  92. niwrap_afni/afni/v__compute_oc_weights.py +16 -1
  93. niwrap_afni/afni/v__deblank_file_names.py +13 -2
  94. niwrap_afni/afni/v__dice_metric.py +18 -14
  95. niwrap_afni/afni/v__djunct_edgy_align_check.py +82 -10
  96. niwrap_afni/afni/v__djunct_montage_coordinator.py +10 -1
  97. niwrap_afni/afni/v__get_afni_res.py +3 -2
  98. niwrap_afni/afni/v__grad_flip_test.py +38 -42
  99. niwrap_afni/afni/v__grayplot.py +34 -1
  100. niwrap_afni/afni/v__help_afni.py +63 -2
  101. niwrap_afni/afni/v__make_label_table.py +14 -1
  102. niwrap_afni/afni/v__no_ext.py +9 -2
  103. niwrap_afni/afni/v__reorder.py +10 -1
  104. niwrap_afni/afni/v__skull_strip_touch_up.py +10 -1
  105. niwrap_afni/afni/v__suma_make_spec_caret.py +62 -2
  106. niwrap_afni/afni/v__suma_make_spec_fs.py +180 -2
  107. niwrap_afni/afni/v__to_mni_qwarpar.py +21 -1
  108. niwrap_afni/afni/v__to_rai.py +23 -7
  109. {niwrap_afni-0.5.1.dist-info → niwrap_afni-0.5.3.dist-info}/METADATA +1 -1
  110. {niwrap_afni-0.5.1.dist-info → niwrap_afni-0.5.3.dist-info}/RECORD +111 -111
  111. {niwrap_afni-0.5.1.dist-info → niwrap_afni-0.5.3.dist-info}/WHEEL +0 -0
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  P2DSETSTAT_METADATA = Metadata(
9
- id="425596bb580582f82bf97f7e288cb9c38b721949.boutiques",
9
+ id="23edaf6df2aa7e769c710a218ab8bd8e6572d021.boutiques",
10
10
  name="p2dsetstat",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -17,6 +17,8 @@ P2dsetstatParameters = typing.TypedDict('P2dsetstatParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["p2dsetstat"],
18
18
  "dataset": str,
19
19
  "pvalue": float,
20
+ "bisided": bool,
21
+ "twosided": bool,
20
22
  "onesided": bool,
21
23
  "quiet": bool,
22
24
  })
@@ -67,6 +69,8 @@ class P2dsetstatOutputs(typing.NamedTuple):
67
69
  def p2dsetstat_params(
68
70
  dataset: str,
69
71
  pvalue: float,
72
+ bisided: bool = False,
73
+ twosided: bool = False,
70
74
  onesided: bool = False,
71
75
  quiet: bool = False,
72
76
  ) -> P2dsetstatParameters:
@@ -80,6 +84,8 @@ def p2dsetstat_params(
80
84
  (because of the square-brackets). 'i' can be either a number or a\
81
85
  string label selector.
82
86
  pvalue: Input p-value P, which MUST be in the interval [0,1].
87
+ bisided: Two-sided test.
88
+ twosided: Two-sided test.
83
89
  onesided: One-sided test.
84
90
  quiet: Output only the final statistic value.
85
91
  Returns:
@@ -89,6 +95,8 @@ def p2dsetstat_params(
89
95
  "__STYXTYPE__": "p2dsetstat",
90
96
  "dataset": dataset,
91
97
  "pvalue": pvalue,
98
+ "bisided": bisided,
99
+ "twosided": twosided,
92
100
  "onesided": onesided,
93
101
  "quiet": quiet,
94
102
  }
@@ -118,6 +126,10 @@ def p2dsetstat_cargs(
118
126
  "-pval",
119
127
  str(params.get("pvalue"))
120
128
  ])
129
+ if params.get("bisided"):
130
+ cargs.append("-bisided")
131
+ if params.get("twosided"):
132
+ cargs.append("-2sided")
121
133
  if params.get("onesided"):
122
134
  cargs.append("-1sided")
123
135
  if params.get("quiet"):
@@ -172,6 +184,8 @@ def p2dsetstat_execute(
172
184
  def p2dsetstat(
173
185
  dataset: str,
174
186
  pvalue: float,
187
+ bisided: bool = False,
188
+ twosided: bool = False,
175
189
  onesided: bool = False,
176
190
  quiet: bool = False,
177
191
  runner: Runner | None = None,
@@ -190,6 +204,8 @@ def p2dsetstat(
190
204
  (because of the square-brackets). 'i' can be either a number or a\
191
205
  string label selector.
192
206
  pvalue: Input p-value P, which MUST be in the interval [0,1].
207
+ bisided: Two-sided test.
208
+ twosided: Two-sided test.
193
209
  onesided: One-sided test.
194
210
  quiet: Output only the final statistic value.
195
211
  runner: Command runner.
@@ -201,6 +217,8 @@ def p2dsetstat(
201
217
  params = p2dsetstat_params(
202
218
  dataset=dataset,
203
219
  pvalue=pvalue,
220
+ bisided=bisided,
221
+ twosided=twosided,
204
222
  onesided=onesided,
205
223
  quiet=quiet,
206
224
  )
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  PLUGOUT_DRIVE_METADATA = Metadata(
9
- id="65a44f6f7d92c1ad9ba4ed1d48f6c277a7f935fb.boutiques",
9
+ id="322abb84ee04acd16878a832336aea8a4c964855.boutiques",
10
10
  name="plugout_drive",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -16,12 +16,20 @@ PLUGOUT_DRIVE_METADATA = Metadata(
16
16
  PlugoutDriveParameters = typing.TypedDict('PlugoutDriveParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["plugout_drive"],
18
18
  "host": typing.NotRequired[str | None],
19
+ "shm": bool,
19
20
  "verbose": bool,
20
21
  "port": typing.NotRequired[float | None],
21
22
  "maxwait": typing.NotRequired[float | None],
22
23
  "name": typing.NotRequired[str | None],
23
24
  "command": typing.NotRequired[list[str] | None],
24
25
  "quit": bool,
26
+ "np": typing.NotRequired[float | None],
27
+ "npq": typing.NotRequired[float | None],
28
+ "npb": typing.NotRequired[float | None],
29
+ "max_port_bloc": bool,
30
+ "max_port_bloc_quiet": bool,
31
+ "num_assigned_ports": bool,
32
+ "num_assigned_ports_quiet": bool,
25
33
  })
26
34
 
27
35
 
@@ -66,12 +74,20 @@ class PlugoutDriveOutputs(typing.NamedTuple):
66
74
 
67
75
  def plugout_drive_params(
68
76
  host: str | None = None,
77
+ shm: bool = False,
69
78
  verbose: bool = False,
70
79
  port: float | None = None,
71
80
  maxwait: float | None = None,
72
81
  name: str | None = None,
73
82
  command: list[str] | None = None,
74
83
  quit_: bool = False,
84
+ np: float | None = None,
85
+ npq: float | None = None,
86
+ npb: float | None = None,
87
+ max_port_bloc: bool = False,
88
+ max_port_bloc_quiet: bool = False,
89
+ num_assigned_ports: bool = False,
90
+ num_assigned_ports_quiet: bool = False,
75
91
  ) -> PlugoutDriveParameters:
76
92
  """
77
93
  Build parameters.
@@ -79,6 +95,8 @@ def plugout_drive_params(
79
95
  Args:
80
96
  host: Connect to AFNI running on the specified host using TCP/IP.\
81
97
  Default is 'localhost'.
98
+ shm: Connect to the current host using shared memory for large data\
99
+ transfers.
82
100
  verbose: Verbose mode.
83
101
  port: Use TCP/IP port number. Default is 8099.
84
102
  maxwait: Maximum wait time in seconds for AFNI to connect. Default is 9\
@@ -89,13 +107,28 @@ def plugout_drive_params(
89
107
  SomeFunction"'.
90
108
  quit_: Quit after executing all -com commands. Default is to wait for\
91
109
  more commands.
110
+ np: Provide a port offset to allow multiple instances of AFNI <-->\
111
+ SUMA, etc., on the same machine.
112
+ npq: Like -np but quieter in the face of adversity.
113
+ npb: Similar to -np, but using a block for easier usage.
114
+ max_port_bloc: Print the current value of MAX_BLOC and exit.
115
+ max_port_bloc_quiet: Print MAX_BLOC value and exit quietly.
116
+ num_assigned_ports: Print the number of assigned ports used by AFNI and\
117
+ exit.
118
+ num_assigned_ports_quiet: Print the number of assigned ports used by\
119
+ AFNI and exit quietly.
92
120
  Returns:
93
121
  Parameter dictionary
94
122
  """
95
123
  params = {
96
124
  "__STYXTYPE__": "plugout_drive",
125
+ "shm": shm,
97
126
  "verbose": verbose,
98
127
  "quit": quit_,
128
+ "max_port_bloc": max_port_bloc,
129
+ "max_port_bloc_quiet": max_port_bloc_quiet,
130
+ "num_assigned_ports": num_assigned_ports,
131
+ "num_assigned_ports_quiet": num_assigned_ports_quiet,
99
132
  }
100
133
  if host is not None:
101
134
  params["host"] = host
@@ -107,6 +140,12 @@ def plugout_drive_params(
107
140
  params["name"] = name
108
141
  if command is not None:
109
142
  params["command"] = command
143
+ if np is not None:
144
+ params["np"] = np
145
+ if npq is not None:
146
+ params["npq"] = npq
147
+ if npb is not None:
148
+ params["npb"] = npb
110
149
  return params
111
150
 
112
151
 
@@ -130,6 +169,8 @@ def plugout_drive_cargs(
130
169
  "-host",
131
170
  params.get("host")
132
171
  ])
172
+ if params.get("shm"):
173
+ cargs.append("-shm")
133
174
  if params.get("verbose"):
134
175
  cargs.append("-v")
135
176
  if params.get("port") is not None:
@@ -154,6 +195,29 @@ def plugout_drive_cargs(
154
195
  ])
155
196
  if params.get("quit"):
156
197
  cargs.append("-quit")
198
+ if params.get("np") is not None:
199
+ cargs.extend([
200
+ "-np",
201
+ str(params.get("np"))
202
+ ])
203
+ if params.get("npq") is not None:
204
+ cargs.extend([
205
+ "-npq",
206
+ str(params.get("npq"))
207
+ ])
208
+ if params.get("npb") is not None:
209
+ cargs.extend([
210
+ "-npb",
211
+ str(params.get("npb"))
212
+ ])
213
+ if params.get("max_port_bloc"):
214
+ cargs.append("-max_port_bloc")
215
+ if params.get("max_port_bloc_quiet"):
216
+ cargs.append("-max_port_bloc_quiet")
217
+ if params.get("num_assigned_ports"):
218
+ cargs.append("-num_assigned_ports")
219
+ if params.get("num_assigned_ports_quiet"):
220
+ cargs.append("-num_assigned_ports_quiet")
157
221
  return cargs
158
222
 
159
223
 
@@ -203,12 +267,20 @@ def plugout_drive_execute(
203
267
 
204
268
  def plugout_drive(
205
269
  host: str | None = None,
270
+ shm: bool = False,
206
271
  verbose: bool = False,
207
272
  port: float | None = None,
208
273
  maxwait: float | None = None,
209
274
  name: str | None = None,
210
275
  command: list[str] | None = None,
211
276
  quit_: bool = False,
277
+ np: float | None = None,
278
+ npq: float | None = None,
279
+ npb: float | None = None,
280
+ max_port_bloc: bool = False,
281
+ max_port_bloc_quiet: bool = False,
282
+ num_assigned_ports: bool = False,
283
+ num_assigned_ports_quiet: bool = False,
212
284
  runner: Runner | None = None,
213
285
  ) -> PlugoutDriveOutputs:
214
286
  """
@@ -222,6 +294,8 @@ def plugout_drive(
222
294
  Args:
223
295
  host: Connect to AFNI running on the specified host using TCP/IP.\
224
296
  Default is 'localhost'.
297
+ shm: Connect to the current host using shared memory for large data\
298
+ transfers.
225
299
  verbose: Verbose mode.
226
300
  port: Use TCP/IP port number. Default is 8099.
227
301
  maxwait: Maximum wait time in seconds for AFNI to connect. Default is 9\
@@ -232,6 +306,16 @@ def plugout_drive(
232
306
  SomeFunction"'.
233
307
  quit_: Quit after executing all -com commands. Default is to wait for\
234
308
  more commands.
309
+ np: Provide a port offset to allow multiple instances of AFNI <-->\
310
+ SUMA, etc., on the same machine.
311
+ npq: Like -np but quieter in the face of adversity.
312
+ npb: Similar to -np, but using a block for easier usage.
313
+ max_port_bloc: Print the current value of MAX_BLOC and exit.
314
+ max_port_bloc_quiet: Print MAX_BLOC value and exit quietly.
315
+ num_assigned_ports: Print the number of assigned ports used by AFNI and\
316
+ exit.
317
+ num_assigned_ports_quiet: Print the number of assigned ports used by\
318
+ AFNI and exit quietly.
235
319
  runner: Command runner.
236
320
  Returns:
237
321
  NamedTuple of outputs (described in `PlugoutDriveOutputs`).
@@ -240,12 +324,20 @@ def plugout_drive(
240
324
  execution = runner.start_execution(PLUGOUT_DRIVE_METADATA)
241
325
  params = plugout_drive_params(
242
326
  host=host,
327
+ shm=shm,
243
328
  verbose=verbose,
244
329
  port=port,
245
330
  maxwait=maxwait,
246
331
  name=name,
247
332
  command=command,
248
333
  quit_=quit_,
334
+ np=np,
335
+ npq=npq,
336
+ npb=npb,
337
+ max_port_bloc=max_port_bloc,
338
+ max_port_bloc_quiet=max_port_bloc_quiet,
339
+ num_assigned_ports=num_assigned_ports,
340
+ num_assigned_ports_quiet=num_assigned_ports_quiet,
249
341
  )
250
342
  return plugout_drive_execute(params, execution)
251
343
 
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  PROMPT_POPUP_METADATA = Metadata(
9
- id="56ce96c081577f794f865f7030869659d97db1e1.boutiques",
9
+ id="c24519073e7efb98045929a1a4d42a4a25f3e8ef.boutiques",
10
10
  name="prompt_popup",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -15,8 +15,11 @@ PROMPT_POPUP_METADATA = Metadata(
15
15
 
16
16
  PromptPopupParameters = typing.TypedDict('PromptPopupParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["prompt_popup"],
18
+ "message": str,
18
19
  "message_pause": typing.NotRequired[str | None],
20
+ "buttons": typing.NotRequired[list[str] | None],
19
21
  "buttons_b": typing.NotRequired[list[str] | None],
22
+ "timeout": typing.NotRequired[float | None],
20
23
  "timeout_to": typing.NotRequired[float | None],
21
24
  })
22
25
 
@@ -61,27 +64,42 @@ class PromptPopupOutputs(typing.NamedTuple):
61
64
 
62
65
 
63
66
  def prompt_popup_params(
67
+ message: str,
64
68
  message_pause: str | None = None,
69
+ buttons: list[str] | None = None,
65
70
  buttons_b: list[str] | None = None,
71
+ timeout: float | None = None,
66
72
  timeout_to: float | None = None,
67
73
  ) -> PromptPopupParameters:
68
74
  """
69
75
  Build parameters.
70
76
 
71
77
  Args:
78
+ message: Pops a window prompting the user with MESSAGE. If MESSAGE is\
79
+ '-', it is read from stdin.
72
80
  message_pause: Same as -message to match the old prompt_user.
81
+ buttons: What do you want the buttons to say? You can give up to three\
82
+ -button for three buttons. Returns integer 1, 2, or 3. If there is no\
83
+ -button, there will be one button 'Ok'.
73
84
  buttons_b: Same as -button.
85
+ timeout: Timeout in seconds of prompt message. Default answer is\
86
+ returned if TT seconds elapse without user input.
74
87
  timeout_to: Same as -timeout TT.
75
88
  Returns:
76
89
  Parameter dictionary
77
90
  """
78
91
  params = {
79
92
  "__STYXTYPE__": "prompt_popup",
93
+ "message": message,
80
94
  }
81
95
  if message_pause is not None:
82
96
  params["message_pause"] = message_pause
97
+ if buttons is not None:
98
+ params["buttons"] = buttons
83
99
  if buttons_b is not None:
84
100
  params["buttons_b"] = buttons_b
101
+ if timeout is not None:
102
+ params["timeout"] = timeout
85
103
  if timeout_to is not None:
86
104
  params["timeout_to"] = timeout_to
87
105
  return params
@@ -102,16 +120,30 @@ def prompt_popup_cargs(
102
120
  """
103
121
  cargs = []
104
122
  cargs.append("prompt_popup")
123
+ cargs.extend([
124
+ "-message",
125
+ params.get("message")
126
+ ])
105
127
  if params.get("message_pause") is not None:
106
128
  cargs.extend([
107
129
  "-pause",
108
130
  params.get("message_pause")
109
131
  ])
132
+ if params.get("buttons") is not None:
133
+ cargs.extend([
134
+ "-button",
135
+ *params.get("buttons")
136
+ ])
110
137
  if params.get("buttons_b") is not None:
111
138
  cargs.extend([
112
139
  "-b",
113
140
  *params.get("buttons_b")
114
141
  ])
142
+ if params.get("timeout") is not None:
143
+ cargs.extend([
144
+ "-timeout",
145
+ str(params.get("timeout"))
146
+ ])
115
147
  if params.get("timeout_to") is not None:
116
148
  cargs.extend([
117
149
  "-to",
@@ -165,8 +197,11 @@ def prompt_popup_execute(
165
197
 
166
198
 
167
199
  def prompt_popup(
200
+ message: str,
168
201
  message_pause: str | None = None,
202
+ buttons: list[str] | None = None,
169
203
  buttons_b: list[str] | None = None,
204
+ timeout: float | None = None,
170
205
  timeout_to: float | None = None,
171
206
  runner: Runner | None = None,
172
207
  ) -> PromptPopupOutputs:
@@ -179,8 +214,15 @@ def prompt_popup(
179
214
  URL: https://afni.nimh.nih.gov/
180
215
 
181
216
  Args:
217
+ message: Pops a window prompting the user with MESSAGE. If MESSAGE is\
218
+ '-', it is read from stdin.
182
219
  message_pause: Same as -message to match the old prompt_user.
220
+ buttons: What do you want the buttons to say? You can give up to three\
221
+ -button for three buttons. Returns integer 1, 2, or 3. If there is no\
222
+ -button, there will be one button 'Ok'.
183
223
  buttons_b: Same as -button.
224
+ timeout: Timeout in seconds of prompt message. Default answer is\
225
+ returned if TT seconds elapse without user input.
184
226
  timeout_to: Same as -timeout TT.
185
227
  runner: Command runner.
186
228
  Returns:
@@ -189,8 +231,11 @@ def prompt_popup(
189
231
  runner = runner or get_global_runner()
190
232
  execution = runner.start_execution(PROMPT_POPUP_METADATA)
191
233
  params = prompt_popup_params(
234
+ message=message,
192
235
  message_pause=message_pause,
236
+ buttons=buttons,
193
237
  buttons_b=buttons_b,
238
+ timeout=timeout,
194
239
  timeout_to=timeout_to,
195
240
  )
196
241
  return prompt_popup_execute(params, execution)
@@ -6,7 +6,7 @@ import pathlib
6
6
  from styxdefs import *
7
7
 
8
8
  PROMPT_USER_METADATA = Metadata(
9
- id="eeffbea4e522408c1d4978572830a23c9b27d7fb.boutiques",
9
+ id="50f7b3456cf7fa2cd699f8ebd295c575df5c9675.boutiques",
10
10
  name="prompt_user",
11
11
  package="afni",
12
12
  container_image_tag="afni/afni_make_build:AFNI_24.2.06",
@@ -16,6 +16,7 @@ PROMPT_USER_METADATA = Metadata(
16
16
  PromptUserParameters = typing.TypedDict('PromptUserParameters', {
17
17
  "__STYX_TYPE__": typing.Literal["prompt_user"],
18
18
  "pause_message": str,
19
+ "timeout": typing.NotRequired[float | None],
19
20
  "timeout_alias": typing.NotRequired[float | None],
20
21
  })
21
22
 
@@ -61,6 +62,7 @@ class PromptUserOutputs(typing.NamedTuple):
61
62
 
62
63
  def prompt_user_params(
63
64
  pause_message: str,
65
+ timeout: float | None = None,
64
66
  timeout_alias: float | None = None,
65
67
  ) -> PromptUserParameters:
66
68
  """
@@ -69,6 +71,8 @@ def prompt_user_params(
69
71
  Args:
70
72
  pause_message: Pops a window prompting the user with MESSAGE. If\
71
73
  MESSAGE is '-', it is read from stdin.
74
+ timeout: Timeout in seconds for the prompt message. Default answer is\
75
+ returned if TT seconds elapse without user input.
72
76
  timeout_alias: Alias for -timeout.
73
77
  Returns:
74
78
  Parameter dictionary
@@ -77,6 +81,8 @@ def prompt_user_params(
77
81
  "__STYXTYPE__": "prompt_user",
78
82
  "pause_message": pause_message,
79
83
  }
84
+ if timeout is not None:
85
+ params["timeout"] = timeout
80
86
  if timeout_alias is not None:
81
87
  params["timeout_alias"] = timeout_alias
82
88
  return params
@@ -101,6 +107,11 @@ def prompt_user_cargs(
101
107
  "<-pause>",
102
108
  params.get("pause_message")
103
109
  ])
110
+ if params.get("timeout") is not None:
111
+ cargs.extend([
112
+ "-timeout",
113
+ str(params.get("timeout"))
114
+ ])
104
115
  if params.get("timeout_alias") is not None:
105
116
  cargs.extend([
106
117
  "-to",
@@ -154,6 +165,7 @@ def prompt_user_execute(
154
165
 
155
166
  def prompt_user(
156
167
  pause_message: str,
168
+ timeout: float | None = None,
157
169
  timeout_alias: float | None = None,
158
170
  runner: Runner | None = None,
159
171
  ) -> PromptUserOutputs:
@@ -167,6 +179,8 @@ def prompt_user(
167
179
  Args:
168
180
  pause_message: Pops a window prompting the user with MESSAGE. If\
169
181
  MESSAGE is '-', it is read from stdin.
182
+ timeout: Timeout in seconds for the prompt message. Default answer is\
183
+ returned if TT seconds elapse without user input.
170
184
  timeout_alias: Alias for -timeout.
171
185
  runner: Command runner.
172
186
  Returns:
@@ -176,6 +190,7 @@ def prompt_user(
176
190
  execution = runner.start_execution(PROMPT_USER_METADATA)
177
191
  params = prompt_user_params(
178
192
  pause_message=pause_message,
193
+ timeout=timeout,
179
194
  timeout_alias=timeout_alias,
180
195
  )
181
196
  return prompt_user_execute(params, execution)