# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.afni.preprocess import TCorrMap
def test_TCorrMap_inputs():
    input_map = dict(polort=dict(argstr='-polort %d',
    ),
    zmean=dict(name_source='in_file',
    suffix='_zmean',
    argstr='-Zmean %s',
    ),
    correlation_maps_masked=dict(name_source='in_file',
    argstr='-CorrMask %s',
    ),
    thresholds=dict(),
    outputtype=dict(),
    average_expr_nonzero=dict(name_source='in_file',
    xor=('average_expr', 'average_expr_nonzero', 'sum_expr'),
    suffix='_cexpr',
    argstr='-Cexpr %s %s',
    ),
    seeds_width=dict(xor='seeds',
    argstr='-Mseed %f',
    ),
    qmean=dict(name_source='in_file',
    suffix='_qmean',
    argstr='-Qmean %s',
    ),
    pmean=dict(name_source='in_file',
    suffix='_pmean',
    argstr='-Pmean %s',
    ),
    in_file=dict(copyfile=False,
    mandatory=True,
    argstr='-input %s',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    var_absolute_threshold=dict(name_source='in_file',
    xor=('absolute_threshold', 'var_absolute_threshold', 'var_absolute_threshold_normalize'),
    suffix='_varthresh',
    argstr='-VarThresh %f %f %f %s',
    ),
    absolute_threshold=dict(name_source='in_file',
    xor=('absolute_threshold', 'var_absolute_threshold', 'var_absolute_threshold_normalize'),
    suffix='_thresh',
    argstr='-Thresh %f %s',
    ),
    automask=dict(argstr='-automask',
    ),
    args=dict(argstr='%s',
    ),
    histogram=dict(name_source='in_file',
    suffix='_hist',
    argstr='-Hist %d %s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    average_expr=dict(name_source='in_file',
    xor=('average_expr', 'average_expr_nonzero', 'sum_expr'),
    suffix='_aexpr',
    argstr='-Aexpr %s %s',
    ),
    blur_fwhm=dict(argstr='-Gblur %f',
    ),
    var_absolute_threshold_normalize=dict(name_source='in_file',
    xor=('absolute_threshold', 'var_absolute_threshold', 'var_absolute_threshold_normalize'),
    suffix='_varthreshn',
    argstr='-VarThreshN %f %f %f %s',
    ),
    out_file=dict(name_source=['in_file'],
    name_template='%s_afni',
    argstr='-prefix %s',
    ),
    expr=dict(),
    mask=dict(argstr='-mask %s',
    ),
    mean_file=dict(name_source='in_file',
    suffix='_mean',
    argstr='-Mean %s',
    ),
    sum_expr=dict(name_source='in_file',
    xor=('average_expr', 'average_expr_nonzero', 'sum_expr'),
    suffix='_sexpr',
    argstr='-Sexpr %s %s',
    ),
    regress_out_timeseries=dict(argstr='-ort %s',
    ),
    seeds=dict(xor='seeds_width',
    argstr='-seed %s',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    correlation_maps=dict(name_source='in_file',
    argstr='-CorrMap %s',
    ),
    histogram_bin_numbers=dict(),
    bandpass=dict(argstr='-bpass %f %f',
    ),
    )
    inputs = TCorrMap.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_TCorrMap_outputs():
    output_map = dict(absolute_threshold=dict(),
    zmean=dict(),
    var_absolute_threshold_normalize=dict(),
    correlation_maps_masked=dict(),
    var_absolute_threshold=dict(),
    mean_file=dict(),
    pmean=dict(),
    histogram=dict(),
    sum_expr=dict(),
    average_expr_nonzero=dict(),
    average_expr=dict(),
    correlation_maps=dict(),
    qmean=dict(),
    )
    outputs = TCorrMap.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
