banc_lr_position: Predict whether a point is on the left or right of the BANC...

View source: R/xform.R

banc_lr_positionR Documentation

Predict whether a point is on the left or right of the BANC dataset

Description

Predict whether a point is on the left or right of the BANC dataset

Usage

banc_lr_position(x, units = c("nm", "microns", "raw"), group = FALSE)

Arguments

x

An object from which xyzmatrix can extract points, calibrated in nm.

units

Units for both input and output data.

group

Whether to return the mean displacement per neuron (when x is a neuronlist)

Details

This is not perfect as it assumes that the X displacement from the midline is a good indicator of LR displacement. This is generally true but not infallible. Furthermore it will only be as good as the registration used by mirror_banc (still variable).

Value

A vector of point displacements (calibrated according to units, nm is the default) where 0 is at the midline and positive values are to the fly's right.

See Also

mirror_banc

Examples

library(nat)
lrdiffs=banc_lr_position(xyzmatrix(BANC.surf))
## Not run: 
points3d(xyzmatrix(BANC.surf), col=ifelse(lrdiffs>0, 'green', 'red'))

## End(Not run)

flyconnectome/fanc documentation built on Sept. 6, 2024, 9:56 a.m.