Generates an 'overlap matrix' of overlap scores between neurons in the outputneurons and inputneurons pools. For every point in a given neuron in outputneurons, a distance score is calculated to every point in a neuron in inputneurons. The sum of this score is added to the final output matrix. The score is calculated as e(-d^2/(2*delta^2)), where d is the euclidean distance between the two points, and delta is the expected distance in um that is considered 'close'. It is recommended that the user resamples neurons before use, using resample.

overlap_score(outputneurons, inputneurons, delta = 1, progress = TRUE)



first set of neurons


second set of neurons


the distance (in um) at which a synapse might occur


whether or not to have a progress bar


a matrix of overlap scores

See also


if (FALSE) { # Calculate how much some neurons overlap with one another ## Example requires the package nat.flybrains Cell07PNs_overlap = overlap_score(outputneurons = Cell07PNs, inputneurons = Cell07PNs) ## Plot the results heatmap(Cell07PNs_overlap) }