Example #1
0
def test_neuron():
    fig, ax = view.neuron(neuron0)
    nt.ok_(np.allclose(ax.get_xlim(), (-70.328535157399998, 94.7472627179)) )
    nt.ok_(np.allclose(ax.get_ylim(), (-87.600171997199993, 78.51626225230001)) )
    fig, ax = view.neuron(neuron0, plane='wrong')
    nt.ok_(ax == 'No such plane found! Please select one of: xy, xz, yx, yz, zx, zy.')
    plt.close('all')
Example #2
0
def neuron_morphology_dendrogram(neuron, suptitle='Neuron Morphology'):
    '''Figure of dendrogram and morphology view
    '''
    from neurom.view import view
    import pylab as pl

    view.neuron(neuron, new_fig=True, plane='xz', subplot=121,
                title='', xlabel='', ylabel='', xticks=[], yticks=[])
    dendrogram(neuron, show_diameters=True, new_fig=False, subplot=122, rotation='right', title='')

    pl.suptitle(suptitle)
Example #3
0
def test_neuron():
    fig, ax = view.neuron(fst_neuron)
    nt.ok_(np.allclose(ax.get_xlim(), (-70.328535157399998, 94.7472627179)) )
    nt.ok_(np.allclose(ax.get_ylim(), (-87.600171997199993, 78.51626225230001)) )
    nt.ok_(ax.get_title() == fst_neuron.name)
    fig, ax = view.neuron(fst_neuron, xlim=(0,100), ylim=(0,100))
    nt.ok_(np.allclose(ax.get_xlim(), (0, 100)) )
    nt.ok_(np.allclose(ax.get_ylim(), (0, 100)) )
    nt.ok_(ax.get_title() == fst_neuron.name)
    fig, ax = view.neuron(fst_neuron, plane='wrong')
    nt.ok_(ax == 'No such plane found! Please select one of: xy, xz, yx, yz, zx, zy.')
    plt.close('all')
Example #4
0
def neuron_morphology_dendrogram(neuron, suptitle='Neuron Morphology'):
    '''Figure of dendrogram and morphology view
    '''
    from neurom.view import view
    import pylab as pl

    view.neuron(neuron,
                new_fig=True,
                plane='xz',
                subplot=121,
                title='',
                xlabel='',
                ylabel='',
                xticks=[],
                yticks=[])
    dendrogram(neuron,
               show_diameters=True,
               new_fig=False,
               subplot=122,
               rotation='right',
               title='')

    pl.suptitle(suptitle)
Example #5
0
def test_neuron_no_neurites():
    filename = os.path.join(SWC_PATH, 'point_soma.swc')
    f, a = view.neuron(io.load_neuron(filename))
Example #6
0
def test_neuron_no_neurites():
    filename = os.path.join(SWC_PATH, 'point_soma.swc')
    f, a = view.neuron(load_neuron(filename))