-
Notifications
You must be signed in to change notification settings - Fork 8
[FIX] allow full basis in accelerated tractography #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ def __init__( | |
| stop_threshold: float, | ||
| sphere_vertices: np.ndarray, | ||
| sphere_edges: np.ndarray, | ||
| full_basis: bool = False, | ||
| max_angle: float = radians(60), | ||
| step_size: float = 0.5, | ||
|
Comment on lines
41
to
45
|
||
| min_pts=0, | ||
|
|
@@ -70,6 +71,9 @@ def __init__( | |
| Vertices of the sphere used for direction sampling. | ||
| sphere_edges : np.ndarray | ||
| Edges of the sphere used for direction sampling. | ||
| full_basis : bool, optional | ||
| Whether to use full basis for spherical harmonics | ||
| default: False | ||
| max_angle : float, optional | ||
| Maximum angle (in radians) between steps | ||
| default: radians(60) | ||
|
|
@@ -143,6 +147,7 @@ def __init__( | |
| self.rng_seed = int(rng_seed) | ||
| self.rng_offset = int(rng_offset) | ||
| self.chunk_size = int(chunk_size) | ||
| self.full_basis = bool(full_basis) | ||
|
|
||
| avail = checkCudaErrors(runtime.cudaGetDeviceCount()) | ||
| if self.ngpus > avail: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
full_basisin the middle of theGPUTracker.__init__positional parameters is a backward-incompatible API change: any downstream code callingGPUTracker(..., sphere_edges, max_angle, step_size, ...)positionally will silently shift arguments (e.g.,max_anglebecomesfull_basis=True), leading to incorrect tracking without an obvious error. To preserve compatibility, movefull_basisto the end of the parameter list or make it keyword-only (e.g., introduce a*beforefull_basis).