Skip to contents

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)

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.

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).

See also

Examples

library(nat)
lrdiffs=banc_lr_position(xyzmatrix(BANC.surf))
if (FALSE) { # \dontrun{
points3d(xyzmatrix(BANC.surf), col=ifelse(lrdiffs>0, 'green', 'red'))
} # }