navis.Dotprops¶
- class navis.Dotprops(points, k, vect=None, alpha=None, units=None, **metadata)[source]¶
Neuron represented as points + local vectors.
Dotprops consist of points with x/y/z coordinates, a tangent vector and an alpha value describing the immediate neighbourhood (see also references).
Typically constructed using
navis.make_dotprops()
.References
Masse N.Y., Cachero S., Ostrovsky A., and Jefferis G.S.X.E. (2012). A mutual information approach to automate identification of neuronal clusters in Drosophila brain images. Frontiers in Neuroinformatics 6 (00021). doi: 10.3389/fninf.2012.00021
- Parameters:
points (numpy array) – (N, 3) array of x/y/z coordinates.
k (int, optional) – Number of nearest neighbors for tangent vector calculation. This can be
None
or0
but then vectors must be provided on initialization and can subsequently not be re-calculated. Typical values here arek=20
for dense (e.g. from light level data) andk=5
for sparse (e.g. from skeletons) point clouds.vect (numpy array, optional) – (N, 3) array of vectors. If not provided will recalculate both
vect
andalpha
usingk
.alpha (numpy array, optional) – (N, ) array of alpha values. If not provided will recalculate both
alpha
andvect
usingk
.units (str | pint.Units | pint.Quantity) – Units for coordinates. Defaults to
None
(dimensionless). Strings must be parsable by pint: e.g. “nm”, “um”, “micrometer” or “8 nanometers”.**metadata – Any additional data to attach to neuron.
Initialize Dotprops Neuron.
- __init__(points, k, vect=None, alpha=None, units=None, **metadata)[source]¶
Initialize Dotprops Neuron.
Methods
__init__
(points, k[, vect, alpha, units])Initialize Dotprops Neuron.
convert_units
(to[, inplace])Convert coordinates to different unit.
copy
()Return a copy of the dotprops.
dist_dots
(other[, alpha, distance_upper_bound])Query this Dotprops against another.
downsample
([factor, inplace])Downsample the neuron by given factor.
map_units
(units[, on_error])Convert units to match neuron space.
memory_usage
([deep, estimate])Return estimated memory usage of this neuron.
plot2d
(**kwargs)Plot neuron using
navis.plot2d()
.plot3d
(**kwargs)Plot neuron using
navis.plot3d()
.recalculate_tangents
(k[, inplace])Recalculate tangent vectors and alpha with a new
k
.snap
(locs[, to])Snap xyz location(s) to closest point or synapse.
summary
([add_props])Get a summary of this neuron.
to_skeleton
([scale_vec])Turn dotprops into a skeleton.
Attributes
CORE_DATA
Core data table(s) used to calculate hash
EQ_ATTRIBUTES
Attributes to be used when comparing two neurons.
SUMMARY_PROPS
Attributes used for neuron summary
TEMP_ATTR
Temporary attributes that need clearing when neuron data changes
Alpha value for tangent vectors (optional).
bbox
Bounding box (includes connectors).
connectors
Connector table.
core_md5
MD5 checksum of core data.
datatables
Names of all DataFrames attached to this neuron.
extents
Extents of neuron in x/y/z direction (includes connectors).
id
ID of the neuron.
is_isometric
Test if neuron is isometric.
is_locked
Test if neuron is locked.
is_stale
Test if temporary attributes might be outdated.
kdtree
KDTree for points.
label
Label (e.g. for legends).
name
Neuron name.
Center of tangent vectors.
postsynapses
Table with postsynapses (filtered from connectors table).
presynapses
Table with presynapses (filtered from connectors table).
sampling_resolution
Mean distance between points.
soma
Index of soma point.
type
Neuron type.
units
Units for coordinate space.
units_xyz
Units for coordinate space.
Tangent vectors.
k
volume