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

populate_intended_for prefers task entity with CustomAcquisitionLabel method #767

Closed
1 of 2 tasks
octomike opened this issue Jun 10, 2024 · 4 comments
Closed
1 of 2 tasks

Comments

@octomike
Copy link
Contributor

Summary

Apparently heudiconv prefers to use the task entity when trying to match fmaps to funcs.

elif matching_parameter == "CustomAcquisitionLabel":
        modality = op.basename(op.dirname(json_file))
        if modality == "func":
            # extract the <task> entity:
            custom_label = BIDSFile.parse(op.basename(json_file))["task"]
        else:
            # extract the <acq> entity:
            custom_label = BIDSFile.parse(op.basename(json_file))["acq"]

While this is initially unintuitive (the option is called CustomAcquisitionLabel after all) I found it's also problematic when there is more than one task. How would I match a single fmap to multiple functionals here?

Wouldn't it be better to try a shared acq label first and then only fall back to the task entity?

Platform details:

Choose one:

  • Local environment (Debian, Python 3.11)
  • Container
  • Heudiconv version: 1.1.6
@yarikoptic
Copy link
Member

apparently this was added in 784e946 all the way in

I think we could add AcquisitionLabel or PlainAcquisitionLabel which would be making decision solely based on the _acq-<label>. Care to submit a PR adding it (just git grep CustomAcq to see all spots to change)?

octomike added a commit to MPIB/heudiconv that referenced this issue Jun 11, 2024
Addresses nipy#767

Do not use mixed acq/task entity for matching method as implemented for CustomAcquisitionLabel
@octomike
Copy link
Contributor Author

Happy to.

I didn't duplicate create_dummy_no_shim_settings_custom_label_bids_session, because I thought it's a little over the top. Do you want me to though?

@octomike
Copy link
Contributor Author

Is there anything I should add here? Throw it all away and start over? :)

@yarikoptic
Copy link
Member

Addresses by #768

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

2 participants