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

import typing
import pathlib
from styxdefs import *
import dataclasses

POSSUM_PLOT_METADATA = Metadata(
    id="8ed3fa6e50d07f3853fcec9ca53f667a78d048a0.boutiques",
    name="possum_plot",
    package="fsl",
    container_image_tag="brainlife/fsl:6.0.4-patched2",
)


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


def possum_plot(
    input_file: InputPathType,
    output_basename: str,
    runner: Runner | None = None,
) -> PossumPlotOutputs:
    """
    Tool for plotting results from POSSUM simulations in FSL.
    
    Author: FMRIB Analysis Group, University of Oxford
    
    URL: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki
    
    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 `PossumPlotOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(POSSUM_PLOT_METADATA)
    cargs = []
    cargs.append("possum_plot.py")
    cargs.append(execution.input_file(input_file))
    cargs.append(output_basename)
    ret = PossumPlotOutputs(
        root=execution.output_file("."),
        output_plots=execution.output_file(output_basename + "_*.png"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "POSSUM_PLOT_METADATA",
    "PossumPlotOutputs",
    "possum_plot",
]
