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

events files get re-created for existing bold files (batch/incremental mode) #775

Open
1 task
bpinsard opened this issue Jul 15, 2024 · 0 comments
Open
1 task

Comments

@bpinsard
Copy link
Contributor

Summary

This section of code should be extracted from populate_aggregated_jsons and populate_aggregated_jsons and triggered when converting bold files only (or asl too maybe).

heudiconv/heudiconv/bids.py

Lines 275 to 284 in 86d2210

events_file = remove_suffix(fpath, suf) + "_events.tsv"
# do not touch any existing thing, it may be precious
if not op.lexists(events_file):
lgr.debug("Generating %s", events_file)
with open(events_file, "w") as fp:
fp.write(
"onset\tduration\ttrial_type\tresponse_time\tstim_file"
"\tTODO -- fill in rows and add more tab-separated "
"columns if desired"
)

problems:

  • it recreates template event files for all existing bold, not just the one that were created by the current heudiconv call.
  • it is skipped with notop option while it is not "top-level" files .
  • ideally it should be able to check for a matching existing top-level events files before creating it.

Platform details:

Choose one:

  • [ x] Local environment

python3.8

  • Container
  • Heudiconv version:

latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant