Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michiel Cottaar
gyral_structure
Commits
89d3828a
Commit
89d3828a
authored
May 03, 2020
by
Michiel Cottaar
Browse files
BUG: pass on `nsim` to other param_evaluator
parent
75ddb658
Pipeline
#5299
failed with stage
in 10 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gyral_structure/basis/core.py
View file @
89d3828a
...
...
@@ -523,7 +523,7 @@ class SumBase(UserList):
"""
self
.
_fixed
=
{}
def
param_evaluator
(
self
,
parameters
,
method
=
None
,
extent
=
0
):
def
param_evaluator
(
self
,
parameters
,
method
=
None
,
extent
=
0
,
nsim
=
2
**
12
):
"""Returns a function that evaluates the basis function for arbitrary positions given a fixed parameter array
Used to __call__ streamlines
...
...
@@ -531,16 +531,17 @@ class SumBase(UserList):
:param parameters: (nparams, ) array defining the parameters for which the field will be evaluated
:param method: Algorithm used to __call__ the basis functions
:param extent: maximum extent of request to accept (keep at zero for tractography)
:param nsim: maximum number of positions to evaluate simultaneously
:return: function that maps positions to vector field
"""
funcs
=
[]
idx_param
=
0
for
idx_elem
,
elem
in
enumerate
(
self
):
if
idx_elem
in
self
.
_fixed
:
funcs
.
append
(
elem
.
param_evaluator
(
self
.
_fixed
[
idx_elem
],
extent
=
extent
,
method
=
method
))
funcs
.
append
(
elem
.
param_evaluator
(
self
.
_fixed
[
idx_elem
],
extent
=
extent
,
method
=
method
,
nsim
=
nsim
))
else
:
funcs
.
append
(
elem
.
param_evaluator
(
parameters
[
idx_param
:
idx_param
+
elem
.
nparams
],
extent
=
extent
,
method
=
method
))
extent
=
extent
,
method
=
method
,
nsim
=
nsim
))
idx_param
+=
elem
.
nparams
def
evaluate
(
positions
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment