当前位置: 首页>>代码示例>>Python>>正文


Python MatlabCommand.set_default_paths方法代码示例

本文整理汇总了Python中nipype.interfaces.matlab.MatlabCommand.set_default_paths方法的典型用法代码示例。如果您正苦于以下问题:Python MatlabCommand.set_default_paths方法的具体用法?Python MatlabCommand.set_default_paths怎么用?Python MatlabCommand.set_default_paths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nipype.interfaces.matlab.MatlabCommand的用法示例。


在下文中一共展示了MatlabCommand.set_default_paths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: import

# 需要导入模块: from nipype.interfaces.matlab import MatlabCommand [as 别名]
# 或者: from nipype.interfaces.matlab.MatlabCommand import set_default_paths [as 别名]
from os.path import join as opj
from nipype.interfaces.afni import Despike
from nipype.interfaces.freesurfer import (BBRegister, ApplyVolTransform,
                                          Binarize, MRIConvert, FSCommand)
from nipype.interfaces.spm import (SliceTiming, Realign, Smooth, Level1Design,
                                   EstimateModel, EstimateContrast)
from nipype.interfaces.utility import Function, IdentityInterface
from nipype.interfaces.io import FreeSurferSource, SelectFiles, DataSink
from nipype.algorithms.rapidart import ArtifactDetect
from nipype.algorithms.misc import TSNR, Gunzip
from nipype.algorithms.modelgen import SpecifySPMModel
from nipype.pipeline.engine import Workflow, Node, MapNode

# MATLAB - Specify path to current SPM and the MATLAB's default mode
from nipype.interfaces.matlab import MatlabCommand
MatlabCommand.set_default_paths('/usr/local/MATLAB/R2014a/toolbox/spm12')
MatlabCommand.set_default_matlab_cmd("matlab -nodesktop -nosplash")

# FreeSurfer - Specify the location of the freesurfer folder
fs_dir = '~/nipype_tutorial/freesurfer'
FSCommand.set_default_subjects_dir(fs_dir)


###
# Specify variables
experiment_dir = '~/nipype_tutorial'          # location of experiment folder
subject_list = ['sub001', 'sub002', 'sub003',
                'sub004', 'sub005', 'sub006',
                'sub007', 'sub008', 'sub009',
                'sub010']                     # list of subject identifiers
output_dir = 'output_fMRI_example_1st'        # name of 1st-level output folder
开发者ID:miykael,项目名称:nipype-beginner-s-guide,代码行数:33,代码来源:example_fMRI_1_first_level.py

示例2:

# 需要导入模块: from nipype.interfaces.matlab import MatlabCommand [as 别名]
# 或者: from nipype.interfaces.matlab.MatlabCommand import set_default_paths [as 别名]
from nipype.interfaces.fsl.epi import ApplyTOPUP, TOPUP
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'
开发者ID:catcamacho,项目名称:infant_rest,代码行数:33,代码来源:preprocessing_classic.py

示例3: display_crash_files

# 需要导入模块: from nipype.interfaces.matlab import MatlabCommand [as 别名]
# 或者: from nipype.interfaces.matlab.MatlabCommand import set_default_paths [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")
开发者ID:m-guggenmos,项目名称:mgnipype,代码行数:33,代码来源:nipypes.py


注:本文中的nipype.interfaces.matlab.MatlabCommand.set_default_paths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。