# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..petsurfer import GTMPVC


def test_GTMPVC_inputs():
    input_map = dict(
        X=dict(
            argstr="--X",
        ),
        X0=dict(
            argstr="--X0",
        ),
        args=dict(
            argstr="%s",
        ),
        auto_mask=dict(
            argstr="--auto-mask %f %f",
        ),
        beta=dict(
            argstr="--beta",
        ),
        color_table_file=dict(
            argstr="--ctab %s",
            extensions=None,
            xor=("color_table_file", "default_color_table"),
        ),
        contrast=dict(
            argstr="--C %s...",
        ),
        default_color_table=dict(
            argstr="--ctab-default",
            xor=("color_table_file", "default_color_table"),
        ),
        default_seg_merge=dict(
            argstr="--default-seg-merge",
        ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        frame=dict(
            argstr="--frame %i",
        ),
        in_file=dict(
            argstr="--i %s",
            copyfile=False,
            extensions=None,
            mandatory=True,
        ),
        km_hb=dict(
            argstr="--km-hb %s...",
        ),
        km_ref=dict(
            argstr="--km-ref %s...",
        ),
        lat=dict(
            argstr="--lat",
        ),
        mask_file=dict(
            argstr="--mask %s",
            extensions=None,
        ),
        merge_cblum_wm_gyri=dict(
            argstr="--merge-cblum-wm-gyri",
        ),
        merge_hypos=dict(
            argstr="--merge-hypos",
        ),
        mg=dict(
            argstr="--mg %g %s",
        ),
        mg_ref_cerebral_wm=dict(
            argstr="--mg-ref-cerebral-wm",
        ),
        mg_ref_lobes_wm=dict(
            argstr="--mg-ref-lobes-wm",
        ),
        mgx=dict(
            argstr="--mgx %f",
        ),
        no_pvc=dict(
            argstr="--no-pvc",
        ),
        no_reduce_fov=dict(
            argstr="--no-reduce-fov",
        ),
        no_rescale=dict(
            argstr="--no-rescale",
        ),
        no_tfe=dict(
            argstr="--no-tfe",
        ),
        num_threads=dict(
            argstr="--threads %i",
        ),
        opt_brain=dict(
            argstr="--opt-brain",
        ),
        opt_seg_merge=dict(
            argstr="--opt-seg-merge",
        ),
        opt_tol=dict(
            argstr="--opt-tol %i %f %f",
        ),
        optimization_schema=dict(
            argstr="--opt %s",
        ),
        psf=dict(
            argstr="--psf %f",
        ),
        psf_col=dict(
            argstr="--psf-col %f",
        ),
        psf_row=dict(
            argstr="--psf-row %f",
        ),
        psf_slice=dict(
            argstr="--psf-slice %f",
        ),
        pvc_dir=dict(
            argstr="--o %s",
            genfile=True,
        ),
        rbv=dict(
            argstr="--rbv",
            requires=["subjects_dir"],
        ),
        rbv_res=dict(
            argstr="--rbv-res %f",
        ),
        reduce_fox_eqodd=dict(
            argstr="--reduce-fox-eqodd",
        ),
        reg_file=dict(
            argstr="--reg %s",
            extensions=None,
            mandatory=True,
            xor=["reg_file", "regheader", "reg_identity"],
        ),
        reg_identity=dict(
            argstr="--reg-identity",
            mandatory=True,
            xor=["reg_file", "regheader", "reg_identity"],
        ),
        regheader=dict(
            argstr="--regheader",
            mandatory=True,
            xor=["reg_file", "regheader", "reg_identity"],
        ),
        replace=dict(
            argstr="--replace %i %i",
        ),
        rescale=dict(
            argstr="--rescale %s...",
        ),
        save_eres=dict(
            argstr="--save-eres",
        ),
        save_input=dict(
            argstr="--save-input",
        ),
        save_yhat=dict(
            argstr="--save-yhat",
            xor=["save_yhat_with_noise"],
        ),
        save_yhat0=dict(
            argstr="--save-yhat0",
        ),
        save_yhat_full_fov=dict(
            argstr="--save-yhat-full-fov",
        ),
        save_yhat_with_noise=dict(
            argstr="--save-yhat-with-noise %i %i",
            xor=["save_yhat"],
        ),
        scale_refval=dict(
            argstr="--scale-refval %f",
        ),
        segmentation=dict(
            argstr="--seg %s",
            extensions=None,
            mandatory=True,
        ),
        steady_state_params=dict(
            argstr="--ss %f %f %f",
        ),
        subjects_dir=dict(),
        tissue_fraction_resolution=dict(
            argstr="--segpvfres %f",
        ),
        tt_reduce=dict(
            argstr="--tt-reduce",
        ),
        tt_update=dict(
            argstr="--tt-update",
        ),
        y=dict(
            argstr="--y",
        ),
    )
    inputs = GTMPVC.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(inputs.traits()[key], metakey) == value


def test_GTMPVC_outputs():
    output_map = dict(
        gtm_file=dict(
            extensions=None,
        ),
        gtm_stats=dict(
            extensions=None,
        ),
        hb_dat=dict(
            extensions=None,
        ),
        hb_nifti=dict(
            extensions=None,
        ),
        input_file=dict(
            extensions=None,
        ),
        mgx_ctxgm=dict(
            extensions=None,
        ),
        mgx_gm=dict(
            extensions=None,
        ),
        mgx_subctxgm=dict(
            extensions=None,
        ),
        nopvc_file=dict(
            extensions=None,
        ),
        opt_params=dict(
            extensions=None,
        ),
        pvc_dir=dict(),
        rbv=dict(
            extensions=None,
        ),
        ref_file=dict(
            extensions=None,
        ),
        reg_anat2pet=dict(
            extensions=None,
        ),
        reg_anat2rbvpet=dict(
            extensions=None,
        ),
        reg_pet2anat=dict(
            extensions=None,
        ),
        reg_rbvpet2anat=dict(
            extensions=None,
        ),
        yhat=dict(
            extensions=None,
        ),
        yhat0=dict(
            extensions=None,
        ),
        yhat_full_fov=dict(
            extensions=None,
        ),
        yhat_with_noise=dict(
            extensions=None,
        ),
    )
    outputs = GTMPVC.output_spec()

    for key, metadata in list(output_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(outputs.traits()[key], metakey) == value
