コード例 #1
0
ファイル: recipes.py プロジェクト: KirstieJane/maybrain
def loadFiles(adjname, coordname):
    ''' create a brain object and load adjacency matrix and coordinates. Returns a brain object. '''

    brain = brainObj()
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)
    
    return brain
コード例 #2
0
def loadFiles(adjname, coordname):
    ''' create a brain object and load adjacency matrix and coordinates. Returns a brain object. '''

    brain = brainObj()
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)

    return brain
コード例 #3
0
ファイル: recipes.py プロジェクト: KirstieJane/maybrain
def loadAndThreshold(adjname, coordname, threshold):
    ''' create a brain object using the given files, apply a threshold value
        and create the networkx objects. Returns a brain object. '''
        
    brain = brainObj()
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)
    
    brain.applyThreshold(tVal = threshold)
    
    return brain
コード例 #4
0
def loadAndThreshold(adjname, coordname, threshold):
    ''' create a brain object using the given files, apply a threshold value
        and create the networkx objects. Returns a brain object. '''

    brain = brainObj()
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)

    brain.applyThreshold(tVal=threshold)

    return brain
コード例 #5
0
ファイル: recipes.py プロジェクト: KirstieJane/maybrain
def loadAndPlot(adjname, coordname, threshold, opacity = 1.0):
    ''' create a brain object from the given values, apply a threshold value
        then plot. Returns brain, plot. '''
        
    # make brain object
    brain = brainObj()
    
    # load date from files
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)
    
    # apply threshold
    brain.applyThreshold(tVal = threshold)
    
    # plot and show
    plt = plotObj()
    plt.plotBrain(brain, opacity=opacity)
    
    return brain, plt
コード例 #6
0
def loadAndPlot(adjname, coordname, threshold, opacity=1.0):
    ''' create a brain object from the given values, apply a threshold value
        then plot. Returns brain, plot. '''

    # make brain object
    brain = brainObj()

    # load date from files
    brain.importAdjFile(adjname)
    brain.importSpatialInfo(coordname)

    # apply threshold
    brain.applyThreshold(tVal=threshold)

    # plot and show
    plt = plotObj()
    plt.plotBrain(brain, opacity=opacity)

    return brain, plt