read_caltech_feat: Read tracking and feature matrices from the Caltech Fly...

Description Usage Arguments Value See Also Examples

View source: R/caltech.R

Description

Read tracking and feature matrices from the Caltech Fly Tracker

Usage

1
2
3

Arguments

f

Path to a matlab .mat file

Value

For read_caltech_feat an array with dimensions time x features x flies

For read_caltech_track an array with dimensions n_frames x n_fields x n_flies and attributes:

See Also

http://www.vision.caltech.edu/Tools/FlyTracker/documentation.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
feats=read_caltech_feat('~/projects/Dana/tracking/samples/210517_006-feat.mat')
plot(ts(feats[,"vel", "fly001"], start=0, frequency=30))

## End(Not run)
## Not run: 
track=read_caltech_track('~/projects/Dana/tracking/samples/210517_006-track.mat')
plot(ts(track[,c("pos x", "pos y"), "fly001"], start=0, frequency=30))

# plot 2 flies
flies=attr(track, 'flies_in_chamber')
plot(track[,c("pos x", "pos y"), flies[[1]][1]], type='l', col='red', asp=1)
lines(track[,c("pos x", "pos y"), flies[[1]][2]], type='l', col='blue')

## End(Not run)

jefferislab/flywatch documentation built on Aug. 6, 2021, 12:14 p.m.