-
Notifications
You must be signed in to change notification settings - Fork 3
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
update API #6
update API #6
Conversation
- use 'image_to_parametric_files' instead of 'image_to_parametric' - add the use of a mask file, can automate the mask file selection according to the current image file organisation - change 'user_inputs', split linear_phase_start/end for logan_ref, logan_ref_k2p, mrtm, mrtm_k2p - use 'models' (list of 'model's) instead of 'model'
# w=None, r1=1, k2p=0.000250, beta_lim=None, n_beta=40, linear_phase_start=500, | ||
# linear_phase_end=None, km_outputs=None, thr=0.1, fig=False): | ||
|
||
def kinetic_models(src, dst=None, params=None, models=['srtmb_basis','logan_ref'], input_interp_method='linear', |
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.
not sure about this @JJiao...
- why try to do multiple models in one function? Why not just call the function multiple times (once per model)?
linear_phase_(start|end)_(l|l2|m|m2)
seems very clunky (again, old API seems much cleaner)
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.
maybe better to do this? That way we have both versions...
def kinetic_modelS(modelS=[...], **kwargs):
resultS = []
for model in modelS:
resultS.append(kinetic_model(**kwargs))
return resultS
kinetic_modelS
vs kinetic_model
:
- pro: easier to select multiple models
- con: lots of
kwargs
are unrelated to the selectedmodels
, so very confusing, hard to explain, error-prone (e.g.model=['srtmb_basis'], linear_phase_start_l=...
doesn't make sense)
Overall I think the con is much bigger than the pro.
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.
Sure! Let's use 'kinetic_modelS'
Hi Casper, I'm away this week, do you want to have a quick chat next week
about this?
…On Tue, 31 May 2022, 12:02 Casper da Costa-Luis, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In niftypad/api/__init__.py
<#6 (comment)>:
> @@ -7,15 +7,23 @@
log = logging.getLogger(__name__)
-def kinetic_model(src, dst=None, params=None, model='srtmb_basis', input_interp_method='linear',
- w=None, r1=1, k2p=0.000250, beta_lim=None, n_beta=40, linear_phase_start=500,
- linear_phase_end=None, km_outputs=None, thr=0.1, fig=False):
+# def kinetic_model(src, dst=None, params=None, model='srtmb_basis', input_interp_method='linear',
+# w=None, r1=1, k2p=0.000250, beta_lim=None, n_beta=40, linear_phase_start=500,
+# linear_phase_end=None, km_outputs=None, thr=0.1, fig=False):
+
+def kinetic_models(src, dst=None, params=None, models=['srtmb_basis','logan_ref'], input_interp_method='linear',
not sure about this @JJiao <https://github.com/JJiao>...
- why try to do multiple models in one function? Why not just call the
function multiple times (once per model)?
- linear_phase_(start|end)_(l|l2|m|m2) seems very clunky (again, old
API seems much cleaner)
—
Reply to this email directly, view it on GitHub
<#6 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4XHECFJ27S63ENXDA7BCDVMXWUXANCNFSM5XNBERCQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I don't have push access to https://github.com/JJiao/NiftyPAD/tree/patch-3, so merged manually in e3f6221 instead |
closes JJiao#2