Skip to content

RF: Separate mcparam -> affine translation from norm calculation in ArtifactDetect #2198

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 4 commits into from
Oct 3, 2017

Conversation

effigies
Copy link
Member

algorithms.rapidart._calc_norm uses an affine-based algorithm to calculate norms and displacements, translating from a list of motion parameters at each time point. This PR separates the two processes, creating a _calc_norm_affine function that performs the core functionality, which _calc_norm passes a list of affine matrices translated from the motion parameters.

Changes proposed in this pull request

  • New function: _calc_norm_affine
  • Update: _calc_norm translates motion parameters, calls _calc_norm_affine
  • Removed _nanmean, since the minimum numpy (1.9) includes np.nanmean

@satra
Copy link
Member

satra commented Sep 25, 2017

LGTM. is numpy 1.9 now our minimum?

@effigies
Copy link
Member Author

Since #2182.

@codecov-io
Copy link

Codecov Report

Merging #2198 into master will increase coverage by <.01%.
The diff coverage is 61.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2198      +/-   ##
==========================================
+ Coverage   72.27%   72.27%   +<.01%     
==========================================
  Files        1174     1174              
  Lines       58738    58736       -2     
  Branches     8454     8454              
==========================================
- Hits        42453    42452       -1     
+ Misses      14924    14923       -1     
  Partials     1361     1361
Flag Coverage Δ
#smoketests 72.27% <61.53%> (ø) ⬆️
#unittests 69.94% <53.84%> (ø) ⬆️
Impacted Files Coverage Δ
nipype/algorithms/rapidart.py 64.6% <61.53%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b857fa...c74fec0. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Sep 25, 2017

Codecov Report

Merging #2198 into master will increase coverage by <.01%.
The diff coverage is 61.53%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2198      +/-   ##
==========================================
+ Coverage   72.27%   72.27%   +<.01%     
==========================================
  Files        1174     1174              
  Lines       58738    58736       -2     
  Branches     8454     8454              
==========================================
- Hits        42453    42452       -1     
+ Misses      14924    14923       -1     
  Partials     1361     1361
Flag Coverage Δ
#smoketests 72.27% <61.53%> (ø) ⬆️
#unittests 69.94% <53.84%> (ø) ⬆️
Impacted Files Coverage Δ
nipype/algorithms/rapidart.py 64.6% <61.53%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b857fa...c74fec0. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants