Skip to content

Inherited metadata overrides immediate metadata for multi-echo data with same-named single-echo #1044

Description

@tsalo

I have a unique case stemming from a modified version of ds002156. I basically took the first echo from a multi-echo run and removed the echo entity to simulate a single-echo run.

sub-23638_ses-03_task-rest_run-1_bold.json
sub-23638_ses-03_task-rest_run-1_bold.nii.gz
sub-23638_ses-03_task-rest_run-1_echo-1_bold.json
sub-23638_ses-03_task-rest_run-1_echo-1_bold.nii.gz
sub-23638_ses-03_task-rest_run-1_echo-2_bold.json
sub-23638_ses-03_task-rest_run-1_echo-2_bold.nii.gz
sub-23638_ses-03_task-rest_run-1_echo-3_bold.json
sub-23638_ses-03_task-rest_run-1_echo-3_bold.nii.gz
sub-23638_ses-03_task-rest_run-1_echo-4_bold.json
sub-23638_ses-03_task-rest_run-1_echo-4_bold.nii.gz

If I do layout.get_metadata("/path/to/dset/sub-23638/ses-03/sub-23638_ses-03_task-rest_run-1_echo-2_bold.nii.gz"), I get 0.015 for the EchoTime, even though the second echo's EchoTime is 0.0286.

I can reproduce this by modifying the synthetic test dataset.

While it's a rare case, and dataset curators should 100% use an acq entity to distinguish multi-echo and single-echo runs, AFAIK this organization doesn't violate BIDS rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions