Skip to content

Commit

Permalink
Renames fit->kundu_fit
Browse files Browse the repository at this point in the history
  • Loading branch information
jbteves committed Jun 3, 2019
1 parent a594872 commit 4d13bc6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tedana/metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:

from .fit import (
from .kundu_fit import (
dependence_metrics, kundu_metrics, get_coeffs, computefeats2
)

Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions tedana/tests/test_model_fit_dependence_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import pytest

from tedana.metrics import fit
from tedana.metrics import kundu_fit


def test_break_dependence_metrics():
Expand All @@ -27,7 +27,7 @@ def test_break_dependence_metrics():
# Shape of catd is wrong
catd = np.empty((n_samples+1, n_echos, n_vols))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('First dimensions (number of samples) of '
Expand All @@ -40,7 +40,7 @@ def test_break_dependence_metrics():
catd = np.empty((n_samples, n_echos, n_vols))
t2s = np.empty((n_samples+1, n_vols))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('First dimensions (number of samples) of '
Expand All @@ -53,7 +53,7 @@ def test_break_dependence_metrics():
t2s = np.empty((n_samples, n_vols))
tsoc = np.empty((n_samples+1, n_vols))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('First dimensions (number of samples) of '
Expand All @@ -66,7 +66,7 @@ def test_break_dependence_metrics():
catd = np.empty((n_samples, n_echos+1, n_vols))
tsoc = np.empty((n_samples, n_vols))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('Second dimension of catd ({0}) does not '
Expand All @@ -77,7 +77,7 @@ def test_break_dependence_metrics():
# Shape of catd is wrong
catd = np.empty((n_samples, n_echos, n_vols+1))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('Number of volumes in catd '
Expand All @@ -90,7 +90,7 @@ def test_break_dependence_metrics():
catd = np.empty((n_samples, n_echos, n_vols))
t2s = np.empty((n_samples, n_vols+1))
with pytest.raises(ValueError) as e_info:
fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
kundu_fit.dependence_metrics(catd=catd, tsoc=tsoc, mmix=mmix, mask=mask,
t2s=t2s, tes=tes, ref_img=ref_img,
reindex=False, mmixN=None, algorithm='kundu_v3')
assert str(e_info.value) == ('Number of volumes in catd ({0}) '
Expand Down
4 changes: 2 additions & 2 deletions tedana/tests/test_model_kundu_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np
import pandas as pd

from tedana.metrics import fit
from tedana.metrics import kundu_fit


def test_smoke_kundu_metrics():
Expand Down Expand Up @@ -34,5 +34,5 @@ def test_smoke_kundu_metrics():
metric_maps['Br_R2_clmaps'] = np.random.randint(low=0, high=2,
size=(n_voxels, n_comps))

comptable = fit.kundu_metrics(comptable, metric_maps)
comptable = kundu_fit.kundu_metrics(comptable, metric_maps)
assert comptable is not None

0 comments on commit 4d13bc6

Please sign in to comment.