diff --git a/fsl/scripts/extract_noise.py b/fsl/scripts/fsl_ents.py similarity index 97% rename from fsl/scripts/extract_noise.py rename to fsl/scripts/fsl_ents.py index 087aceb813d8d8459786d03dca15f254b4758844..bb4f5025e33b013df891599a99d6b6719a6b23d3 100644 --- a/fsl/scripts/extract_noise.py +++ b/fsl/scripts/fsl_ents.py @@ -5,7 +5,7 @@ # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # -"""This module defines the ``extract_noise`` script, for extracting component +"""This module defines the ``fsl_ents`` script, for extracting component time series from a MELODIC ``.ica`` directory. """ @@ -28,7 +28,7 @@ with warnings.catch_warnings(): DTYPE = np.float64 -name = "extract_noise" +name = "fsl_ents" desc = 'Extract component time series from a MELODIC .ica directory' usage = """ {name}: {desc} @@ -204,7 +204,7 @@ def loadConfoundFiles(conffiles, npts): def main(argv=None): - """Entry point for the ``extract_noise`` script. + """Entry point for the ``fsl_ents`` script. Identifies component time series to extract, extracts them, loads extra confound files, and saves them out to a file. diff --git a/setup.py b/setup.py index 69419aeb089449d7ac516f2d361032cf4e2b0321..d1212cc37dd875176bbbb267cdb5135787c0f00d 100644 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ setup( 'imglob = fsl.scripts.imglob:main', 'atlasq = fsl.scripts.atlasq:main', 'atlasquery = fsl.scripts.atlasq:atlasquery_emulation', - 'extract_noise = fsl.scripts.extract_noise:main', + 'fsl_ents = fsl.scripts.fsl_ents:main', ] } ) diff --git a/tests/test_extract_noise.py b/tests/test_fsl_ents.py similarity index 95% rename from tests/test_extract_noise.py rename to tests/test_fsl_ents.py index 6c1e4b8ed7b588b6e68351c3504710293deffbdc..abbdad3ede6071ce44abda88f7966d341892ff47 100644 --- a/tests/test_extract_noise.py +++ b/tests/test_fsl_ents.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# test_extract_noise.py - +# test_fsl_ents.py - # # Author: Paul McCarthy <pauldmccarthy@gmail.com> # @@ -12,7 +12,7 @@ import numpy as np import pytest import fsl.utils.tempdir as tempdir -import fsl.scripts.extract_noise as extn +import fsl.scripts.fsl_ents as extn def test_genComponentIndexList(): @@ -87,7 +87,7 @@ def test_loadConfoundFiles(): extn.loadConfoundFiles(conffiles, npts) -def test_extract_noise(): +def test_fsl_ents(): with tempdir.tempdir() as td: @@ -95,7 +95,7 @@ def test_extract_noise(): melmix = np.random.randint(1, 100, (100, 20)) np.savetxt('melodic_mix', melmix) - sys.argv = ['extract_noise', td] + '-o out.txt 1 2 3'.split() + sys.argv = ['fsl_ents', td] + '-o out.txt 1 2 3'.split() extn.main() assert np.all(np.loadtxt('out.txt') == melmix[:, :3]) @@ -115,13 +115,13 @@ def test_extract_noise(): assert np.all(np.loadtxt('out.txt') == exp) -def test_extract_noise_usage(): +def test_fsl_ents_usage(): with pytest.raises(SystemExit) as e: extn.main([]) assert e.value.code == 0 -def test_extract_noise_badargs(): +def test_fsl_ents_badargs(): with pytest.raises(SystemExit) as e: extn.main(['non-existent.ica', '1', '2', '3'])