Lab book for Zebrafish experiments

June 20, 2012

Fit of the Bayesian model to the ant-shortcuts data

Filed under: AntShortcuts — alperezescudero @ 6:11 pm

Name of this file: Cuaderno20120620T101255.m

I do the fit more or less by hand, looking at the errors as a function of a single parameter.

load datos_shortcuts

% a=10.^(-3:.2:3);
% s=1+10.^(-3:.2:3);
% k=0:.05:1;
% p_rand=0:.05:1;
% % caca
% tic
% histog_exp=datos.histog(:,1:3);
% for c_casos=1:3
% histog_exp(:,c_casos)=histog_exp(:,c_casos)/sum(histog_exp(:,c_casos));
% end
% clear errores
% for c_params=1:length(a)
% for c_casos=1:3
% [prop,ramaelegida]=simulahormigas(.5,datos.r(c_casos),20,5,1.063,1,.1,50);
% histog_act=hist(prop,datos.bins)’;
% histog_act=histog_act/sum(histog_act);
% errores(c_params,c_casos)=mean(abs(histog_act-histog_exp(:,c_casos)));
% end
% end
% toc

Best fit

for c_casos=1:3
[prop,ramaelegida]=simulahormigas(.5,datos.r(c_casos),20,5,1.06,1,.1,100);
histog_act=hist(prop,datos.bins)’;
histog_act=histog_act/sum(histog_act);
figure
bar(datos.bins,histog_exp(:,c_casos))
hold on
plot(datos.bins,histog_act,’r’)
ylim([0 1])
end

 

 

 

Quite bad.

Extract data from the paper

Filed under: AntShortcuts — alperezescudero @ 6:05 pm

Name of this file: Cuaderno20120620T100017.m

The paper is Goss, Aaron, Deneubourg, Pasteels (1989) Self-organized shortcuts in the Argentine ant. I extract the data from the experimental histograms (boxes e-h).

Extract data

pwd
% imagen=imread(‘FiguraPaper.png’);
% image(imagen)
% axis image
% n=[26 18 14 18]; % Número de experimentos
% clear histog
% for c_casos=1:4
% title(‘Select limits of y axis’)
% [x,y_lim]=ginput(2);
% title(‘Select the top of the 5 bars’)
% [x,y_barras]=ginput(5);
% prop=(abs(y_barras-max(y_lim)))/abs(diff(y_lim));
% histog(1:5,c_casos)=round(prop*n(c_casos));
% end % c_casos
% sum(histog)-n

ans =
F:\Hipertec\CollectiveBehavior\antshortcuts

Good!

Save data

% datos.bins=(.1:.2:.9)’;
% datos.histog=histog;
% datos.r=[1 1.4 2 2];
% datos.reversal=[0 0 0 1];
% save datos_shortcuts datos

Zebrafish free-swimming videos to test personalities. Day 2

Filed under: Experiments — alperezescudero @ 4:21 pm

T=26.8ºC according to acclimatizer.

T= 25.6ºC according to black thermometer.

One fish in the adultos4 group is dead. I remove it. I will keep calling this group adultos4, although now it only has 3 fish.

>> camara=videoinput(‘dcam’,1,’F7_Y8_1280x1024′);
camaraint=camara.Source;
camaraint.Gain=150;
preview_util(camara)
>> camara2roi(camara)
>> camara.ROIPosition
ans =
144 33 1128 935

First video (Alevines7):

>> datestr(now,30), grabavideos_logmanual(camara,’D:\Zebrafish\20120620\Alevines7\Alevines7′,20*60)
ans =
20120620T154839

Second video (Adultos3):

>> datestr(now,30), grabavideos_logmanual(camara,’D:\Zebrafish\20120620\Adultos3\Adultos3′,20*60)
ans =
20120620T162101

Third video (Adultos4):

>> datestr(now,30), grabavideos_logmanual(camara,’D:\Zebrafish\20120620\Adultos4\Adultos4′,20*60)
ans =
20120620T164557

Blog at WordPress.com.