-
Notifications
You must be signed in to change notification settings - Fork 28
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
Abdominal phantom #71
Conversation
abdominal phantom up to date
I think the remaining piece is to run sim_ivim_sig.py to get the new generic.json and update that. Hopefully the tests will work! |
@@ -261,7 +273,7 @@ def XCAT_to_MR_DCE(XCAT, TR, TE, bvalue, D, f, Ds, b0=3, ivim_cont = True): | |||
73: 'Pancreas tumor', | |||
} | |||
############################################################################### | |||
np.random.seed(42) | |||
np.random.seed(41) |
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.
Seed change?
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.
This is now fixed. Changed it to test something :).
@@ -2,7 +2,7 @@ | |||
import os | |||
import subprocess | |||
import time | |||
|
|||
import zenodo_get |
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.
Is this used?
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.
It is used here:
subprocess.check_call(["zenodo_get", 'https://zenodo.org/records/10696605'])
but as supprocess, it is not recognized that it is used. If you remove it, however, this crashes :).
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.
I don't understand that, but I guess it's not a big deal.
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.
I think this starts a subprocess which then runs the commando in the string (which contains Zenodo_get). But the Zenodo_get function is not recognized by interpreters as it is hidden in a string.
The download happens outside Pycharm, and if I don't put this in a subprocess, it somehow continues the code while downloading, running into errors (using data that still needs downloading).
I think this is the remaining piece? |
Ah, I had run this, but the generic.json files are on the .gitignore list so nothing was pushed. Is there a good way of pushing these results? Thanks! |
Ah, there was a change. I think there should also be a Then hopefully it all works! |
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.
Just the generic.json overwrite remaining.
Good news: File is updated (as well as the other generic files). |
@etpeterson It seems like only your algorithm is failing, and only in a limited set of tissues. In particular, it has trouble estimating an f of 1 in vessels. But also has some challenges in the pericardium... I think it has to do with the fact that all algorithms use real tolerances, but yours uses dynamic tolerances. Hence, your tolerances are way more strict (and realistic) than for the other algorithms. I think the dyn_tolerances are related to an issue/feature request I wrote earlier today :) and should be the way to go. |
I'm not too sure why it's failing now, but I'm not too worried. You could mark those tests as expected failures. So add the regions to this area of algorithms.json. That's probably easiest, especially since it seems like more bounds changes are coming. Actually, looks like Vein was failing and it's now passing, so just swap out "Blood RV" for "Vein" and it should work.
|
Features updated:
Ah! Now I understand the XPASS fail, haha. I was wondering what that was doing :) |
@@ -169,6 +169,8 @@ def test_ivim_fit_saved(name, bvals, data, algorithm, xfail, kwargs, tolerances, | |||
tolerances = tolerances_helper(tolerances, ratio, data["noise"]) | |||
[f_fit, Dp_fit, D_fit] = fit.osipi_fit(signal, bvals) | |||
npt.assert_allclose(data['f'], f_fit, rtol=tolerances["rtol"]["f"], atol=tolerances["atol"]["f"]) | |||
npt.assert_allclose(data['D'], D_fit, rtol=tolerances["rtol"]["D"], atol=tolerances["atol"]["D"]) | |||
npt.assert_allclose(data['Dp'], Dp_fit, rtol=tolerances["rtol"]["Dp"], atol=tolerances["atol"]["Dp"]) | |||
if data['f']<0.80: # we need some signal for D to be detected |
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.
Just looking at code in more detail, would this be a relative tolerance thing rather than an if
?
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.
Yes, I am doing that in my next project. But either way it seems silly to quantity something that is undefined (D* is f=0 and D if f=1)
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.
Understood. Looks good to me.
Describe the changes you have made in this PR
The abdominal phantom has been updated; we need to check whether this influences the automated tests from Eric
Checklist