Skip to content

Code reorganisation to use lag maps - #2

Merged
beccaclements99 merged 2 commits into
beccaclements99:fix-lmap-optionfrom
smoia:fix/lmap-option
Mar 12, 2026
Merged

Code reorganisation to use lag maps#2
beccaclements99 merged 2 commits into
beccaclements99:fix-lmap-optionfrom
smoia:fix/lmap-option

Conversation

@smoia

@smoia smoia commented Mar 12, 2026

Copy link
Copy Markdown

Necessary for smoia#154

This pull request adds informative logging throughout the phys2cvr workflow and refactors the lag map and regressor loading logic for clarity and robustness. The changes improve transparency of data loading steps, clarify the order of operations, and make lagged regression handling more explicit.

Logging improvements:

  • Added logging statements for loading functional data, mask, ROI, physiological data, and lag map to increase transparency during workflow execution. [1] [2] [3] [4] [5]

Lag map and regression handling refactor:

  • Moved lag map loading and information extraction earlier in the workflow, and improved delta lag calculation with additional checks for numerical tolerance.
  • Refactored lagged regression logic to separate handling of lag map and max lag scenarios, with clearer logging and step calculation. [1] [2]

Robustness improvements:

  • Improved error handling and warnings when loading regressors, ensuring fallback to estimation when files are missing.
  • Added checks for shape compatibility between mask/ROI/lag map and functional data to prevent downstream errors. [1] [2] [3]

Performance and clarity:

  • Updated loop variable names and logging in lagged regression to clarify progress and improve readability.

@smoia smoia changed the title Fix/lmap option Code reorganisation to use lag maps Mar 12, 2026
@beccaclements99
beccaclements99 merged commit d670ebd into beccaclements99:fix-lmap-option Mar 12, 2026
1 check passed
@smoia
smoia deleted the fix/lmap-option branch March 12, 2026 23:44
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