In [1]:
import pymaid
import matplotlib.pyplot as plt
rm = pymaid.CatmaidInstance('server_url', 'api_token', 'http_user', 'http_password')
n = pymaid.get_neurons(16)
fig, ax = n.plot2d(connectors=False, linewidth=1)
plt.show()
In [2]:
smoothed = pymaid.smooth_neuron(n, inplace=False)
In [3]:
fig, ax = smoothed.plot2d(connectors=False, linewidth=1)
plt.show()
In [4]:
print('Old cable: {:.2f} um'.format(n.cable_length))
print('New cable: {:.2f} um'.format(smoothed.cable_length))
In [5]:
more_smoothed = pymaid.smooth_neuron(n, 50, inplace=False)
fig, ax = more_smoothed.plot2d(connectors=False, linewidth=1)
plt.show()
In [6]:
too_smoothed = pymaid.smooth_neuron(n, 500, inplace=False)
fig, ax = too_smoothed.plot2d(connectors=False, linewidth=1)
plt.show()