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

import typing
import pathlib
from styxdefs import *
import dataclasses

V_1DGEN_ARMA11_METADATA = Metadata(
    id="9fce1559df8cc31e0d2c99d44319f7a47b38ba76.boutiques",
    name="1dgenARMA11",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V1dgenArma11Outputs(typing.NamedTuple):
    """
    Output object returned when calling `v_1dgen_arma11(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output: OutputPathType
    """Generated ARMA(1,1) time series"""


def v_1dgen_arma11(
    length_alt: float | None = None,
    num_series: float | None = None,
    param_a: float | None = None,
    param_b: float | None = None,
    param_lam: float | None = None,
    std_dev: float | None = None,
    normalize: bool = False,
    seed: float | None = None,
    corcut: float | None = None,
    arma31: str | None = None,
    arma51: str | None = None,
    runner: Runner | None = None,
) -> V1dgenArma11Outputs:
    """
    Program to generate an ARMA(1,1) time series, for simulation studies. Results
    are written to stdout.
    
    Author: AFNI Developers
    
    URL: https://afni.nimh.nih.gov/
    
    Args:
        length_alt: Specify the length of the time series vector to generate\
            (equivalent to -num option).
        num_series: The number of time series vectors to generate; defaults to\
            1 if not given.
        param_a: Specify ARMA(1,1) parameters 'a'.
        param_b: Specify ARMA(1,1) parameter 'b' directly.
        param_lam: Specify ARMA(1,1) parameter 'b' indirectly.
        std_dev: Set standard deviation of results [default=1].
        normalize: Normalize time series so sum of squares is 1.
        seed: Set random number seed.
        corcut: Specify a cutoff for the correlation coefficient r(k) of noise\
            samples at k units apart. Default is 0.00010.
        arma31: Specify parameters for a restricted ARMA(3,1) model: -arma31 a\
            r theta vrat.
        arma51: Specify parameters for a restricted ARMA(5,1) model: -arma51 a\
            r1 theta1 r2 theta2 vrat.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V1dgenArma11Outputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_1DGEN_ARMA11_METADATA)
    cargs = []
    cargs.append("1dgenARMA11")
    if length_alt is not None:
        cargs.extend([
            "-len",
            str(length_alt)
        ])
    if num_series is not None:
        cargs.extend([
            "-nvec",
            str(num_series)
        ])
    if param_a is not None:
        cargs.extend([
            "-a",
            str(param_a)
        ])
    if param_b is not None:
        cargs.extend([
            "-b",
            str(param_b)
        ])
    if param_lam is not None:
        cargs.extend([
            "-lam",
            str(param_lam)
        ])
    if std_dev is not None:
        cargs.extend([
            "-sig",
            str(std_dev)
        ])
    if normalize:
        cargs.append("-norm")
    if seed is not None:
        cargs.extend([
            "-seed",
            str(seed)
        ])
    if corcut is not None:
        cargs.extend([
            "-CORcut",
            str(corcut)
        ])
    if arma31 is not None:
        cargs.extend([
            "-arma31",
            arma31
        ])
    if arma51 is not None:
        cargs.extend([
            "-arma51",
            arma51
        ])
    ret = V1dgenArma11Outputs(
        root=execution.output_file("."),
        output=execution.output_file("stdout"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V1dgenArma11Outputs",
    "V_1DGEN_ARMA11_METADATA",
    "v_1dgen_arma11",
]
