Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: Draft pre-tedana echo-wise denoising workflow #1097

Closed
wants to merge 14 commits into from
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ all = ["tedana[dev,doc,tests]"]
ica_reclassify = "tedana.workflows.ica_reclassify:_main"
t2smap = "tedana.workflows.t2smap:_main"
tedana = "tedana.workflows.tedana:_main"
denoise_echoes = "tedana.workflows.denoise_echoes:_main"

#
# Hatch configurations
Expand Down
14 changes: 10 additions & 4 deletions tedana/metrics/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def generate_metrics(
"match."
)

if isinstance(label, list):
assert len(label) == mixing.shape[1]

# Derive mask from thresholded adaptive mask
mask = adaptive_mask >= 3

Expand Down Expand Up @@ -109,10 +112,13 @@ def generate_metrics(
# throughout this function
n_components = mixing.shape[1]
comptable = pd.DataFrame(index=np.arange(n_components, dtype=int))
comptable["Component"] = [
io.add_decomp_prefix(comp, prefix=label, max_value=comptable.shape[0])
for comp in comptable.index.values
]
if isinstance(label, str):
comptable["Component"] = [
io.add_decomp_prefix(comp, prefix=label, max_value=comptable.shape[0])
for comp in comptable.index.values
]
else:
comptable["Component"] = label

# Metric maps
# Maps will be stored as arrays in an easily-indexable dictionary
Expand Down
6 changes: 3 additions & 3 deletions tedana/resources/config/outputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@
},
"high kappa ts split img": {
"orig": "hik_ts_e{echo}",
"bidsv1.5.0": "echo-{echo}_desc-Accepted_bold"
"bidsv1.5.0": "echo-{echo}_desc-accepted_bold"
},
"low kappa ts split img": {
"orig": "lowk_ts_e{echo}",
"bidsv1.5.0": "echo-{echo}_desc-Rejected_bold"
"bidsv1.5.0": "echo-{echo}_desc-rejected_bold"
},
"denoised ts split img": {
"orig": "dn_ts_e{echo}",
"bidsv1.5.0": "echo-{echo}_desc-Denoised_bold"
"bidsv1.5.0": "echo-{echo}_desc-denoised_bold"
},
"gs img": {
"orig": "T1gs",
Expand Down
8 changes: 7 additions & 1 deletion tedana/workflows/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
"""Command line interfaces and workflows."""
from tedana.workflows.denoise_echoes import denoise_echoes_workflow
from tedana.workflows.ica_reclassify import ica_reclassify_workflow
from tedana.workflows.t2smap import t2smap_workflow
from tedana.workflows.tedana import tedana_workflow

__all__ = ["tedana_workflow", "t2smap_workflow", "ica_reclassify_workflow"]
__all__ = [
"tedana_workflow",
"t2smap_workflow",
"ica_reclassify_workflow",
"denoise_echoes_workflow",
]
Loading