nipype icon indicating copy to clipboard operation
nipype copied to clipboard

Enh/wip/fix/brk topup for odd dimensions. help needed

Open akeshavan opened this issue 6 years ago • 4 comments
trafficstars

Summary

Attempts to fix https://github.com/nipy/nipype/issues/948 -- its 4 years later and we are still having this problem! I slightly modified @oesteban 's original commit with a flag called checksize, which, if set to True will make the size even before running TOPUP and ApplyTOPUP. It's set to False by default.

Problem is, the ApplyTOPUP interface doesn't work!! The process just gets killed. Someone help please!

List of changes proposed in this PR (pull-request)

  • [x] fix the ApplyTOPUP interface

Acknowledgment

  • [x] (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

akeshavan avatar Dec 19 '18 02:12 akeshavan

Nevermind about the applytopup, it turns out I was testing this on a pretty large file :) thanks @oesteban for the help!

akeshavan avatar Dec 19 '18 04:12 akeshavan

Codecov Report

Merging #2832 into master will increase coverage by 0.09%. The diff coverage is 18.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2832      +/-   ##
==========================================
+ Coverage   67.45%   67.54%   +0.09%     
==========================================
  Files         341      341              
  Lines       43355    44091     +736     
  Branches     5379     5626     +247     
==========================================
+ Hits        29245    29783     +538     
- Misses      13413    13592     +179     
- Partials      697      716      +19
Flag Coverage Δ
#smoketests 50.11% <15.29%> (-0.44%) :arrow_down:
#unittests 65.03% <18.82%> (+0.18%) :arrow_up:
Impacted Files Coverage Δ
nipype/interfaces/fsl/epi.py 56.2% <18.82%> (-8.01%) :arrow_down:
nipype/workflows/fmri/spm/preprocess.py 70.4% <0%> (-2.05%) :arrow_down:
nipype/utils/filemanip.py 78.07% <0%> (-1.58%) :arrow_down:
nipype/utils/provenance.py 83.43% <0%> (-1.28%) :arrow_down:
nipype/pipeline/engine/nodes.py 84.19% <0%> (-0.34%) :arrow_down:
nipype/utils/nipype_cmd.py 44.61% <0%> (+1.99%) :arrow_up:
nipype/interfaces/base/core.py 88.88% <0%> (+2.07%) :arrow_up:
nipype/utils/profiler.py 22.04% <0%> (+2.61%) :arrow_up:
nipype/interfaces/base/support.py 82.54% <0%> (+2.89%) :arrow_up:
nipype/algorithms/confounds.py 69.84% <0%> (+3.23%) :arrow_up:
... and 2 more

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 2b124a9...b6eaed8. Read the comment docs.

codecov-io avatar Dec 19 '18 05:12 codecov-io

Codecov Report

Merging #2832 into master will decrease coverage by 0.06%. The diff coverage is 70.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2832      +/-   ##
==========================================
- Coverage    66.9%   66.84%   -0.07%     
==========================================
  Files         341      342       +1     
  Lines       43454    43648     +194     
  Branches     5392     5436      +44     
==========================================
+ Hits        29074    29175     +101     
- Misses      13653    13741      +88     
- Partials      727      732       +5
Flag Coverage Δ
#smoketests 50.39% <29.52%> (-0.08%) :arrow_down:
#unittests 63.99% <71.42%> (-0.27%) :arrow_down:
Impacted Files Coverage Δ
nipype/interfaces/ants/__init__.py 100% <ø> (ø) :arrow_up:
nipype/workflows/dmri/fsl/artifacts.py 80.39% <ø> (ø) :arrow_up:
nipype/interfaces/nipy/preprocess.py 45.79% <ø> (ø) :arrow_up:
nipype/pipeline/plugins/legacymultiproc.py 61.5% <ø> (ø) :arrow_up:
nipype/interfaces/petpvc.py 54.71% <ø> (ø) :arrow_up:
nipype/interfaces/dipy/preprocess.py 23.52% <ø> (ø) :arrow_up:
nipype/interfaces/dipy/simulate.py 23.59% <ø> (ø) :arrow_up:
nipype/interfaces/dcm2nii.py 48.13% <ø> (+0.93%) :arrow_up:
nipype/interfaces/spm/preprocess.py 56.7% <0%> (+0.21%) :arrow_up:
nipype/pipeline/engine/workflows.py 78.95% <100%> (ø) :arrow_up:
... and 70 more

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 04ba94d...87e5361. Read the comment docs.

codecov-io avatar Dec 19 '18 05:12 codecov-io

Would you consider adding a file dependency? There is a second cnf that works for volumes with odd numbers of slices.

here's b02b0_1.cnf from the fsl mailing list

# Resolution (knot-spacing) of warps in mm
--warpres=20,16,14,12,10,6,4,4,4
# Subsampling level (a value of 2 indicates that a 2x2x2 neighbourhood is collapsed to 1 voxel)
--subsamp=1,1,1,1,1,1,1,1,1
# FWHM of gaussian smoothing
--fwhm=8,6,4,3,3,2,1,0,0
# Maximum number of iterations
--miter=5,5,5,5,5,10,10,20,20
# Relative weight of regularisation
--lambda=0.0005,0.0001,0.00001,0.0000015,0.0000005,0.0000005,0.00000005,0.0000000005,0.00000000001
# If set to 1 lambda is multiplied by the current average squared difference
--ssqlambda=1
# Regularisation model
--regmod=bending_energy
# If set to 1 movements are estimated along with the field
--estmov=1,1,1,1,1,0,0,0,0
# 0=Levenberg-Marquardt, 1=Scaled Conjugate Gradient
--minmet=0,0,0,0,0,1,1,1,1
# Quadratic or cubic splines
--splineorder=3
# Precision for calculation and storage of Hessian
--numprec=double
# Linear or spline interpolation
--interp=spline
# If set to 1 the images are individually scaled to a common mean intensity 
--scale=1

mattcieslak avatar Aug 05 '19 22:08 mattcieslak