This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acquire | |
runtime = acquire.Runtime() # initializes driver adapters | |
# All the settings are in the `props` | |
# Configuration objects are typed. | |
# They can all be made into a dict. e.g: props.dict() | |
# They can also be read from a dict. e.g. Properties(**json.load('acquire.json'))) | |
p = runtime.get_configuration() | |
# Camera configuration |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w = LoadWhiskers('trial.whiskers'); | |
measurements = LoadMeasurements('trial.measurements'); | |
whisker_id=0; % the tracked whisker of interest | |
frame_id=100; % the time point of interest | |
times = [measurements(:).fid]; | |
names = [measurements(:).label]; | |
curveids = [measurements(:).wid]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void encode() | |
{ unsigned char *input, *output=0; // input and output buffer | |
size_t countof_input, countof_output; // number of symbols in input and output buffer | |
float *cdf=0; | |
size_t nsym; // number of symbols in the input alphabet | |
// somehow load the data into input array | |
cdf_build(&cdf,&nsym,input,countof_input); | |
encode_u1_u8( // encode unsigned chars to a string of bits (1 bit per output symbol) | |
(void**)&out,&countof_output, | |
input, countof_input, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traj | |
from numpy import * | |
from pylab import * | |
data = traj.MeasurementsTable('trial.measurements').asarray() | |
dt = 0.002 # seconds per frame | |
for i in xrange(data[:,0].max()+1): | |
mask = data[:,0]==i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Load the file | |
measurements = LoadMeasurements('trial.measurements') | |
%% Set the frame rate | |
dt = 0.002; %seconds per frame | |
%% Get the data and plot | |
% Note: Be careful about the data types returned in the measurements struct. | |
% They're not all doubles. |