Skip to content

population_template: Fix linear registration with -info / -debug#3322

Open
Lestropie wants to merge 1 commit into
masterfrom
poptemplate_linear_logfile_fix
Open

population_template: Fix linear registration with -info / -debug#3322
Lestropie wants to merge 1 commit into
masterfrom
poptemplate_linear_logfile_fix

Conversation

@Lestropie
Copy link
Copy Markdown
Member

When run with -info or -debug, population_template instructs mrregister to generate additional log files in the scratch directory. However the derivation of the filesystem path for that file attempts to include a string from "the currently processed contrast". This is erroneous as mrregister is run once taking as input all contrasts. The relevant code is not inside of a for loop over contrasts. So index cid is invalid and the code emits IndexException: string index out of range.

Discovered on dev.
With refactoring, the filesystem path is first determined, and then the choice of whether to insert it into the mrregister call is made subsequently.
Since it's the construction of the filesystem path that yields the Exception, the issue was encountered even when population_template was run at default verbosity.
The bug is however present on master so should be rectified there.

@Lestropie Lestropie requested a review from a team April 24, 2026 04:50
@Lestropie Lestropie self-assigned this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant