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

import typing
import pathlib
from styxdefs import *
import dataclasses

MP_DIFFPOW_SH_METADATA = Metadata(
    id="47d1342f89677016a0725a5ada2d4a84149c45e9.boutiques",
    name="mp_diffpow.sh",
    package="fsl",
    container_image_tag="mcin/fsl:6.0.5",
)


class MpDiffpowShOutputs(typing.NamedTuple):
    """
    Output object returned when calling `mp_diffpow_sh(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    outfile: OutputPathType
    """File containing squared motion parameters, temporal difference of motion
    parameters, and squared differenced values."""


def mp_diffpow_sh(
    reg_file: InputPathType,
    diff_reg_file: str,
    runner: Runner | None = None,
) -> MpDiffpowShOutputs:
    """
    Generates a file with specific motion parameter calculations useful for
    accounting for 'spin history' effects and other variations not accounted for by
    motion correction.
    
    Author: Unknown
    
    Args:
        reg_file: Input file containing registration parameters (e.g.,\
            regparam.dat).
        diff_reg_file: Output file with differenced registration parameters\
            (e.g., diffregparam.dat).
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `MpDiffpowShOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(MP_DIFFPOW_SH_METADATA)
    cargs = []
    cargs.append("mp_diff")
    cargs.append(execution.input_file(reg_file))
    cargs.append(diff_reg_file)
    ret = MpDiffpowShOutputs(
        root=execution.output_file("."),
        outfile=execution.output_file(diff_reg_file),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "MP_DIFFPOW_SH_METADATA",
    "MpDiffpowShOutputs",
    "mp_diffpow_sh",
]
