Skip to content

Match multiple T1s with matching run entity#1309

Open
levje wants to merge 1 commit intoscilus:masterfrom
levje:fix-bids
Open

Match multiple T1s with matching run entity#1309
levje wants to merge 1 commit intoscilus:masterfrom
levje:fix-bids

Conversation

@levje
Copy link
Contributor

@levje levje commented Feb 15, 2026

Quick description

I'm encountering issues when parsing the BIDS layout when there's the following scenario:

  • I have a DWI for ses-1 and run-1
  • I have two T1s for ses-1: a T1 for run-1 and another one for run-2.

I'd like to possibly match the DWI with its matching T1 (ses-1 and run-1).

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Provide data, screenshots, command line to test (if relevant)

...

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.71%. Comparing base (fc390bf) to head (04f6c24).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1309      +/-   ##
==========================================
- Coverage   72.72%   72.71%   -0.02%     
==========================================
  Files         295      295              
  Lines       25445    25449       +4     
  Branches     3565     3566       +1     
==========================================
  Hits        18505    18505              
- Misses       5437     5440       +3     
- Partials     1503     1504       +1     
Flag Coverage Δ
smoketests 69.71% <0.00%> (-0.02%) ⬇️
unittests 13.82% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Scripts 75.36% <0.00%> (-0.03%) ⬇️
Library 69.54% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

t1_paths = [curr_t1.path for curr_t1 in t1_nSess]
logging.warning('More than one T1 file found.'
' [{}]'.format(','.join(t1_paths)))
t1_run_match = [t for t in t1_nSess if t.entities.get('run') == nRun]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.entities('run') always pre-defined ?

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

Successfully merging this pull request may close these issues.

2 participants