Skip to content
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

⚡️ Update memory and threading estimates #1428

Merged
merged 94 commits into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
4e27c23
default directory layout
jarrodmillman Jul 15, 2009
5b14f74
added structure of basic directories to trunk
cindeem Jul 16, 2009
bda300e
added subdirectories to nipype trunk
cindeem Jul 16, 2009
e68ed07
add memory and thread to gantt chart, callback handles errors
carolFrohlich Oct 8, 2015
f487de3
add tests
carolFrohlich Oct 9, 2015
66f1a2a
add attribute real_memory to interface, change attr memory to estimat…
carolFrohlich Nov 25, 2015
9a1e2a3
Removed all of the ResourceMultiProc plugin so the S3 datasink
pintohutch Jan 11, 2016
c209f88
change old namespaces
carolFrohlich Jan 19, 2016
e1946f8
Merge pull request #6 from nipy/master
pintohutch Feb 4, 2016
8bf2725
Merged resource_multiproc into s3_multiproc
pintohutch Feb 4, 2016
8c90deb
Merge branch 's3_multiproc' into resource_multiproc
pintohutch Feb 4, 2016
bdd7d95
Re-pulled in changes from github
pintohutch Feb 4, 2016
8f46956
Cleaned up some of the code to PEP8 and checked for errors
pintohutch Feb 23, 2016
943b34e
Changed memory parameters to be memory_gb to be more explicit, used r…
pintohutch Feb 24, 2016
de848aa
Fixed exception formatting and import error
pintohutch Feb 25, 2016
0f04b8a
improve thread draw algorithm
carolFrohlich Mar 8, 2016
6ec02e3
minor bugs
carolFrohlich Mar 15, 2016
57eccbe
partial commit to gantt chart
carolFrohlich Mar 25, 2016
86a3763
Fixed up gantt chart to plot real time memory
pintohutch Mar 25, 2016
7212dd7
Finished working prototype of gantt chart generator
pintohutch Mar 28, 2016
4d62930
remove white space, add labels
carolFrohlich Mar 30, 2016
741cff1
Added global watcher
pintohutch Apr 20, 2016
be49692
Merge pull request #10 from FCP-INDI/new_interfaces
sgiavasis Apr 21, 2016
ae39f26
Debug code
pintohutch Apr 22, 2016
9ef0da3
Removed print debug statement
pintohutch Apr 22, 2016
62bd5bf
Merge pull request #17 from FCP-INDI/debug_runtime_prof
pintohutch Apr 25, 2016
13854f6
Merge pull request #15 from sgiavasis/master
pintohutch Apr 26, 2016
6fb95f8
Modified thread-monitoring logic and ensured unit tests pass
pintohutch Apr 26, 2016
dd4a7ca
Lowered memory usage for unit tests
pintohutch Apr 26, 2016
31ecb49
Removed resource_multiproc code so only new_interfaces code is left
pintohutch Apr 27, 2016
e2dde04
Fixed some errors
pintohutch Apr 29, 2016
6689818
Fixed some typos
pintohutch May 9, 2016
517c307
Merge pull request #1460 from FCP-INDI/new_interfaces
satra May 30, 2016
8768c93
fix: make check-before-commit
satra Jun 17, 2016
becb8ce
Merge pull request #1515 from satra/ref/deprecate_fmrirealign4d
satra Jun 18, 2016
da731ad
Merge pull request #10 from aweinstein/enh/duecredit
alexsavio Aug 4, 2016
15237fc
add encoding comment at top
oesteban Aug 9, 2016
2c9b5df
futurize stages 1 and 2
oesteban Aug 10, 2016
12b61e2
handle OrderedDict
oesteban Aug 12, 2016
5c67ae8
multiple fixes for python 3 compatibility
oesteban Aug 24, 2016
5f2cd96
add from builtins import open where needed, fixed some open and never…
oesteban Aug 25, 2016
fc36119
Merge remote-tracking branch 'upstream/master' into fix/Py3UseBuiltin…
oesteban Sep 6, 2016
b441c8b
Merge pull request #1572 from oesteban/fix/Py3UseBuiltinOpen
chrisgorgo Sep 7, 2016
aa05a69
[FIX] Python 3 compatibility of gantt chart generator
oesteban Mar 23, 2017
b60b462
fix python 2 compatibility iterating over a pandas Series
oesteban Mar 23, 2017
fba6793
Merge remote-tracking branch 'nipy/master'
tsalo Mar 29, 2017
3f04a87
Merge pull request #1 from nipy/master
mgxd Apr 4, 2017
8f1b2e6
Merge pull request #1 from mmodat/fix-niftyseg-hdr-copy
byvernault May 19, 2017
e86b570
Merge pull request #2036 from mmodat/fix-hdr-copy
satra May 19, 2017
e554b20
Merge branch 'master' of github.com:mgxd/nipype
mgxd May 22, 2017
ae64013
Merge pull request #2054 from mgxd/enh/version
satra May 26, 2017
4eb2f30
Merge remote-tracking branch 'nipy/master'
62442katieb Jun 22, 2017
497ed9c
Merge pull request #2114 from 62442katieb/expand-afni-utils
satra Jul 24, 2017
6b6ac59
various fixes
oesteban Sep 25, 2017
105d27a
cleaning up code
oesteban Sep 25, 2017
1a365d0
address review comments
oesteban Sep 26, 2017
f40b03d
several fixups
oesteban Oct 2, 2017
af22b50
Merge pull request #2200 from oesteban/enh/ReviseResourceProfiler
oesteban Oct 4, 2017
cc2eb10
Merge remote-tracking branch 'nipy/master'
tsalo Nov 12, 2017
5253107
STY: correcting W391 - blank line at end of file
miykael Jan 5, 2018
3ee51b0
STY: correction of E502 - the backslash is redundant between brackets
miykael Jan 6, 2018
c0ead47
STY: correction of E203 - whitespace before ':' or ','
miykael Jan 6, 2018
f323231
STY: correction of most E265 - block comment should start with '# '
miykael Jan 6, 2018
28c99b7
STY: correction of E302 - expected 2 blank lines, found 1
miykael Jan 6, 2018
1a55247
STY: correction of E127 - continuation line over-indented for visual …
miykael Jan 6, 2018
dad0e01
STY: correction of E501 - __future__ import too long
miykael Jan 6, 2018
c9e92b1
sty: using yapf to clean pep8 issues
satra Jan 11, 2018
7462200
Merge pull request #2371 from satra/sty/pepping
effigies Jan 17, 2018
719a33d
RF: Remove builtins
effigies Jul 25, 2018
e78b790
RF: Purge PY2/PY3 indicators
effigies Jul 25, 2018
ece6b4e
STY: Black
effigies Nov 14, 2019
1701b8c
Merge pull request #3096 from effigies/sty/black
effigies Nov 14, 2019
bfa707b
:bug: Convert timing values to datetimes from strings
shnizzedy Jan 6, 2021
5b46a80
:goal_net: Reduce double logging from exception to warning
shnizzedy Jan 6, 2021
8aff589
:white_check_mark: Add test for `draw_gantt_chart`
shnizzedy Jan 6, 2021
fb092aa
:rotating_light: Automatic linting by pre-commit
shnizzedy Jan 8, 2021
c291171
:children_crossing: Don't restrict nan timestamps to predetermined op…
shnizzedy Jan 8, 2021
16b2bf3
:truck: Copy draw_gantt_chart from nipype into C-PAC
shnizzedy Jan 28, 2021
69c6f06
:zap: Set default Node and MapNode `mem_gb` to 2.0
shnizzedy Jan 27, 2021
8b45e77
:white_check_mark: Add tests for overridden Node and MapNode
shnizzedy Jan 27, 2021
3e6b667
:zap: Set mem_gb estimates > 2.0
shnizzedy Jan 27, 2021
1e9d8b4
:fire: Remove unused (and circular) imports
shnizzedy Jan 28, 2021
11283e6
:truck: Move monitoring into its own submodule
shnizzedy Jan 28, 2021
2e95383
:twisted_rightwards_arrows: Merge nipype:fix/gantt-chart into coverge…
shnizzedy Jan 29, 2021
5883b9a
:zap: Set number of threads used to `math.ceil(cpu_percent/100)`
shnizzedy Jan 7, 2021
ee68d1f
:rotating_light: Lint monitoring
shnizzedy Jan 28, 2021
f7f61bf
:recycle: Import unchanged functions directly from nipype
shnizzedy Jan 28, 2021
77aebe5
:rotating_light: Lint draw_gantt_chart
shnizzedy Jan 28, 2021
044370f
:goal_net: Generate text and HTML resource usage reports
shnizzedy Jan 28, 2021
ac1dfd1
:zap: Set default n_procs for MapNode to 1
shnizzedy Jan 28, 2021
6b6d6f7
:loud_sound: Save resource overusage report to file
shnizzedy Jan 28, 2021
5aed1ac
:twisted_rightwards_arrows: Fix config headers from merge f15fe5f
shnizzedy Jan 19, 2021
d7cd96e
:children_crossing: Handle empty creds_path
shnizzedy Jan 29, 2021
aeae2ae
Merge branch 'develop_v1.8_convergence' into convergence/memory-estim…
sgiavasis Jan 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CPAC/alff/alff.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

import os
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
from nipype.interfaces.afni import preprocess
import nipype.interfaces.utility as util
from CPAC.alff.utils import get_opt_string
Expand Down Expand Up @@ -169,7 +169,8 @@ def create_alff(wf_name='alff_workflow'):

# filtering
bandpass = pe.Node(interface=preprocess.Bandpass(),
name='bandpass_filtering')
name='bandpass_filtering',
mem_gb=13.0)
bandpass.inputs.outputtype = 'NIFTI_GZ'
bandpass.inputs.out_file = os.path.join(os.path.curdir,
'residual_filtered.nii.gz')
Expand Down
2 changes: 1 addition & 1 deletion CPAC/anat_preproc/anat_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from nipype.interfaces import ants
from nipype.interfaces import fsl
from nipype.interfaces.fsl import utils as fsl_utils
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from CPAC.anat_preproc.ants import init_brain_extraction_wf
from nipype.interfaces import freesurfer
Expand Down
4 changes: 2 additions & 2 deletions CPAC/anat_preproc/ants.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def init_brain_extraction_wf(tpl_target_path,

copy_xform = pe.Node(CopyXForm(
fields=['out_file', 'out_mask', 'bias_corrected', 'bias_image']),
name='copy_xform', run_without_submitting=True)
name='copy_xform', run_without_submitting=True, mem_gb=2.5)

