Skip to content

Commit

Permalink
have option to remove model for scalar in group csv comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
36000 committed Oct 27, 2020
1 parent 93c9fe7 commit 1b49300
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions AFQ/viz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ def __init__(self, out_folder, csv_fnames, names, is_mats=False,
bundles=None,
percent_nan_tol=10,
percent_edges_removed=10,
remove_model=False,
mat_bundle_converter=BUNDLE_MAT_2_PYTHON,
mat_column_converter=CSV_MAT_2_PYTHON,
mat_scale_converter=SCALE_MAT_2_PYTHON):
Expand Down Expand Up @@ -707,6 +708,10 @@ def __init__(self, out_folder, csv_fnames, names, is_mats=False,
5 nodes from each edge.
Default: 10
remove_model : bool, optional
Whether to remove prefix of scalars which specify model
i.e., dti_fa => FA.
Default: False
mat_bundle_converter : dictionary, optional
Dictionary that maps matlab bundle names to python bundle names.
Expand Down Expand Up @@ -749,6 +754,9 @@ def __init__(self, out_folder, csv_fnames, names, is_mats=False,
for scalar, scale in mat_scale_converter.items():
profile[scalar] = \
profile[scalar].apply(lambda x: x * scale)
if remove_model:
profile.rename(
columns=SCALAR_REMOVE_MODEL, inplace=True)

for bound, constraint in scalar_bounds.items():
for scalar, threshold in constraint.items():
Expand Down

0 comments on commit 1b49300

Please sign in to comment.