本文整理匯總了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")