Commit 09014d72 authored by Sebastian Hofmann's avatar Sebastian Hofmann ☝🏽
Browse files

add STBrun_statistics

parent 943d3ea7
% ** coded by Sebastian Hofmann **
% ** s.m.hofmann@mailbox.org ** sebastian.hofmann@tuhh.de **
%
% Import all *.csv data first from DaVis (statistics from current STB run)
% (:,1) - time step
% (:,2) - number
% % (:,3) - time step
% % (:,4) - 3D particles
% % (:,5) - time step
% (:,6) - new tracks
%
% INFORMATION
% 1. Check, whether individual Track ID is in 9th column
% 2. Cartesian grid coordinate correction in last step
% 3. ENTER MANUALLY (l.55): Recording frequency in Hz fitting to experiment (252 rpm: 420 Hz; 450 rpm: 525 Hz)
alg_252 = StatisticsJC3500252rpm16c5v6(:,:);
alg_450 = StatisticsJC3500450rpm16c5v2(:,:);
pe_252 = StatisticsPE180252rpm14mlv20001(:,:);
pe_450 = StatisticsPE180450rpm14ml0001(:,:);
alg_252_avg_num = mean(alg_252(:,2))
alg_252_avg_new = mean(alg_252(:,6))
alg_450_avg_num = mean(alg_450(:,2))
alg_450_avg_new = mean(alg_450(:,6))
pe_252_avg_num = mean(pe_252(:,2))
pe_252_avg_new = mean(pe_252(:,6))
pe_450_avg_num = mean(pe_450(:,2))
pe_450_avg_new = mean(pe_450(:,6))
%% Save data in one .mat file
fname = sprintf('graph_DaVis_STBrun_stats_all_252rpm_450rpm'); % Enter filename here!
fpath = sprintf('C:/Users/sm1sh/Matlab/PTV_ResultsSH/Results_Paper'); % Enter filepath here!
save(strcat(fpath,'./',fname,'.mat'),...
'alg_252','alg_450','pe_252','pe_450')
%% Load .mat file with separated tracks
[FileName,FilePath] = uigetfile('*.mat','Select the .mat file', ...
'./','MultiSelect', 'off');
load(strcat(FilePath,FileName));
%% Create plots
figure(1)
g1 = semilogy(alg_252(1:50:end,1),alg_252(1:50:end,2),...
"<",'MarkerEdgeColor',[0.75 0.75 0],'MarkerSize',5)
hold on
g2 = semilogy(alg_252(1:50:end,1),alg_252(1:50:end,6),...
">",'MarkerEdgeColor',[0.75 0.75 0],'MarkerSize',5)
g3 = semilogy(alg_450(1:50:end,1),alg_450(1:50:end,2),...
"^",'MarkerEdgeColor',[0.75 0.75 0],'MarkerSize',6)
g4 = semilogy(alg_450(1:50:end,1),alg_450(1:50:end,6),...
"v",'MarkerEdgeColor',[0.75 0.75 0],'MarkerSize',6)
g5 = semilogy(pe_252(1:50:end,1),pe_252(1:50:end,2),...
".",'MarkerEdgeColor','blue','MarkerSize',12)
g6 = semilogy(pe_252(1:50:end,1),pe_252(1:50:end,6),...
"*",'MarkerEdgeColor','blue','MarkerSize',5)
g7 = semilogy(pe_450(1:50:end,1),pe_450(1:50:end,2),...
"x",'MarkerEdgeColor','blue','MarkerSize',8)
g8 = semilogy(pe_450(1:50:end,1),pe_450(1:50:end,6),...
"+",'MarkerEdgeColor','blue','MarkerSize',5)
hold off
grid on
xlim([0 3000])
ylim([0 2*10^4])
axes = gca;
axes.FontSize = 16;
xlabel("Time step / frame",'FontSize',19,'interpreter','latex');
ylabel("Number / -",'FontSize',21,'interpreter','latex');
legend([g5 g7 g1 g3 g6 g8 g2 g4],{
'3D: 180 µm, 1000 kg m^{-3}, 252 rpm',...
'3D: 180 µm, 1000 kg m^{-3}, 450 rpm',...
'3D: 732 µm, 1024 kg m^{-3}, 252 rpm',...
'3D: 732 µm, 1024 kg m^{-3}, 450 rpm',...
'new: 180 µm, 1000 kg m^{-3}, 252 rpm',...
'new: 180 µm, 1000 kg m^{-3}, 450 rpm',...
'new: 732 µm, 1024 kg m^{-3}, 252 rpm',...
'new: 732 µm, 1024 kg m^{-3}, 450 rpm',...
},...
'FontSize',12,'Location','Northeast')
%SH%%#%%%%%%%%%%%%%%%%#%%%%%%%####
%%%%%%%%%%%%#%v~~~~~~\%%%#%%%%%%%%
%%%%%%%#%%%%v' ~~~~\%%%%%%%
%%%%#%%%%%%v'dHHb a%%%#%%%%%%
%%%%%%%#%%v'dHHHA :%%%%%%#%%%%
%%%%%#%%%v' VHHHHaadHHb:%#%%%%%%%%
%%%%%%%#v' `VHHHHHHHHb:%%%%%#%%%
%%%#%%%v' `VHHHHHHH:%%%#%%%%%
%%%%%%%' dHHHHHHH:%%#%%%%%%
%%%%#%% dHHHHHHHH:%%%%%%%%%
%%%%%%% dHHHHHHHHH:%%#%%%%%%
%%#%%%% VHHHHHHHHH:%%%%%#%%%
%%%%%%# b HHHHHHHHV:%%%#%%#%%
%%%%%%% Hb HHHHHHHV'%%%%%%%%%%
%%%%#%% HH dHHHHHHV'%%%#%%%%%%%
%%%#%%% VHbdHHHHHHV'#%%%%%%%%%%%
%%%%%#% VHHHHHHHV'%%%%%#%%#%%%%
%%%#%%%% VHHHHHHH:%%#%%#%%#%%#%
%%#%%#%%#%%#%%#%%#%%#%%#%%#%%#%%#%
%%#%%#%%#%%#%%#%%#%%#%%#%%#%%#%IMS
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment