本文整理汇总了Python中nipype.interfaces.matlab.MatlabCommand.set_default_matlab_cmd方法的典型用法代码示例。如果您正苦于以下问题:Python MatlabCommand.set_default_matlab_cmd方法的具体用法?Python MatlabCommand.set_default_matlab_cmd怎么用?Python MatlabCommand.set_default_matlab_cmd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nipype.interfaces.matlab.MatlabCommand
的用法示例。
在下文中一共展示了MatlabCommand.set_default_matlab_cmd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from nipype.interfaces.matlab import MatlabCommand [as 别名]
# 或者: from nipype.interfaces.matlab.MatlabCommand import set_default_matlab_cmd [as 别名]
from nipype.interfaces.freesurfer import Resample, Binarize, MRIConvert
from nipype.algorithms.confounds import CompCor
from nipype.interfaces.afni.preprocess import Bandpass
from nipype.interfaces.afni.utils import AFNItoNIFTI
from nipype.interfaces.ants import ApplyTransforms, Registration
from nipype.algorithms.misc import Gunzip
from pandas import DataFrame, Series
#set output file type for FSL to NIFTI
from nipype.interfaces.fsl.preprocess import FSLCommand
FSLCommand.set_default_output_type('NIFTI')
# MATLAB setup - Specify path to current SPM and the MATLAB's default mode
from nipype.interfaces.matlab import MatlabCommand
MatlabCommand.set_default_paths('~/spm12')
MatlabCommand.set_default_matlab_cmd("matlab -nodesktop -nosplash")
# Set study variables
setup='sherlock'
sample='6mo' #6mo or newborn
sequence='spiral'#spiral or mux6
if setup=='sherlock':
studyhome = '/oak/stanford/groups/iang/BABIES_data/BABIES_rest'
raw_data = studyhome + '/subjDir/all'
output_dir = studyhome + '/processed/preproc'
workflow_dir = studyhome + '/workflows'
elif setup=='Cat':
studyhome = '/Users/catcamacho/Box/SNAP/BABIES/BABIES_rest'
raw_data = studyhome + '/rest_raw'
output_dir = studyhome + '/processed/preproc'
示例2: display_crash_files
# 需要导入模块: from nipype.interfaces.matlab import MatlabCommand [as 别名]
# 或者: from nipype.interfaces.matlab.MatlabCommand import set_default_matlab_cmd [as 别名]
import os
import socket
from nipype.interfaces.matlab import MatlabCommand
if socket.gethostname() == 'malin':
os.environ['MATLABCMD'] = "/opt/matlab/R2015b/bin/matlab -nodesktop -nosplash"
MatlabCommand.set_default_paths('/opt/matlab/R2015b/toolbox/spm12')
MatlabCommand.set_default_matlab_cmd("/opt/matlab/R2015b/bin/matlab -nodesktop -nosplash")
TPM = '/opt/matlab/R2015b/toolbox/spm12/tpm/TPM.nii'
# os.environ['MATLABCMD'] = "/opt/matlab/R2012a/bin/matlab -nodesktop -nosplash"
# MatlabCommand.set_default_paths('/opt/matlab/R2012a/toolbox/spm12')
# MatlabCommand.set_default_matlab_cmd("/opt/matlab/R2012a/bin/matlab -nodesktop -nosplash")
elif socket.gethostname() == 'cala':
os.environ['MATLABCMD'] = "/opt/matlab/64bit/R2015a/bin/matlab -nodesktop -nosplash"
MatlabCommand.set_default_paths('/opt/matlab/64bit/R2015a/toolbox/spm12')
MatlabCommand.set_default_matlab_cmd("/opt/matlab/64bit/R2015a/bin/matlab -nodesktop -nosplash")
TPM = '/opt/matlab/64bit/R2015a/toolbox/spm12/tpm/TPM.nii'
def display_crash_files(crashfile, rerun=False):
from nipype.utils.filemanip import loadcrash
crash_data = loadcrash(crashfile)
node = crash_data['node']
tb = crash_data['traceback']
print("\n")
print("File: %s"%crashfile)
print("Node: %s"%node)
if node.base_dir:
print("Working directory: %s" % node.output_dir())
else:
print("Node crashed before execution")
print("\n")