trunc = pe.MapNode(ImageMath(operation='TruncateImageIntensity', op2='0.01 0.999 256'),
name='truncate_images', iterfield=['op1'])
Expand Down Expand Up @@ -417,7 +417,7 @@ def init_atropos_wf(name='atropos_wf',

copy_xform = pe.Node(CopyXForm(
fields=['out_mask', 'out_segm', 'out_tpms']),
name='copy_xform', run_without_submitting=True)
name='copy_xform', run_without_submitting=True, mem_gb=2.5)

# Run atropos (core node)
atropos = pe.Node(Atropos(
Expand Down
2 changes: 1 addition & 1 deletion CPAC/anat_preproc/lesion_preproc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

from nipype.interfaces import afni
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util


Expand Down
2 changes: 1 addition & 1 deletion CPAC/aroma/aroma.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from nipype.interfaces import fsl
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from nipype.interfaces.fsl.aroma import ICA_AROMA

Expand Down
2 changes: 1 addition & 1 deletion CPAC/aroma/aroma_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os
import glob
import nipype.interfaces.io as nio
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
from nipype.interfaces.fsl import ImageStats
#rom nose.tools import *
## This script runs the warp_nipype workflow to execute the interfaces and with the inputs already provided
Expand Down
2 changes: 1 addition & 1 deletion CPAC/connectome/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from nipype.interfaces.base import BaseInterface, \
BaseInterfaceInputSpec, traits, File, TraitedSpec
Expand Down
2 changes: 1 addition & 1 deletion CPAC/cwas/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import os
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util

from CPAC.utils.interfaces.function import Function
Expand Down
2 changes: 1 addition & 1 deletion CPAC/distortion_correction/distortion_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import nibabel as nb

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
from nipype.interfaces import afni, fsl
import nipype.interfaces.utility as util
import nipype.interfaces.ants as ants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
import os
import nipype.interfaces.io as nio
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe

from CPAC.utils.test_resources import setup_test_wf
from CPAC.func_preproc.func_preproc import create_func_preproc
Expand Down
2 changes: 1 addition & 1 deletion CPAC/easy_thresh/easy_thresh.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.utility as util

Expand Down
2 changes: 1 addition & 1 deletion CPAC/func_preproc/func_ingress.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from nipype import logging
logger = logging.getLogger('workflow')

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe

import nipype.interfaces.afni as afni

Expand Down
10 changes: 6 additions & 4 deletions CPAC/func_preproc/func_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

logger = logging.getLogger('workflow')

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.utility as util
from nipype.interfaces import afni
Expand Down Expand Up @@ -683,7 +683,7 @@ def motion_correct_connections(wf, cfg, strat_pool, pipe_num, opt):
elif opt == 'mcflirt':
func_motion_correct_A = pe.Node(
interface=fsl.MCFLIRT(save_mats=True, save_plots=True),
name=f'func_motion_correct_mcflirt_{pipe_num}')
name=f'func_motion_correct_mcflirt_{pipe_num}', mem_gb=2.5)

func_motion_correct_A.inputs.save_mats = True
func_motion_correct_A.inputs.save_plots = True
Expand Down Expand Up @@ -1609,15 +1609,17 @@ def func_normalize(wf, cfg, strat_pool, pipe_num, opt=None):
'''

func_normalize = pe.Node(interface=fsl.ImageMaths(),
name=f'func_normalize_{pipe_num}')
name=f'func_normalize_{pipe_num}',
mem_gb=3.0)
func_normalize.inputs.op_string = '-ing 10000'
func_normalize.inputs.out_data_type = 'float'

node, out = strat_pool.get_data('desc-brain_bold')
wf.connect(node, out, func_normalize, 'in_file')

func_mask_normalize = pe.Node(interface=fsl.ImageMaths(),
name=f'func_mask_normalize_{pipe_num}')
name=f'func_mask_normalize_{pipe_num}',
mem_gb=3.0)
func_mask_normalize.inputs.op_string = '-Tmin -bin'
func_mask_normalize.inputs.out_data_type = 'char'

Expand Down
4 changes: 2 additions & 2 deletions CPAC/generate_motion_statistics/generate_motion_statistics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import numpy as np
import nibabel as nb
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from CPAC.utils.interfaces.function import Function

Expand Down Expand Up @@ -191,7 +191,7 @@ def motion_power_statistics(name='motion_stats',
output_names=['out_file'],
function=calculate_DVARS,
as_module=True),
name='cal_DVARS')
name='cal_DVARS', mem_gb=3.5)

# calculate mean DVARS
wf.connect(input_node, 'motion_correct', cal_DVARS, 'func_brain')
Expand Down
2 changes: 1 addition & 1 deletion CPAC/group_analysis/group_analysis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.utility as util
from CPAC.easy_thresh import easy_thresh
Expand Down
9 changes: 6 additions & 3 deletions CPAC/image_utils/spatial_smoothing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nipype.interfaces.fsl as fsl
from nipype.interfaces.afni import preprocess as afni
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from CPAC.utils import Outputs

Expand Down Expand Up @@ -51,13 +51,16 @@ def spatial_smoothing(wf_name, fwhm, input_image_type='func_derivative',
', '.join(image_types)))

if opt == 'FSL':
output_smooth_mem_gb = 4.0
if input_image_type == 'func_derivative_multi':
output_smooth = pe.MapNode(interface=fsl.MultiImageMaths(),
name='smooth_multi',
iterfield=['in_file'])
iterfield=['in_file'],
mem_gb=output_smooth_mem_gb)
else:
output_smooth = pe.Node(interface=fsl.MultiImageMaths(),
name='smooth')
name='smooth',
mem_gb=output_smooth_mem_gb)

elif opt == 'AFNI':
if input_image_type == 'func_derivative_multi':
Expand Down
2 changes: 1 addition & 1 deletion CPAC/image_utils/statistical_transforms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import nipype.interfaces.fsl as fsl
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from nipype.interfaces.afni import preprocess
from CPAC.registration import create_fsl_fnirt_nonlinear_reg, \
Expand Down
2 changes: 1 addition & 1 deletion CPAC/image_utils/tests/test_smooth.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util

from CPAC.utils.test_mocks import configuration_strategy_mock
Expand Down
2 changes: 1 addition & 1 deletion CPAC/isc/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
from nipype.interfaces.base import BaseInterface, \
BaseInterfaceInputSpec, traits, File, TraitedSpec
Expand Down
2 changes: 1 addition & 1 deletion CPAC/longitudinal_pipeline/longitudinal_preproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import six
import numpy as np
import nibabel as nib
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
import nipype.interfaces.fsl as fsl
from nipype.interfaces.fsl import ConvertXFM
Expand Down
2 changes: 1 addition & 1 deletion CPAC/longitudinal_pipeline/longitudinal_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from nipype import config
from nipype import logging
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
Expand Down
2 changes: 1 addition & 1 deletion CPAC/median_angle/median_angle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util


Expand Down
2 changes: 1 addition & 1 deletion CPAC/network_centrality/network_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_centrality_wf(wf_name, method_option, weight_options,
the initialized nipype workflow for the afni centrality command
"""

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
import CPAC.network_centrality.utils as utils

Expand Down
5 changes: 3 additions & 2 deletions CPAC/network_centrality/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.utility as util

Expand Down Expand Up @@ -84,7 +84,8 @@ def network_centrality(wf, cfg, strat_pool, pipe_num, opt=None):
# Resample the functional mni to the centrality mask resolution
resample_functional_to_template = pe.Node(
interface=fsl.FLIRT(),
name=f'resample_functional_to_template_{pipe_num}')
name=f'resample_functional_to_template_{pipe_num}',
mem_gb=4.0)

resample_functional_to_template.inputs.set(
interp='trilinear',
Expand Down
30 changes: 17 additions & 13 deletions CPAC/nuisance/nuisance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import numpy as np
import nibabel as nb
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util
import CPAC

Expand Down Expand Up @@ -981,7 +981,8 @@ def create_regressor_workflow(nuisance_selectors,
anat_resample = pe.Node(
interface=fsl.FLIRT(),
name='{}_flirt'
.format(anatomical_at_resolution_key)
.format(anatomical_at_resolution_key),
mem_gb=8.0
)
anat_resample.inputs.apply_isoxfm = regressor_selector["extraction_resolution"]

Expand All @@ -1003,7 +1004,8 @@ def create_regressor_workflow(nuisance_selectors,
func_resample = pe.Node(
interface=fsl.FLIRT(),
name='{}_flirt'
.format(functional_at_resolution_key)
.format(functional_at_resolution_key),
mem_gb=8.0
)
func_resample.inputs.apply_xfm = True

Expand Down Expand Up @@ -1124,7 +1126,7 @@ def create_regressor_workflow(nuisance_selectors,
'compcor_file'],
function=calc_compcor_components,
imports=compcor_imports),
name='{}_DetrendPC'.format(regressor_type), mem_gb=2.0)
name='{}_DetrendPC'.format(regressor_type), mem_gb=12.5)

compcor_node.inputs.num_components = regressor_selector['summary']['components']

Expand All @@ -1147,13 +1149,14 @@ def create_regressor_workflow(nuisance_selectors,
'import nibabel as nb',
'from nipype import logging']

cosfilter_node = pe.Node(util.Function(input_names=['input_image_path',
'timestep'],
output_names=[
'cosfiltered_img'],
function=cosine_filter,
imports=cosfilter_imports),
name='{}_cosine_filter'.format(regressor_type))
cosfilter_node = pe.Node(
util.Function(input_names=['input_image_path',
'timestep'],
output_names=['cosfiltered_img'],
function=cosine_filter,
imports=cosfilter_imports),
name='{}_cosine_filter'.format(regressor_type),
mem_gb=8.0)
nuisance_wf.connect(
summary_filter_input[0], summary_filter_input[1],
cosfilter_node, 'input_image_path'
Expand Down Expand Up @@ -1225,7 +1228,8 @@ def create_regressor_workflow(nuisance_selectors,

mean_node = pe.Node(
afni.ROIStats(quiet=False, args='-1Dformat'),
name='{}_mean'.format(regressor_type)
name='{}_mean'.format(regressor_type),
mem_gb=5.0
)
nuisance_wf.connect(
summary_method_input[0], summary_method_input[1],
Expand Down Expand Up @@ -1561,7 +1565,7 @@ def filtering_bold_and_regressors(nuisance_selectors,
'regressor_file'],
function=bandpass_voxels,
as_module=True),
name='frequency_filter'
name='frequency_filter', mem_gb=6.0
)

frequency_filter.inputs.bandpass_freqs = [
Expand Down
2 changes: 1 addition & 1 deletion CPAC/nuisance/tests/test_nuisance.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import yaml
import glob

import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.utility as util

from CPAC.nuisance import create_nuisance_regression_workflow
Expand Down
5 changes: 3 additions & 2 deletions CPAC/nuisance/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import nipype.interfaces.ants as ants
import nipype.interfaces.fsl as fsl
import nipype.interfaces.utility as util
import nipype.pipeline.engine as pe
from CPAC.pipeline import nipype_pipeline_engine as pe
from nipype.interfaces import afni

from CPAC.nuisance.utils.compcor import calc_compcor_components
Expand Down Expand Up @@ -319,7 +319,8 @@ def generate_summarize_tissue_mask(nuisance_wf,
elif step == 'resolution':
mask_to_epi = pe.Node(interface=fsl.FLIRT(),
name='{}_flirt'
.format(node_mask_key))
.format(node_mask_key),
mem_gb=8.0)

mask_to_epi.inputs.interp = 'nearestneighbour'

Expand Down
Loading