Skip to content

Commit c1f80cc

Browse files
author
Joshua Teves
committed
Reorder component table labels correctly
1 parent dd4db75 commit c1f80cc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tedana/metrics/collect.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def generate_metrics(
180180
)
181181
for comp in comptable.index.values
182182
]
183+
183184
# Metric maps
184185
# Maps will be stored as arrays in an easily-indexable dictionary
185186
metric_maps = {}
@@ -441,6 +442,13 @@ def generate_metrics(
441442
disordered = set(cmp_cols) & (set(cmp_cols) ^ set(previous_order))
442443
for metric in disordered:
443444
reordered[metric] = comptable[metric]
445+
# Add in component labels with new ordering
446+
reordered["Component"] = [
447+
io.add_decomp_prefix(
448+
comp, prefix=label, max_value=reordered.shape[0]
449+
)
450+
for comp in reordered.index.values
451+
]
444452

445453
return reordered, mixing
446454

0 commit comments

Comments
 (0)