average.tracts: Average non-branching tracts

View source: R/flycircuit.R

average.tractsR Documentation

Average non-branching tracts

Description

Function returns an 'average tract' when given a neuronlist of non-branching cable. The function uses NBLAST to find the the neuron within the group that has the highest average similarity score with the rest of the given cable

Usage

average.tracts(cable, sigma = 6, mode = c(1, 2), stepsize = 1, ...)

Arguments

cable

someneuronlist object

sigma

smoothing parameter given to nat::smooth_neuron, i.e. the standard deviation of the Gaussian smoothing kernel (which has the same spatial units as the object being smoothed)

mode

Either 1 or 2. Method 1 simply takes the best NBLAST match and, for each of its nodes, finds the mean xyz coordinate for that node index in the cable group (soma has index 1), all resampled to the stepsize value. Method 2 is similar, but takes the closest node in each of the other neurons in the cable neuronlist rather than the nodes of the same index.

stepsize

the spacing to which cable should be resampled

...

additional arguments passed to methods

Value

a single neuron object, the averaged tract, and containing values for standard deviation for each 3D point.


alexanderbates/catnat documentation built on Sept. 5, 2023, 4:51 a.m.