Skip to content

populate_intended_for prefers task entity with CustomAcquisitionLabel method #767

@octomike

Description

@octomike

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions