Skip to content

[FIX/ENH] VOF HBN changes#202

Merged
36000 merged 9 commits into
tractometry:mainfrom
36000:t1w_over_logb0
Jul 22, 2026
Merged

[FIX/ENH] VOF HBN changes#202
36000 merged 9 commits into
tractometry:mainfrom
36000:t1w_over_logb0

Conversation

@36000

@36000 36000 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Includes these changes:

  • max numba thread count is explicitly bounded, avoiding an error where you give numba too many threads
  • Gaussian weighting has an extra check and is switched to float64. This changes default behavior, which was to use float32. Float32 only ran into problems with large numbers of streamlines (and thus small weights). So, for normal numbers of streamlines, this should only change default behavior slightly.
  • t1w/log(bo) is added as an option, but not made default
  • Fixes a bug in our brainchop models, which I believe was in here since 3.0. Luckily brainchop has not been our default.
  • Adds an option to use all 3 NNs to make a wm mask

Copilot AI review requested due to automatic review settings July 9, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new derived scalar in AFQ.tasks.data to compute a T1w-over-log(b0) image intended as an R1 proxy, and wires it into the default data task plan so it can be produced as part of standard runs.

Changes:

  • Added a new t1w_over_log_b0 calculation task that computes T1w / log(mean b0) after resampling T1w into b0 space.
  • Registered the new task in get_data_plan so it runs alongside existing scalar generation (e.g., t1w_over_b0).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread AFQ/tasks/data.py Outdated
@36000 36000 changed the title WIP/ENH add t1w/logb0 metric [FIX/ENH] VOF HBN changes Jul 21, 2026
@36000
36000 requested a review from Copilot July 21, 2026 19:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

AFQ/tasks/tissue.py:126

  • The ValueError message is now outdated: it doesn’t mention the newly supported option 'multiaxial+brainchop+synthseg', which can confuse users when they pass an invalid value.
    raise ValueError(
        "pve must be a PVEImage, PVEImages, 'synthseg', or 'multiaxial+brainchop'"
    )

Comment thread AFQ/_fixes.py
Comment thread AFQ/_fixes.py
Comment thread AFQ/nn/utils.py
@36000

36000 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

@arokem this is ready for review / merge

Comment thread AFQ/nn/utils.py
)


def merge_PVEs(PVE_a, PVE_b):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any chance to add a test of this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I can do that

@36000
36000 merged commit 525ecef into tractometry:main Jul 22, 2026
5 of 9 checks passed
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.

3 participants