# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

V_1DFFT_METADATA = Metadata(
    id="f63c1682b30f92c01d9b402bed2cf0a390165697.boutiques",
    name="1dfft",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V1dfftOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_1dfft(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    out_fft: OutputPathType
    """Output file with the absolute value of the FFT of the input columns."""


def v_1dfft(
    infile: InputPathType,
    outfile: str,
    runner: Runner | None = None,
) -> V1dfftOutputs:
    """
    Compute the absolute value of the FFT of input columns from an AFNI 1D file.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/1dfft.html
    
    Args:
        infile: Input .1D file containing an ASCII list of numbers arranged in\
            columns.
        outfile: Output file to store the FFT results.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V1dfftOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_1DFFT_METADATA)
    cargs = []
    cargs.append("1dfft")
    cargs.append("[OPTIONS]")
    cargs.append(execution.input_file(infile))
    cargs.append(outfile)
    ret = V1dfftOutputs(
        root=execution.output_file("."),
        out_fft=execution.output_file(outfile),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V1dfftOutputs",
    "V_1DFFT_METADATA",
    "v_1dfft",
]
