Skip to content

Commit

Permalink
Merge pull request #913 from 36000/afq_metadata_location
Browse files Browse the repository at this point in the history
[FIX] put afq_metadata.toml in the correct spot
  • Loading branch information
36000 authored Oct 21, 2022
2 parents 101db5b + ff52019 commit 9163f34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions AFQ/utils/bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,12 @@ def parse_config_run_afq(toml_file, default_arg_dict, to_call="export_all",
default_arg_dict['pyAFQ']['version'] = __version__
default_arg_dict['pyAFQ']['platform'] = platform.system()

afq_path = op.join(bids_path, 'derivatives', 'afq')
os.makedirs(afq_path, exist_ok=True)
myafq = GroupAFQ(bids_path, **kwargs)

afq_metadata_file = op.join(afq_path, 'afq_metadata.toml')
afq_metadata_file = op.join(myafq.afq_path, 'afq_metadata.toml')
with open(afq_metadata_file, 'w') as ff:
ff.write(dict_to_toml(default_arg_dict))

myafq = GroupAFQ(bids_path, **kwargs)

# call user specified function:
if to_call == "all":
myafq.export_all()
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_afq_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@
bundle_counts = pd.read_csv(myafq.export("sl_counts")["01"], index_col=[0])
for ind in bundle_counts.index:
# few streamlines are found for these bundles in this subject
if ind == "FP" or ind == "FA":
threshold = 10 # smaller than default 20 mm ?
if ind == "FP" or ind == "FA" or "VOF" in ind:
threshold = 20
else:
threshold = 40
if bundle_counts["n_streamlines_clean"][ind] < threshold:
Expand Down

0 comments on commit 9163f34

Please sign in to comment.