Skip to content

Commit b8a1949

Browse files
authored
Merge pull request #366 from effigies/test/msm-sloppy
TEST: Add sloppy MSM configuration for use in debugging/CI
2 parents 37ad1c6 + 4e6fdd3 commit b8a1949

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.circleci/ds005_run.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ docker run -it -e FMRIPREP_DEV=1 -u $(id -u) \
1717
--skull-strip-template MNI152NLin2009cAsym:res-2 \
1818
--sloppy --mem-gb 4 \
1919
--ncpus 2 --omp-nthreads 2 -vv \
20-
--no-msm \
2120
--fs-license-file /tmp/fslicense/license.txt \
2221
--fs-subjects-dir /tmp/ds005/freesurfer \
2322
${@:1}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--simval=3,2
2+
--sigma_in=0,0
3+
--sigma_ref=0,0
4+
--lambda=0,10
5+
--it=20,5
6+
--opt=AFFINE,DISCRETE
7+
--CPgrid=6,2
8+
--SGgrid=6,4
9+
--datagrid=6,4
10+
--regoption=3
11+
--regexp=2
12+
--dopt=HOCR
13+
--VN
14+
--rescaleL
15+
--triclique
16+
--k_exponent=2
17+
--bulkmod=1.6
18+
--shearmod=0.4

smriprep/workflows/anatomical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def _check_img(img):
530530
name="surface_recon_wf", omp_nthreads=omp_nthreads, hires=hires
531531
)
532532
applyrefined = pe.Node(fsl.ApplyMask(), name="applyrefined")
533-
sphere_reg_wf = init_sphere_reg_wf(msm_sulc=msm_sulc, name="sphere_reg_wf")
533+
sphere_reg_wf = init_sphere_reg_wf(msm_sulc=msm_sulc, sloppy=sloppy, name="sphere_reg_wf")
534534

535535
if t2w:
536536
t2w_template_wf = init_anat_template_wf(

smriprep/workflows/surfaces.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,12 @@ def _dedup(in_list):
494494
return workflow
495495

496496

497-
def init_sphere_reg_wf(*, msm_sulc: bool = False, name: str = "sphere_reg_wf"):
497+
def init_sphere_reg_wf(
498+
*,
499+
msm_sulc: bool = False,
500+
sloppy: bool = False,
501+
name: str = "sphere_reg_wf",
502+
):
498503
"""Generate GIFTI registration files to fsLR space"""
499504
from ..interfaces.surf import FixGiftiMetadata
500505
from ..interfaces.workbench import SurfaceSphereProjectUnproject
@@ -564,7 +569,7 @@ def init_sphere_reg_wf(*, msm_sulc: bool = False, name: str = "sphere_reg_wf"):
564569
fix_sphere_meta = pe.MapNode(
565570
FixGiftiMetadata(), iterfield='in_file', name='fix_sphere_meta',
566571
)
567-
msm_sulc_wf = init_msm_sulc_wf()
572+
msm_sulc_wf = init_msm_sulc_wf(sloppy=sloppy)
568573
# fmt:off
569574
workflow.connect([
570575
(get_surfaces, sphere_gii, [(('sphere', _sorted_by_basename), 'in_file')]),
@@ -578,7 +583,7 @@ def init_sphere_reg_wf(*, msm_sulc: bool = False, name: str = "sphere_reg_wf"):
578583
return workflow
579584

580585

581-
def init_msm_sulc_wf(*, name: str = 'msm_sulc_wf'):
586+
def init_msm_sulc_wf(*, sloppy: bool = False, name: str = 'msm_sulc_wf'):
582587
"""Run MSMSulc registration to fsLR surfaces, per hemisphere."""
583588
from ..interfaces.msm import MSM
584589
from ..interfaces.workbench import SurfaceAffineRegression, SurfaceApplyAffine
@@ -618,8 +623,9 @@ def init_msm_sulc_wf(*, name: str = 'msm_sulc_wf'):
618623
# --indata=sub-${SUB}_ses-${SES}_hemi-${HEMI)_sulc.shape.gii \
619624
# --refdata=tpl-fsaverage_hemi-${HEMI}_den-164k_sulc.shape.gii \
620625
# --out=${HEMI}. --verbose
626+
msm_conf = load_resource(f'msm/MSMSulcStrain{"Sloppy" if sloppy else "Final"}conf')
621627
msmsulc = pe.MapNode(
622-
MSM(verbose=True, config_file=load_resource('msm/MSMSulcStrainFinalconf')),
628+
MSM(verbose=True, config_file=msm_conf),
623629
iterfield=['in_mesh', 'reference_mesh', 'in_data', 'reference_data', 'out_base'],
624630
name='msmsulc',
625631
mem_gb=2,

0 commit comments

Comments
 (0)