Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6b81d26

Browse files
author
Zach Lindsey
committed
Merge branch 'master' of https://github.com/zachlindsey/nipype
2 parents 0953e5b + edf7a4a commit 6b81d26

23 files changed

+555
-54
lines changed

‎.github/workflows/contrib.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
runs-on: ${{ matrix.os }}
3232
strategy:
3333
matrix:
34-
os: ['ubuntu-latest']
34+
os: ["ubuntu-latest"]
3535
python-version: [3.8]
36-
nipype-extras: ['dev']
37-
check: ['specs', 'style']
36+
nipype-extras: ["dev"]
37+
check: ["specs", "style"]
3838
env:
3939
DEPENDS: ""
4040
CHECK_TYPE: ${{ matrix.check }}

‎.github/workflows/tests.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- maint/*
2020
schedule:
2121
# 8am EST / 9am EDT Mondays
22-
- cron: '0 13 * * 1'
22+
- cron: "0 13 * * 1"
2323

2424
defaults:
2525
run:
@@ -57,7 +57,7 @@ jobs:
5757
needs: [build]
5858
strategy:
5959
matrix:
60-
package: ['wheel', 'sdist']
60+
package: ["wheel", "sdist"]
6161
steps:
6262
- uses: actions/download-artifact@v4
6363
with:
@@ -90,28 +90,28 @@ jobs:
9090
runs-on: ${{ matrix.os }}
9191
strategy:
9292
matrix:
93-
os: ['ubuntu-22.04']
94-
python-version: ['3.8', '3.9', '3.10', '3.11']
95-
check: ['test']
96-
pip-flags: ['']
97-
depends: ['REQUIREMENTS']
93+
os: ["ubuntu-22.04"]
94+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
95+
check: ["test"]
96+
pip-flags: [""]
97+
depends: ["REQUIREMENTS"]
9898
deb-depends: [false]
99-
nipype-extras: ['doc,tests,profiler']
99+
nipype-extras: ["doc,tests,profiler"]
100100
include:
101101
- os: ubuntu-22.04
102-
python-version: '3.8'
102+
python-version: "3.8"
103103
check: test
104-
pip-flags: ''
104+
pip-flags: ""
105105
depends: REQUIREMENTS
106106
deb-depends: true
107107
nipype-extras: doc,tests,profiler,duecredit,ssh
108-
#- os: ubuntu-20.04
109-
# python-version: 3.8
110-
# check: test
111-
#pip-flags: ''
112-
#depends: NUMPY123
113-
# deb-depends: true
114-
# nipype-extras: doc,tests,nipy,profiler,duecredit,ssh
108+
- os: ubuntu-20.04
109+
python-version: 3.8
110+
check: test
111+
pip-flags: ""
112+
depends: REQUIREMENTS
113+
deb-depends: true
114+
nipype-extras: doc,tests,nipy,profiler,duecredit,ssh
115115
env:
116116
DEPENDS: ${{ matrix.depends }}
117117
CHECK_TYPE: ${{ matrix.check }}

‎.github/workflows/tutorials.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Test tutorials
33
on:
44
push:
55
branches:
6-
- 'rel/*'
6+
- "rel/*"
77

88
concurrency:
99
group: tutorials-${{ github.ref }}

‎.zenodo.json

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -891,16 +891,6 @@
891891
"name": "Mihai, Paul Glad",
892892
"orcid": "0000-0001-5715-6442"
893893
},
894-
{
895-
"affiliation": "Department of Psychology, Stanford University",
896-
"name": "Gorgolewski, Krzysztof J.",
897-
"orcid": "0000-0003-3321-7583"
898-
},
899-
{
900-
"affiliation": "MIT, HMS",
901-
"name": "Ghosh, Satrajit",
902-
"orcid": "0000-0002-5312-6729"
903-
},
904894
{
905895
"affiliation": "University of Tübingen and MPI for Biological Cybernertics",
906896
"name": "Bannert, Michael M.",
@@ -909,13 +899,27 @@
909899
{
910900
"affiliation": "Research Centre Juelich",
911901
"name": "Wu, Jianxiao",
912-
"orcid": "0000-0002-4866-272X",
902+
"orcid": "0000-0002-4866-272X"
903+
},
904+
{
905+
"affiliation": "Department of Neurology, BG-University Hospital Bergmannsheil Bochum, Germany",
906+
"name": "Butry, Lionel"
913907
},
914908
{
915909
"affiliation": "Lund University",
916910
"name": "Anijärv, Toomas Erik",
917-
"orcid": "0000-0002-3650-4230",
911+
"orcid": "0000-0002-3650-4230"
912+
},
913+
{
914+
"affiliation": "Department of Psychology, Stanford University",
915+
"name": "Gorgolewski, Krzysztof J.",
916+
"orcid": "0000-0003-3321-7583"
918917
},
918+
{
919+
"affiliation": "MIT, HMS",
920+
"name": "Ghosh, Satrajit",
921+
"orcid": "0000-0002-5312-6729"
922+
}
919923
],
920924
"keywords": [
921925
"neuroimaging",

‎nipype/info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def get_nipype_gitversion():
5858
"Programming Language :: Python :: 3.9",
5959
"Programming Language :: Python :: 3.10",
6060
"Programming Language :: Python :: 3.11",
61+
"Programming Language :: Python :: 3.12",
6162
"Topic :: Scientific/Engineering",
6263
]
6364
PYTHON_REQUIRES = ">= 3.8"

‎nipype/interfaces/freesurfer/model.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,14 @@ class GLMFitInputSpec(FSTraitedSpec):
420420
argstr="--logan %s %s %f",
421421
desc="RefTac TimeSec tstar : perform Logan kinetic modeling",
422422
)
423+
bp_clip_neg = traits.Bool(
424+
argstr="--bp-clip-neg",
425+
desc="set negative BP voxels to zero",
426+
)
427+
bp_clip_max = traits.Float(
428+
argstr="--bp-clip-max %f",
429+
desc="set BP voxels above max to max",
430+
)
423431
force_perm = traits.Bool(
424432
argstr="--perm-force",
425433
desc="force perumtation test, even when design matrix is not orthog",

‎nipype/interfaces/freesurfer/petsurfer.py

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,25 @@ class GTMPVCOutputSpec(TraitedSpec):
458458
yhat_with_noise = File(
459459
desc="4D PET file with full FOV of signal estimate (yhat) with noise after PVC (smoothed with PSF)",
460460
)
461+
eres = File(
462+
desc="4D PET file of residual error after PVC (smoothed with PSF)",
463+
)
464+
tissue_fraction = File(
465+
desc="4D PET file of tissue fraction before PVC",
466+
)
467+
tissue_fraction_psf = File(
468+
desc="4D PET file of tissue fraction after PVC (smoothed with PSF)",
469+
)
470+
seg = File(
471+
desc="Segmentation file of regions used for PVC",
472+
)
473+
seg_ctab = File(
474+
desc="Color table file for segmentation file",
475+
)
461476

462477

463478
class GTMPVC(FSCommand):
464-
"""create an anatomical segmentation for the geometric transfer matrix (GTM).
479+
"""Perform Partial Volume Correction (PVC) to PET Data.
465480
466481
Examples
467482
--------
@@ -536,6 +551,15 @@ def _list_outputs(self):
536551
outputs["gtm_stats"] = os.path.join(pvcdir, "gtm.stats.dat")
537552
outputs["reg_pet2anat"] = os.path.join(pvcdir, "aux", "bbpet2anat.lta")
538553
outputs["reg_anat2pet"] = os.path.join(pvcdir, "aux", "anat2bbpet.lta")
554+
outputs["eres"] = os.path.join(pvcdir, "eres.nii.gz")
555+
outputs["tissue_fraction"] = os.path.join(
556+
pvcdir, "aux", "tissue.fraction.nii.gz"
557+
)
558+
outputs["tissue_fraction_psf"] = os.path.join(
559+
pvcdir, "aux", "tissue.fraction.psf.nii.gz"
560+
)
561+
outputs["seg"] = os.path.join(pvcdir, "aux", "seg.nii.gz")
562+
outputs["seg_ctab"] = os.path.join(pvcdir, "aux", "seg.ctab")
539563

540564
# Assign the conditional outputs
541565
if self.inputs.save_input:
@@ -562,7 +586,7 @@ def _list_outputs(self):
562586
return outputs
563587

564588

565-
class MRTMInputSpec(GLMFitInputSpec):
589+
class MRTM1InputSpec(GLMFitInputSpec):
566590
mrtm1 = traits.Tuple(
567591
File(exists=True),
568592
File(exists=True),
@@ -572,20 +596,20 @@ class MRTMInputSpec(GLMFitInputSpec):
572596
)
573597

574598

575-
class MRTM(GLMFit):
599+
class MRTM1(GLMFit):
576600
"""Perform MRTM1 kinetic modeling.
577601
578602
Examples
579603
--------
580-
>>> mrtm = MRTM()
604+
>>> mrtm = MRTM1()
581605
>>> mrtm.inputs.in_file = 'tac.nii'
582606
>>> mrtm.inputs.mrtm1 = ('ref_tac.dat', 'timing.dat')
583607
>>> mrtm.inputs.glm_dir = 'mrtm'
584608
>>> mrtm.cmdline
585609
'mri_glmfit --glmdir mrtm --y tac.nii --mrtm1 ref_tac.dat timing.dat'
586610
"""
587611

588-
input_spec = MRTMInputSpec
612+
input_spec = MRTM1InputSpec
589613

590614

591615
class MRTM2InputSpec(GLMFitInputSpec):
@@ -614,7 +638,7 @@ class MRTM2(GLMFit):
614638
input_spec = MRTM2InputSpec
615639

616640

617-
class LoganRefInputSpec(GLMFitInputSpec):
641+
class LoganInputSpec(GLMFitInputSpec):
618642
logan = traits.Tuple(
619643
File(exists=True),
620644
File(exists=True),
@@ -625,16 +649,16 @@ class LoganRefInputSpec(GLMFitInputSpec):
625649
)
626650

627651

628-
class LoganRef(GLMFit):
629-
"""Perform Logan reference kinetic modeling.
652+
class Logan(GLMFit):
653+
"""Perform Logan kinetic modeling.
630654
Examples
631655
--------
632-
>>> logan = LoganRef()
656+
>>> logan = Logan()
633657
>>> logan.inputs.in_file = 'tac.nii'
634658
>>> logan.inputs.logan = ('ref_tac.dat', 'timing.dat', 2600)
635659
>>> logan.inputs.glm_dir = 'logan'
636660
>>> logan.cmdline
637661
'mri_glmfit --glmdir logan --y tac.nii --logan ref_tac.dat timing.dat 2600'
638662
"""
639663

640-
input_spec = LoganRefInputSpec
664+
input_spec = LoganInputSpec

‎nipype/interfaces/freesurfer/tests/test_auto_GLMFit.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ def test_GLMFit_inputs():
1313
args=dict(
1414
argstr="%s",
1515
),
16+
bp_clip_max=dict(
17+
argstr="--bp-clip-max %f",
18+
),
19+
bp_clip_neg=dict(
20+
argstr="--bp-clip-neg",
21+
),
1622
calc_AR1=dict(
1723
argstr="--tar1",
1824
),

‎nipype/interfaces/freesurfer/tests/test_auto_GTMPVC.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def test_GTMPVC_inputs():
207207

208208
def test_GTMPVC_outputs():
209209
output_map = dict(
210+
eres=dict(
211+
extensions=None,
212+
),
210213
gtm_file=dict(
211214
extensions=None,
212215
),
@@ -256,6 +259,18 @@ def test_GTMPVC_outputs():
256259
reg_rbvpet2anat=dict(
257260
extensions=None,
258261
),
262+
seg=dict(
263+
extensions=None,
264+
),
265+
seg_ctab=dict(
266+
extensions=None,
267+
),
268+
tissue_fraction=dict(
269+
extensions=None,
270+
),
271+
tissue_fraction_psf=dict(
272+
extensions=None,
273+
),
259274
yhat=dict(
260275
extensions=None,
261276
),

‎nipype/interfaces/freesurfer/tests/test_auto_LoganRef.py renamed to ‎nipype/interfaces/freesurfer/tests/test_auto_Logan.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2-
from ..petsurfer import LoganRef
2+
from ..petsurfer import Logan
33

44

5-
def test_LoganRef_inputs():
5+
def test_Logan_inputs():
66
input_map = dict(
77
allow_ill_cond=dict(
88
argstr="--illcond",
@@ -13,6 +13,12 @@ def test_LoganRef_inputs():
1313
args=dict(
1414
argstr="%s",
1515
),
16+
bp_clip_max=dict(
17+
argstr="--bp-clip-max %f",
18+
),
19+
bp_clip_neg=dict(
20+
argstr="--bp-clip-neg",
21+
),
1622
calc_AR1=dict(
1723
argstr="--tar1",
1824
),
@@ -214,14 +220,14 @@ def test_LoganRef_inputs():
214220
xor=("weight_file", "weight_inv", "weight_sqrt"),
215221
),
216222
)
217-
inputs = LoganRef.input_spec()
223+
inputs = Logan.input_spec()
218224

219225
for key, metadata in list(input_map.items()):
220226
for metakey, value in list(metadata.items()):
221227
assert getattr(inputs.traits()[key], metakey) == value
222228

223229

224-
def test_LoganRef_outputs():
230+
def test_Logan_outputs():
225231
output_map = dict(
226232
beta_file=dict(
227233
extensions=None,
@@ -271,7 +277,7 @@ def test_LoganRef_outputs():
271277
extensions=None,
272278
),
273279
)
274-
outputs = LoganRef.output_spec()
280+
outputs = Logan.output_spec()
275281

276282
for key, metadata in list(output_map.items()):
277283
for metakey, value in list(metadata.items()):

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /