To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 693842fa authored by remartin's avatar remartin
Browse files

Logfiles from testing, matlab file used and resulting plots.

parent 6f2133db
% Copyright (C) 2018, ETH Zurich, D-ITET
% Martin Reinhard remartin @ee.ethz.ch
%
% This file is part of D-FaLL-System.
%
% D-FaLL-System is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% D-FaLL-System is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with D-FaLL-System. If not, see <http:%www.gnu.org/licenses/>.
%
%
% ----------------------------------------------------------------------------------
% DDDD FFFFF L L SSSS Y Y SSSS TTTTT EEEEE M M
% D D F aaa L L S Y Y S T E MM MM
% D D --- FFFF a a L L --- SSS Y SSS T EEE M M M
% D D F a aa L L S Y S T E M M
% DDDD F aa a LLLL LLLL SSSS Y SSSS T EEEEE M M
%
%
% DESCRIPTION:
% Matlab script to generate fancy plots.
% Enable/disable interpolation on lines 71-88.
%
% ----------------------------------------------------------------------------------
clear all; close all; clc;
versuch = 'F';
Table_DMX = readtable(['loggedPanValues_' versuch '.txt']);
Table_I = readtable(['loggedIntensityValues_' versuch '.txt']);
% A more reasonable time scale:
% convert 'global nanoseconds' to 'second since start of the experiment'
t0 = min(Table_DMX{2,1}, Table_I{2,1})
Table_DMX{2:end,1} = (Table_DMX{2:end,1}-t0)/1e9;
Table_I{2:end,1} = (Table_I{2:end,1}-t0)/1e9;
figure
yyaxis left;
dmx = Table_DMX{2:end,2};
time_dmx = Table_DMX{2:end,1};
plot(time_dmx, dmx,'-');
ylabel('DMX Value');
ylim([0 1.5*max(dmx)]);
yyaxis right;
intensity = Table_I{2:end,2};
time_intensity = Table_I{2:end,1};
plot(time_intensity, intensity);
ylabel('Normed Intensity');
% determine central DMX value at middle of FWHM
hold on;
halfMax = (min(intensity(intensity>0)) + max(intensity))/2;
below = true(1);
alpha = 1;
omega = 1;
candidates = [];
for lieu = 1:1:length(intensity)
if(below && intensity(lieu) > halfMax)
alpha = lieu;
below = ~below;
elseif (~below && intensity(lieu) < halfMax)
omega = lieu;
middle = round(alpha + (omega-alpha)/2);
below = ~below;
yyaxis right;
plot(time_intensity([alpha omega]), halfMax*ones(1,2), 'x:k')
% stem(time_intensity(middle), dmx(middle + offset))
[useless soughtIndex] = min(abs(time_intensity(middle)-time_dmx));
candidates = [candidates dmx(soughtIndex)];
yyaxis left;
stem(time_dmx(soughtIndex), dmx(soughtIndex), ':k');
end
end
ResultingDMXValue = sum(candidates)/length(candidates)
% get title from first line in the file:
fid = fopen(['loggedPanValues_' versuch '.txt'],'r');
firstRow = textscan(fid, '%s ', 'delimiter', ' ', 'MultipleDelimsAsOne', 1);
temp = firstRow {1,1};
titleThing = [temp{4} ' ' temp{5} ' ' temp{6} ' ' temp{7} ' ' temp{8} ' ' temp{9} ' ' temp{10} ];
title(titleThing);
xlabel('Time [seconds]');
saveas(gcf, ['Versuch_' versuch '.png']); % get current figure...
%saveas(gcf, 'globi.png'); % get current figure...
time Normed Intensity
1532608539385627478 128
1532608539395479308 129
1532608539405478823 130
1532608539415478479 130
1532608539425479547 132
1532608539435478000 125
1532608539445480664 129
1532608539455478658 126
1532608539465478192 138
1532608539475479281 129
1532608539485478347 129
1532608539495476311 128
1532608539505477597 134
1532608539515478064 128
1532608539525477995 142
1532608539535478208 127
1532608539545475015 126
1532608539555475059 135
1532608539565477077 145
1532608539575478233 125
1532608539585477512 141
1532608539595478056 126
1532608539605476157 129
1532608539615477545 125
1532608539625477334 129
1532608539635477299 126
1532608539645476796 142
1532608539655477229 126
1532608539665476833 130
1532608539675479742 125
1532608539685478783 129
1532608539695479867 127
1532608539705468476 128
1532608539715476739 126
1532608539725477676 128
1532608539735479262 127
1532608539745478809 128
1532608539755479050 136
1532608539765472655 126
1532608539775478661 131
1532608539785460906 127
1532608539795474559 125
1532608539805475807 140
1532608539815475389 138
1532608539825476020 129
1532608539835476365 135
1532608539845476999 127
1532608539855476729 138
1532608539865476805 128
1532608539875476589 128
1532608539885476639 125
1532608539895476367 120
1532608539905476600 131
1532608539915466212 126
1532608539925476679 127
1532608539935477745 122
1532608539945477262 131
1532608539955476103 127
1532608539965469221 142
1532608539975470220 138
1532608539985475746 130
1532608539995476030 126
1532608540005475593 122
1532608540015340343 134
1532608540025349862 126
1532608540035339744 125
1532608540045326591 137
1532608540055350623 134
1532608540065349436 126
1532608540075350255 127
1532608540085349361 141
1532608540095349224 128
1532608540105339412 138
1532608540115340541 128
1532608540125342839 127
1532608540135343156 137
1532608540145338173 140
1532608540155342482 125
1532608540165342416 132
1532608540175343130 125
1532608540185342200 125
1532608540195342707 153
1532608540205342208 126
1532608540215341749 134
1532608540225362297 151
1532608540235346677 132
1532608540245345955 127
1532608540255345681 126
1532608540265344565 124
1532608540275345584 127
1532608540285347065 127
1532608540295345541 141
1532608540305345609 130
1532608540315339871 127
1532608540325345705 132
1532608540335346129 125
1532608540345345348 125
1532608540355345568 125
1532608540365345160 170
1532608540375344325 125
1532608540385349436 123
1532608540395348595 141
1532608540405347285 126
time DMX pan Dataset with 255 brightness, 200 zoom, 18.5294 rad.
1532971141357698756 155.292
1532971141391161421 155.583
1532971141424621705 155.875
1532971141458090849 156.167
1532971141491589872 156.458
1532971141525161891 156.75
1532971141558648557 157.042
1532971141592143159 157.333
1532971141625766370 157.625
1532971141659535254 157.917
1532971141692997727 158.208
1532971141726478891 158.5
1532971141759947619 158.792
1532971141793417652 159.083
1532971141826954003 159.375
1532971141860797656 159.667
1532971141894316227 159.958
1532971141927939134 160.25
1532971141961422094 160.542
1532971141994901274 160.833
1532971142028388227 161.125
1532971142061849789 161.417
1532971142095308077 161.708
1532971142128787342 162
1532971142162292194 162.292
1532971142196005930 162.583
1532971142229501118 162.875
1532971142262957878 163.167
1532971142296433539 163.458
1532971142329899626 163.75
1532971142363364248 164.042
1532971142396879723 164.333
1532971142430590215 164.625
1532971142464237094 164.917
1532971142497980120 165.208
1532971142531553752 165.5
1532971142565026324 165.792
1532971142598516039 166.083
1532971142631995759 166.375
1532971142665588093 166.667
1532971142699050709 166.958
1532971142732519422 167.25
1532971142765977533 167.542
1532971142799445350 167.833
1532971142832977274 168.125
1532971142866672827 168.417
1532971142900131662 168.708
1532971142933583471 169
1532971142967049430 169.292
1532971143000522793 169.583
1532971143033981077 169.875
1532971143067438929 170.167
1532971143100893348 170.458
1532971143134351854 170.75
1532971143167831988 171.042
1532971143201282369 171.333
1532971143234732289 171.625
1532971143268184965 171.917
1532971143301647140 172.208
1532971143335102874 172.5
1532971143368564398 172.792
1532971143402030105 173.083
1532971143435491615 173.375
1532971143468979347 173.667
1532971143502431370 173.958
1532971143535891351 174.25
1532971143569290346 174.542
1532971143602740278 174.833
1532971143636208048 175.125
1532971143669666508 175.417
1532971143703256857 175.708
1532971143736863486 176
1532971143770318211 176.292
1532971143803799602 176.583
1532971143837442670 176.875
1532971143870905808 177.167
1532971143904360432 177.458
1532971143937825115 177.75
1532971143971277644 178.042
1532971144004760571 178.333
1532971144038270875 178.625
1532971144071728430 178.917
1532971144105258549 179.208
1532971144139323619 179.5
1532971144172775487 179.792
1532971144206245121 180.083
1532971144239726320 180.375
1532971144273181575 180.667
1532971144306630103 180.958
1532971144340092917 181.25
1532971144373630232 181.542
1532971144407459511 181.833
1532971144441724949 182.125
1532971144475522090 182.417
1532971144509234305 182.708
1532971144542884767 183
1532971144576391989 183.292
1532971144609882221 183.583
1532971144643349717 183.875
1532971144676817548 184.167
1532971144710297870 184.458
1532971144743986661 184.75
1532971144777651247 185.042
1532971144811251873 185.333
1532971144844703985 185.625
1532971144879769211 185.917
1532971144913423395 186.208
1532971144946887919 186.5
1532971144980340560 186.792
1532971145013826917 187.083
1532971145047281595 187.375
1532971145080748311 187.667
1532971145114198136 187.958
1532971145147665392 188.25
1532971145181082440 188.542
1532971145214562195 188.833
1532971145248397519 189.125
1532971145281875793 189.417
1532971145315335217 189.708
1532971145348862438 190
1532971145383377153 189.708
1532971145417191064 189.417
1532971145450849138 189.125
1532971145486647262 188.833
1532971145520110611 188.542
1532971145553583119 188.25
1532971145587063748 187.958
1532971145620516941 187.667
1532971145654016708 187.375
1532971145687474285 187.083
1532971145720951571 186.792
1532971145754421029 186.5
1532971145787889471 186.208
1532971145821362195 185.917
1532971145854826416 185.625
1532971145888462731 185.333
1532971145922116508 185.042
1532971145955580367 184.75
1532971145989051291 184.458
1532971146022505111 184.167
1532971146055979482 183.875
1532971146089421411 183.583
1532971146122885090 183.292
1532971146156333354 183
1532971146189799598 182.708
1532971146223254068 182.417
1532971146256727259 182.125
1532971146290181476 181.833
1532971146323645171 181.542
1532971146357203845 181.25
1532971146390670556 180.958
1532971146424126955 180.667
1532971146457582498 180.375
1532971146491037839 180.083
1532971146524496697 179.792
1532971146557961408 179.5
1532971146591420632 179.208
1532971146624879604 178.917
1532971146658343351 178.625
1532971146691799502 178.333
1532971146725272338 178.042
1532971146758756044 177.75
1532971146792216707 177.458
1532971146825669609 177.167
1532971146859144908 176.875
1532971146892607898 176.583
1532971146926099514 176.292
1532971146959802953 176
1532971146993248453 175.708
1532971147026714403 175.417
1532971147060329765 175.125
1532971147093781084 174.833
1532971147127242338 174.542
1532971147160709174 174.25
1532971147194166039 173.958
1532971147227623555 173.667
1532971147261076025 173.375
1532971147294533688 173.083
1532971147328013625 172.792
1532971147361472188 172.5
1532971147394937084 172.208
1532971147428384471 171.917
1532971147461847555 171.625
1532971147495315941 171.333
1532971147528789120 171.042
1532971147562271746 170.75
1532971147595735261 170.458
1532971147629183017 170.167
1532971147662648862 169.875
1532971147696109037 169.583
1532971147729575396 169.292
1532971147763027517 169
1532971147796506666 168.708
1532971147829967522 168.417
1532971147863426156 168.125
1532971147896909664 167.833
1532971147930357109 167.542
1532971147963789973 167.25
1532971147997251194 166.958
1532971148030717877 166.667
1532971148064139851 166.375
1532971148097580186 166.083
1532971148131064757 165.792
1532971148164541008 165.5
1532971148198032336 165.208
1532971148231489836 164.917
1532971148264967194 164.625
1532971148298624130 164.333
1532971148332080559 164.042
1532971148365559650 163.75
1532971148399038228 163.458
1532971148432510729 163.167
1532971148465970640 162.875
1532971148499451078 162.583
1532971148532913458 162.292
1532971148566362393 162
1532971148599831587 161.708
1532971148633297448 161.417
1532971148666749338 161.125
1532971148700208584 160.833
1532971148733673858 160.542
1532971148767155658 160.25
1532971148800825661 159.958
1532971148834291670 159.667
1532971148867753798 159.375
1532971148901218361 159.083
1532971148934670980 158.792
1532971148968160540 158.5
1532971149001632903 158.208
1532971149035099024 157.917
1532971149068569685 157.625
1532971149102041564 157.333
1532971149135507508 157.042
1532971149168973715 156.75
1532971149202447492 156.458
1532971149235900760 156.167
1532971149269348386 155.875
1532971149302811547 155.583
1532971149336266568 155.292
1532971149369718555 155
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