Skip to content

[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

Merged
merged 14 commits into from
Sep 13, 2016
Merged

Conversation

oesteban
Copy link
Contributor

@oesteban oesteban commented Sep 8, 2016

Computes DVARS, standardized DVARS and voxel-wise standardized DVARS.

Additionally, correspondingly plots are generated:
sub-01_task-mixedgamblestask_run-01_bold_dvars_std

@coveralls
Copy link

coveralls commented Sep 8, 2016

Coverage Status

Coverage decreased (-0.1%) to 72.128% when pulling 38229a0 on oesteban:enh/NewDVARSInterface into 0f9a620 on nipy:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 72.128% when pulling 38229a0 on oesteban:enh/NewDVARSInterface into 0f9a620 on nipy:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 72.128% when pulling 38229a0 on oesteban:enh/NewDVARSInterface into 0f9a620 on nipy:master.

@oesteban oesteban mentioned this pull request Sep 8, 2016
@coveralls
Copy link

coveralls commented Sep 8, 2016

Coverage Status

Coverage decreased (-0.1%) to 72.134% when pulling 3250176 on oesteban:enh/NewDVARSInterface into 0f9a620 on nipy:master.

@chrisgorgo
Copy link
Member

Could you add a test on top of the autogenerated one?

@oesteban
Copy link
Contributor Author

oesteban commented Sep 9, 2016

I'll see how, np.

@chrisfilo - One edit:
Maybe a cross-comparison vs. https://www2.warwick.ac.uk/fac/sci/statistics/staff/academic-research/nichols/scripts/fsl/DVARS.sh ?

Another edit:
http://czarrar.github.io/checking-on-dvars/

@satra
Copy link
Member

satra commented Sep 10, 2016

merge with master

@chrisgorgo
Copy link
Member

Comparison with @nicholst script sounds like a good idea.

@oesteban
Copy link
Contributor Author

oesteban commented Sep 11, 2016

@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.

@chrisgorgo
Copy link
Member

I think you meant @nicholst not @nicholsn ;)

@oesteban
Copy link
Contributor Author

oesteban commented Sep 11, 2016

My apologies to the mistakenly mentioned user.

I had to add nitime to the requirements.txt. I guess that, as we move towards setuptools (#1605), we will need to add these semi-optional dependencies to the extras_require option of setup().

@satra
Copy link
Member

satra commented Sep 11, 2016

@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
@oesteban
Copy link
Contributor Author

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 dependencies_.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 72.468% when pulling 585c0fc on oesteban:enh/NewDVARSInterface into bd3a7ef on nipy:master.

# Robust standard deviation
func_sd = (np.percentile(func, 75, axis=3) -
np.percentile(func, 25, axis=3)) / 1.349
func_sd[mask <= 0] = 0
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

@codecov-io
Copy link

Current coverage is 70.66% (diff: 68.21%)

Merging #1606 into master will increase coverage by 0.03%

@@             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   

Powered by Codecov. Last update 5c9a751...985d4e3

@oesteban
Copy link
Contributor Author

I think this is ready to go

@chrisgorgo chrisgorgo merged commit aae371d into nipy:master Sep 13, 2016
@oesteban oesteban deleted the enh/NewDVARSInterface branch September 13, 2016 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants