-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH] New ComputeDVARS interface #1606
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
Conversation
2 similar comments
Could you add a test on top of the autogenerated one? |
I'll see how, np. @chrisfilo - One edit: Another edit: |
merge with master |
Comparison with @nicholst script sounds like a good idea. |
@chrisfilo: the regression test it a bit permissive (MSE < 0.05) because the robust estimation of the SD in the @nicholst's script and this implementation differ. For some reason the results from fslmaths and numpy are not exactly the same. Surprisingly the lag-1 coefficients are the same (using nitime and fsl), so I think we can go ahead with this implementation. |
My apologies to the mistakenly mentioned user. I had to add nitime to the |
@oesteban - yule-walker should be easy to implement within the code, instead of another dependency. there is a set of nitime interaces in nipype, but we don't add nitime to requirements.txt. |
- Skip DVARS test if nitime is not present - Add nitime and matplotlib to travis
You got it. For now I will skip the test if nitime is not found. We could incorporate automated testing of dependencies into the Interfaces, using a class member like |
# Robust standard deviation | ||
func_sd = (np.percentile(func, 75, axis=3) - | ||
np.percentile(func, 25, axis=3)) / 1.349 | ||
func_sd[mask <= 0] = 0 |
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.
Robust standard deviation sounds useful--we should consider moving it to another module so everyone can use it.
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.
Well, I'd say that this is a quick and dirty way of calculating the SD. I am +1 if we had a really robust SD computation algorithm though.
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.
got it
Current coverage is 70.66% (diff: 68.21%)@@ master #1606 diff @@
==========================================
Files 1016 1017 +1
Lines 50928 51076 +148
Methods 0 0
Messages 0 0
Branches 7238 7255 +17
==========================================
+ Hits 35971 36094 +123
- Misses 13894 13904 +10
- Partials 1063 1078 +15
|
I think this is ready to go |
Computes DVARS, standardized DVARS and voxel-wise standardized DVARS.
Additionally, correspondingly plots are generated:
