Description Usage Arguments Value See Also Examples
Read tracking and feature matrices from the Caltech Fly Tracker
1 2 3 |
f |
Path to a matlab .mat file |
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:
track.mat
raw tracking data (e.g. position, orientation, left
wing angle)
trk.names
1 x n_fields cell names of fields in trk.data
trk.flags
n_flags x 6 potential identity swaps (fly1 fly2
start_fr #' end_fr ambig) The 6th column is mysterious.
http://www.vision.caltech.edu/Tools/FlyTracker/documentation.html
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.