Skip to content

[ENH] Return to float16 for streamline data#196

Merged
36000 merged 2 commits into
tractometry:mainfrom
36000:back_to_float16
Jun 4, 2026
Merged

[ENH] Return to float16 for streamline data#196
36000 merged 2 commits into
tractometry:mainfrom
36000:back_to_float16

Conversation

@36000
Copy link
Copy Markdown
Collaborator

@36000 36000 commented Jun 4, 2026

Not linearizing because it only decreased disk size by around 30% for 0.1mm tolerance

Copilot AI review requested due to automatic review settings June 4, 2026 03:15
@36000 36000 changed the title [ENHreturn to float16 [ENH] Return to float16 for streamline data Jun 4, 2026
@36000 36000 added this to the pyAFQ 3.3 milestone Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 aims to reduce streamline storage size by returning to float16 for streamline positions (especially for TRX outputs) and adds safeguards/normalization to keep downstream DIPY operations working with float32.

Changes:

  • Updates cuslines compression settings in probabilistic/PTT tracking to emit float16 positions.
  • Adjusts TRX dtype handling in tractography/segmentation tasks (positions/offsets).
  • Forces resampling inputs to float32 via Streamlines normalization before calling DIPY resampling utilities.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
setup.cfg Updates gpu extra cuslines pin (currently creates a resolver conflict with core pin).
AFQ/tractography/tractography.py Sets cuslines tracker compression parameters to use float16 positions.
AFQ/tasks/tractography.py Changes TRX dtype_dict (offsets dtype) for TRX writing from lazy tractograms.
AFQ/tasks/segmentation.py Switches TRX streamline positions to float16 and adjusts per-bundle export behavior.
AFQ/recognition/utils.py Normalizes streamlines to float32 before resampling via DIPY.

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

Comment thread AFQ/tasks/segmentation.py
Comment thread AFQ/recognition/utils.py
Comment thread AFQ/tasks/tractography.py
Comment thread setup.cfg
Comment thread AFQ/recognition/utils.py
@36000 36000 merged commit fd52ba6 into tractometry:main Jun 4, 2026
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