Example #1
0
    def text_addHighlight(self):
        self.b.clear()

        self.a = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.0)

        # import properties
        self.a.importProperties(self.fnameProps)

        # plot properties
        self.b.highlightFromConds('colour',
                                  'eq',
                                  'red',
                                  label='red_nodes',
                                  mode='node',
                                  colour=(1., 0., 0.),
                                  opacity=1.)
        self.b.highlightFromConds('colour',
                                  'eq',
                                  'green',
                                  label='green_edges',
                                  mode='edge',
                                  colour=(0., 1., 0.),
                                  opacity=1.)
        self.b.highlightFromConds('x',
                                  'geq',
                                  0,
                                  mode='edge',
                                  colour=(0.5, 0.5, 0.))
Example #2
0
    def test_plotOnlyCoords(self):

        # clear current plot and brain
        self.b.clear()

        # load more data (in a fresh brain)
        self.a = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.5)

        # plot the edges
        self.b.plotBrainCoords(self.a)
Example #3
0
 def test_plotOnlyCoords(self):
     
     # clear current plot and brain
     self.b.clear()
     
     # load more data (in a fresh brain)
     self.a = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.5)
     
     # plot the edges
     self.b.plotBrainCoords(self.a)
Example #4
0
 def test_addProperties(self):
     ''' add properties and highlights from a file and plot '''
     
     br = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.5)
     
     br.importProperties(self.fnameProp)
     
     # highlight nodes with x value greater than 5
     br.highlightFromConds('x', 'gt', 0.5, label = 'x1', mode = 'node', colour = (0.5,0.5,0.), opacity = 0.5)
     
     # highlight edges labelled green 
     br.highlightFromConds('colour', 'eq', 'green', label = 'green', mode = 'edge', colour = (0.,1.,0.), opacity = 0.5)
Example #5
0
 def text_addHighlight(self):
     self.b.clear()
     
     self.a = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.0)
     
     # import properties
     self.a.importProperties(self.fnameProps)
     
     # plot properties
     self.b.highlightFromConds('colour', 'eq', 'red', label = 'red_nodes', mode = 'node', colour = (1.,0.,0.), opacity = 1.)
     self.b.highlightFromConds('colour', 'eq', 'green', label = 'green_edges', mode = 'edge', colour = (0.,1.,0.), opacity = 1.)
     self.b.highlightFromConds('x', 'geq', 0, mode = 'edge', colour = (0.5, 0.5, 0.))
Example #6
0
    def test_addProperties(self):
        ''' add properties and highlights from a file and plot '''

        br = recipes.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.5)

        br.importProperties(self.fnameProp)

        # highlight nodes with x value greater than 5
        br.highlightFromConds('x',
                              'gt',
                              0.5,
                              label='x1',
                              mode='node',
                              colour=(0.5, 0.5, 0.),
                              opacity=0.5)

        # highlight edges labelled green
        br.highlightFromConds('colour',
                              'eq',
                              'green',
                              label='green',
                              mode='edge',
                              colour=(0., 1., 0.),
                              opacity=0.5)
Example #7
0
    def test_loadAndThreshold(self):
        ''' load files and threshold '''

        mb.loadAndThreshold(self.fnameAdj, self.fnameCo, 0.5)