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

import typing
import pathlib
from styxdefs import *
import dataclasses

POSSUM_PLOT_PY_METADATA = Metadata(
    id="3717e1750050dd9a445255662bf87c6292cddaf5.boutiques",
    name="possum_plot.py",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class PossumPlotPyOutputs(typing.NamedTuple):
    """
    Output object returned when calling `possum_plot_py(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_plots: OutputPathType
    """Output plot images from POSSUM"""


def possum_plot_py(
    input_file: InputPathType,
    output_basename: str,
    runner: Runner | None = None,
) -> PossumPlotPyOutputs:
    """
    Tool for plotting results from POSSUM simulations in FSL.
    
    Author: Oxford Centre for Functional MRI of the Brain (FMRIB)
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/POSSUM
    
    Args:
        input_file: Input file from POSSUM simulation (e.g.\
            simulation_results.txt).
        output_basename: Basename for output files (e.g. plot_output).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `PossumPlotPyOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(POSSUM_PLOT_PY_METADATA)
    cargs = []
    cargs.append("/usr/local/fsl/bin/possum_plot.py")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_basename)
    ret = PossumPlotPyOutputs(
        root=execution.output_file("."),
        output_plots=execution.output_file(output_basename + "_*.png"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "POSSUM_PLOT_PY_METADATA",
    "PossumPlotPyOutputs",
    "possum_plot_py",
]
