Ejemplo n.º 1
0
def test_fullrunrapidtide_v3(debug=False, display=False):
    # run rapidtide
    inputargs = [
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST.nii.gz"),
        os.path.join(get_test_temp_path(), "sub-RAPIDTIDETEST"),
        "--corrmask",
        os.path.join(get_examples_path(),
                     "sub-RAPIDTIDETEST_restrictedmask.nii.gz:1"),
        "--legacyoutput",
        "--maxpasses",
        "2",
        "--numnull",
        "100",
        "--refinetype",
        "pca",
        "--convergencethresh",
        "0.5",
        "--noglm",
        "--nprocs",
        "-1",
        "--similaritymetric",
        "mutualinfo",
        "--dpoutput",
        "--spcalculation",
        "--globalsignalmethod",
        "pca",
        "--regressor",
        os.path.join(
            get_examples_path(),
            "sub-RAPIDTIDETEST_desc-oversampledmovingregressor_timeseries.json:pass3",
        ),
    ]
    rapidtide_workflow.rapidtide_main(
        rapidtide_parser.process_args(inputargs=inputargs))
Ejemplo n.º 2
0
def test_fullrunrapidtide_v5(debug=False, display=False):
    # run rapidtide
    inputargs = [
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST_cifti.ptseries.nii"),
        os.path.join(get_test_temp_path(), "sub-RAPIDTIDETEST"),
        "--nprocs",
        "-1",
        "--passes",
        "2",
        "--numnull",
        "0",
    ]
    rapidtide_workflow.rapidtide_main(rapidtide_parser.process_args(inputargs=inputargs))
Ejemplo n.º 3
0
def test_fullrunrapidtide_v1(debug=False, display=False):
    # run rapidtide
    inputargs = [
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST.nii.gz"),
        os.path.join(get_test_temp_path(), "sub-RAPIDTIDETEST"),
        "--spatialfilt",
        "2",
        "--nprocs",
        "-1",
        "--passes",
        "1",
        "--despecklepasses",
        "3",
    ]
    rapidtide_workflow.rapidtide_main(
        rapidtide_parser.process_args(inputargs=inputargs))
Ejemplo n.º 4
0
def test_fullrunrapidtide_v4(debug=False, display=False):
    # run rapidtide
    inputargs = [
        os.path.join(get_examples_path(), "sub-NIRSRAPIDTIDETEST.txt"),
        os.path.join(get_test_temp_path(), "sub-NIRSRAPIDTIDETEST"),
        "--globalmeaninclude",
        os.path.join(get_examples_path(), "sub-NIRSRAPIDTIDETEST_mask.txt"),
        "--nirs",
        "--datatstep",
        "0.2560",
        "--globalmaskmethod",
        "variance",
        "--despecklepasses",
        "0",
        "--numnull",
        "1000",
        "--respdelete",
        "--echocancel",
    ]
    rapidtide_workflow.rapidtide_main(
        rapidtide_parser.process_args(inputargs=inputargs))
Ejemplo n.º 5
0
def test_fullrunrapidtide_v2(debug=False, display=False):
    # run rapidtide
    inputargs = [
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST.nii.gz"),
        os.path.join(get_test_temp_path(), "sub-RAPIDTIDETEST"),
        "--tmask",
        os.path.join(get_examples_path(), "tmask3.txt"),
        "--corrmask",
        os.path.join(get_examples_path(),
                     "sub-RAPIDTIDETEST_restrictedmask.nii.gz"),
        "--globalmeaninclude",
        os.path.join(get_examples_path(),
                     "sub-RAPIDTIDETEST_brainmask.nii.gz"),
        "--globalmeanexclude",
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST_nullmask.nii.gz"),
        "--refineinclude",
        os.path.join(get_examples_path(),
                     "sub-RAPIDTIDETEST_brainmask.nii.gz"),
        "--refineexclude",
        os.path.join(get_examples_path(), "sub-RAPIDTIDETEST_nullmask.nii.gz"),
        "--spatialfilt",
        "-1",
        "--savelags",
        "--checkpoint",
        "--saveintermediatemaps",
        "--nolimitoutput",
        "--calccoherence",
        "--nprocs",
        "1",
        "--passes",
        "2",
        "--numnull",
        "0",
        "--similaritymetric",
        "hybrid",
        "--globalsignalmethod",
        "meanscale",
    ]
    rapidtide_workflow.rapidtide_main(
        rapidtide_parser.process_args(inputargs=inputargs))
Ejemplo n.º 6
0
def main():

    epsilon = 0.00001

    # construct the first test vector
    testvec = []
    testvec.append("filterband")
    testvec.append("filtertype")
    testvec.append("searchrange")
    testvec.append("pickleft")
    testvec.append("corrweighting")
    testvec.append("datafreq")
    testvec.append("noantialias")
    testvec.append("invert")
    testvec.append("interptype")
    testvec.append("offsettime")
    testvec.append("datafreq")

    print(testlist)
    print(testvec)

    # make the argument and results lists
    arglist = [
        "../data/examples/src/sub-RAPIDTIDETEST.nii.gz",
        "../data/examples/dst/parsertestdummy",
    ]
    resultlist = []
    for thetest in testvec:
        arglist += testlist[thetest]["command"]
        for theresult in testlist[thetest]["results"]:
            resultlist += [theresult]

    print(arglist)
    print(resultlist)

    theargs, ncprefilter = process_args(inputargs=arglist)

    checktests(testvec, testlist, theargs, epsilon)

    # construct the second test vector
    testvec = []
    testvec.append("filterfreqs")
    testvec.append("datatstep")
    testvec.append("timerange")
    testvec.append("numnull")
    testvec.append("fixdelay")

    print(testlist)
    print(testvec)

    # make the argument and results lists
    arglist = [
        "../data/examples/src/sub-RAPIDTIDETEST.nii.gz",
        "../data/examples/dst/parsertestdummy",
    ]
    resultlist = []
    for thetest in testvec:
        arglist += testlist[thetest]["command"]
        for theresult in testlist[thetest]["results"]:
            resultlist += [theresult]

    print(arglist)
    print(resultlist)

    theargs, ncprefilter = process_args(inputargs=arglist)

    checktests(testvec, testlist, theargs, epsilon)