Skip to content

Commit

Permalink
Reorder component table labels correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Teves committed May 24, 2021
1 parent dd4db75 commit c1f80cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tedana/metrics/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def generate_metrics(
)
for comp in comptable.index.values
]

# Metric maps
# Maps will be stored as arrays in an easily-indexable dictionary
metric_maps = {}
Expand Down Expand Up @@ -441,6 +442,13 @@ def generate_metrics(
disordered = set(cmp_cols) & (set(cmp_cols) ^ set(previous_order))
for metric in disordered:
reordered[metric] = comptable[metric]
# Add in component labels with new ordering
reordered["Component"] = [
io.add_decomp_prefix(
comp, prefix=label, max_value=reordered.shape[0]
)
for comp in reordered.index.values
]

return reordered, mixing

Expand Down

0 comments on commit c1f80cc

Please sign in to comment.