diff --git a/Howto.PNG b/Howto.PNG new file mode 100644 index 0000000..8ec62aa Binary files /dev/null and b/Howto.PNG differ diff --git a/HowtoPP.png b/HowtoPP.png index eeded54..50de956 100644 Binary files a/HowtoPP.png and b/HowtoPP.png differ diff --git a/Main_v1.asv b/Main_v1.asv index 07269d8..670fa51 100644 --- a/Main_v1.asv +++ b/Main_v1.asv @@ -1,157 +1,139 @@ -function []= Main_v1(name,percentage,pagename,projectname,removefrequ,removefrequ2,lowp,highp,coeff,dele, del_pump,harmo1,harmo2,harmo3,log,norm,save_post,rel,reorder,reorder_bool,Bandstop1_s,Bandstop2_s, del_s_p, lowpass_s,highpass_s,exception_bool,MP_ref_bool, MP_ref) +function []= Main_v1(name,percentage,pagename,projectname,removefrequ,removefrequ2,lowp,highp,coeff,dele, del_pump,log,norm,save_post,rel,reorder,reorder_bool,Bandstop1_s,Bandstop2_s, del_s_p, lowpass_s,highpass_s,exception_bool,MP_ref_bool, MP_ref,folder) %% The main function is called by interface v1. It will : % - read the tdms file in the read function % - operate the fourier transform and calculate the pressure fluctuations % in the calculate function % - write the results in a pdf in the latex function % - write the summary file in the excel function -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%% Load data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 2.1 Initialize wait bar fig_wait = uifigure(); fig_wait.Position = [500 500 400 175]; d= uiprogressdlg(fig_wait,'Cancelable','on','Title','Post processing - Pressure Fluctuations','Icon',... 'warning','Message','Initialisation and Loading','ShowPercentage','on','Indeterminate','on'); pause(5) -%% find special character in the projectname ( a dot space or underscore can't be in a file name) -try +%% 2.2 remove special character projectname_title =projectname; % projectname_title will be the one appering in the pdf titles. k=strfind(projectname,'.'); k2=strfind(projectname,' '); k3=strfind(projectname,'_'); k4=strfind(projectname,'$'); projectname(k)='-'; projectname(k2)='-'; projectname(k3)='-'; projectname_title(k3)='-'; projectname(k4)='D'; projectname_title(k4)='D'; - - myprogress3(d,0.10,'Detection TDMS File','info','off') -[nb,dat_cp,freq,time,MP,n11,Q11,sigma,nm,hm,Hp,alpha,Em,rho,Pp,Qp,coeff_n,coeff_q,channel,folder,folder_results,folder_save, F_pump, F_pump2, nbsensor, length_sig, date1]=read_v1(name,coeff,projectname,reorder_bool,reorder); +[nb,dat_cp,freq,time,MP,n11,Q11,sigma,nm,hm,Hp,alpha,Em,rho,Pp,Qp,coeff_n,coeff_q,channel,folder_results,folder_save, F_pump, F_pump2, nbsensor, length_sig, date1]=read_v1(name,coeff,projectname,reorder_bool,reorder,folder); +if isdeployed catch f = errordlg('Error in read function','File Error'); return end +end myprogress3(d,0.20,'Saving Configuration File','','') %% Save config file txt file in the pdf folder % THe config file summarizes the options for the treatments of the PP. slash=find(name=='\'); l=max(slash); folder_res=name(1:(l-1)); folder_config = [folder_res, '\PDF']; myprogress3(d,0.25,'Calculation and plotting..','','') % remove_frequ= str2double(removefrequ); name_t = { 'percentage'; 'lowpass '; 'highpass '; 'remove frequ';'remove pump frequ (1=yes, 0 = no)'}; value_t={num2str(percentage); num2str(lowp); num2str(highp); removefrequ; del_pump}; T=table(name_t, value_t); writetable(T,[folder_config,'\configu.txt']) % hForm = gcf; % set(0, 'CurrentFigure', f1); % set(0, 'CurrentFigure', hForm); % H = awaitbar(.1,'Calculating and plotting...') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% PART 2 calculate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% myprogress3(d,0.25,'Calculation and plotting..','','') try -[dh_max, dh_min, dh_f, dh_pp, r_f,fdom]=calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump,F_pump2,harmo1,harmo2,harmo3,log,norm,MP,projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool); +[dh_max, dh_min, dh_f, dh_pp, r_f,fdom]=calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump,F_pump2,log,norm,MP,projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool); catch f = errordlg('Error in calculate function','File Error'); return end % hForm = gcf; % set(0, 'CurrentFigure', f1); % H = awaitbar(.5,'Latex...') % set(0, 'CurrentFigure', hForm); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% PART 3 write pdf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % waitbar(.67,f,'Creating the latex'); myprogress3(d,0.8,'Creation of PDF Files','','') try latex_v2(pagename,projectname,nb,nbsensor,percentage,MP,alpha,nm,n11,Q11,hm,sigma,date1,dh_max,dh_min,dh_pp,fdom,dh_f,r_f,channel,folder,coeff_n,coeff_q,folder_results,projectname_title) catch f = errordlg('Error in latex function','File Error'); return end % hForm = gcf; % set(0, 'CurrentFigure', f1); % H = awaitbar(.9,'Excel...') % set(0, 'CurrentFigure', hForm); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%% PART 4 write excel %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % waitbar(.95,f,'Writing excel'); %% Excelwrite myprogress3(d,0.9,'Creation of Excel files','','') +try excel_v2(folder_save,dh_max,dh_min,dh_pp,fdom,dh_f, r_f, coeff,nb,MP,alpha,n11,Q11,nm,hm,sigma,Hp,Qp,Pp,nbsensor,folder_results, projectname,pagename,date1,channel,projectname_title,MP_ref_bool,MP_ref) - - - catch f = errordlg('Error in excel function','File Error'); return end -% set(0, 'CurrentFigure', f1); - -%% Delete non final documents - -% fclose('all') -% -% whichfolder = '\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Results'; -% dinfo = dir(fullfile(whichfolder,'*.*')); -% for K = 1 : length(dinfo) -% thisfile = fullfile(whichfolder, dinfo(K).name); -% delete(thisfile); -% end -% rmdir( '\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Results\images','s') - - -% rmdir( '\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Results','s') -% mkdir('\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Results') -% copyfile('\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Logos','\\lmhnas2\Gem\Matlab\PP modeles\Matlab\Results\Logos') -% cd('\\lmhnas2\Gem\Matlab\PP modeles\Matlab') - %% Inform user that the post treatment is finished close(fig_wait) + + figconfirm = uifigure; + figconfirm.Position = [500 500 400 175]; + selection = uiconfirm(figconfirm,'The post processing has been effectuated with success.','Post processing - Pressure Fluctuations',... + 'Icon','success') + + end diff --git a/Main_v1.m b/Main_v1.m index 4fd75af..1ab1e4a 100644 --- a/Main_v1.m +++ b/Main_v1.m @@ -1,142 +1,104 @@ -function []= Main_v1(name,percentage,pagename,projectname,removefrequ,removefrequ2,lowp,highp,coeff,dele, del_pump,harmo1,harmo2,harmo3,log,norm,save_post,rel,reorder,reorder_bool,Bandstop1_s,Bandstop2_s, del_s_p, lowpass_s,highpass_s,exception_bool,MP_ref_bool, MP_ref) +function []= Main_v1(name,percentage,pagename,projectname,removefrequ,removefrequ2,lowp,highp,coeff,dele, del_pump,log,norm,save_post,rel,reorder,reorder_bool,Bandstop1_s,Bandstop2_s, del_s_p, lowpass_s,highpass_s,exception_bool,MP_ref_bool, MP_ref,folder) %% The main function is called by interface v1. It will : % - read the tdms file in the read function % - operate the fourier transform and calculate the pressure fluctuations % in the calculate function % - write the results in a pdf in the latex function % - write the summary file in the excel function -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%% Load data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 2.1 Initialize wait bar fig_wait = uifigure(); fig_wait.Position = [500 500 400 175]; d= uiprogressdlg(fig_wait,'Cancelable','on','Title','Post processing - Pressure Fluctuations','Icon',... 'warning','Message','Initialisation and Loading','ShowPercentage','on','Indeterminate','on'); pause(5) -%% find special character in the projectname ( a dot space or underscore can't be in a file name) -try +%% 2.2 remove special character projectname_title =projectname; % projectname_title will be the one appering in the pdf titles. k=strfind(projectname,'.'); k2=strfind(projectname,' '); k3=strfind(projectname,'_'); k4=strfind(projectname,'$'); projectname(k)='-'; projectname(k2)='-'; projectname(k3)='-'; projectname_title(k3)='-'; projectname(k4)='D'; projectname_title(k4)='D'; +%% 2.3 call read fct - - myprogress3(d,0.10,'Detection TDMS File','info','off') - -[nb,dat_cp,freq,time,MP,n11,Q11,sigma,nm,hm,Hp,alpha,Em,rho,Pp,Qp,coeff_n,coeff_q,channel,folder,folder_results,folder_save, F_pump, F_pump2, nbsensor, length_sig, date1]=read_v1(name,coeff,projectname,reorder_bool,reorder); -catch -f = errordlg('Error in read function','File Error'); -return -end +% try +[nb,dat_cp,freq,time,MP,n11,Q11,sigma,nm,hm,Hp,alpha,Em,rho,Pp,Qp,coeff_n,coeff_q,channel,folder_results,folder_save, F_pump, F_pump2, nbsensor, length_sig, date1]=read_v1(name,coeff,projectname,reorder_bool,reorder,folder); +% catch +% f = errordlg('Error in read function','File Error'); +% return +% end myprogress3(d,0.20,'Saving Configuration File','','') - -%% Save config file txt file in the pdf folder +%% 2.4 Save config file % THe config file summarizes the options for the treatments of the PP. slash=find(name=='\'); l=max(slash); folder_res=name(1:(l-1)); folder_config = [folder_res, '\PDF']; myprogress3(d,0.25,'Calculation and plotting..','','') % remove_frequ= str2double(removefrequ); name_t = { 'percentage'; 'lowpass '; 'highpass '; 'remove frequ';'remove pump frequ (1=yes, 0 = no)'}; value_t={num2str(percentage); num2str(lowp); num2str(highp); removefrequ; del_pump}; T=table(name_t, value_t); writetable(T,[folder_config,'\configu.txt']) - -% hForm = gcf; -% set(0, 'CurrentFigure', f1); -% set(0, 'CurrentFigure', hForm); -% H = awaitbar(.1,'Calculating and plotting...') - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%% PART 2 calculate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 2.5 Call calculate fct myprogress3(d,0.25,'Calculation and plotting..','','') try -[dh_max, dh_min, dh_f, dh_pp, r_f,fdom]=calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump,F_pump2,harmo1,harmo2,harmo3,log,norm,MP,projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool); +[dh_max, dh_min, dh_f, dh_pp, r_f,fdom]=calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump,F_pump2,log,norm,MP,projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool); catch f = errordlg('Error in calculate function','File Error'); return end -% hForm = gcf; -% set(0, 'CurrentFigure', f1); - -% H = awaitbar(.5,'Latex...') -% set(0, 'CurrentFigure', hForm); -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%% PART 3 write pdf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% waitbar(.67,f,'Creating the latex'); + +%% 2.6 Call latex fct + myprogress3(d,0.8,'Creation of PDF Files','','') try latex_v2(pagename,projectname,nb,nbsensor,percentage,MP,alpha,nm,n11,Q11,hm,sigma,date1,dh_max,dh_min,dh_pp,fdom,dh_f,r_f,channel,folder,coeff_n,coeff_q,folder_results,projectname_title) catch f = errordlg('Error in latex function','File Error'); return end - % hForm = gcf; -% set(0, 'CurrentFigure', f1); - -% H = awaitbar(.9,'Excel...') -% set(0, 'CurrentFigure', hForm); -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%% PART 4 write excel %%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% waitbar(.95,f,'Writing excel'); -%% Excelwrite + +%% 2.7 Call Excel fct + myprogress3(d,0.9,'Creation of Excel files','','') try excel_v2(folder_save,dh_max,dh_min,dh_pp,fdom,dh_f, r_f, coeff,nb,MP,alpha,n11,Q11,nm,hm,sigma,Hp,Qp,Pp,nbsensor,folder_results, projectname,pagename,date1,channel,projectname_title,MP_ref_bool,MP_ref) catch f = errordlg('Error in excel function','File Error'); return end %% Inform user that the post treatment is finished close(fig_wait) figconfirm = uifigure; figconfirm.Position = [500 500 400 175]; selection = uiconfirm(figconfirm,'The post processing has been effectuated with success.','Post processing - Pressure Fluctuations',... 'Icon','success') end diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/PP_routine.exe similarity index 92% copy from PP_routine/for_redistribution_files_only/PP_routine.exe copy to PP_routine.exe index 025062b..b7e5678 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/PP_routine.exe differ diff --git a/PP_routine.prj b/PP_routine.prj index 43805ba..3b0991c 100644 --- a/PP_routine.prj +++ b/PP_routine.prj @@ -1,175 +1,177 @@ PP_routine - 2.0 - Dre and Brg - etienne.dorz@epfl.ch + 3.1 + + \PP_routine\ option.installpath.programfiles ${PROJECT_ROOT}\PP_routine\for_testing ${PROJECT_ROOT}\PP_routine\for_redistribution_files_only ${PROJECT_ROOT}\PP_routine\for_redistribution ${PROJECT_ROOT}\PP_routine false subtarget.standalone true false false MyAppInstaller_web MyAppInstaller_mcr MyAppInstaller_app true false false false Syntax -? Input Arguments -? print help on how to use the application input arguments + + ${PROJECT_ROOT}\interface_v1_App.mlapp ${PROJECT_ROOT}\calculate_v5.m ${PROJECT_ROOT}\EPFL2.png ${PROJECT_ROOT}\excel_v2.m ${PROJECT_ROOT}\Folder_icon.png ${PROJECT_ROOT}\icon_info.png ${PROJECT_ROOT}\latex_v2.m ${PROJECT_ROOT}\Load2_icon.png ${PROJECT_ROOT}\Logo_PTMH.png ${PROJECT_ROOT}\Main_v1.m ${PROJECT_ROOT}\myprogress3.m ${PROJECT_ROOT}\PTMH_Icon.png ${PROJECT_ROOT}\read_v1.m ${PROJECT_ROOT}\save2pdf.m ${PROJECT_ROOT}\Sxx_Function_Local.m ${PROJECT_ROOT}\v2p5\TDMS_getDataSize.m ${PROJECT_ROOT}\v2p5\TDMS_getDataTypeName.m ${PROJECT_ROOT}\v2p5\TDMS_getGroupChanNames.m ${PROJECT_ROOT}\v2p5\TDMS_getPropValue.m ${PROJECT_ROOT}\v2p5\TDMS_getTypeSeekSizes.m ${PROJECT_ROOT}\v2p5\TDMS_handleGetDataOption.m ${PROJECT_ROOT}\v2p5\TDMS_initData.m ${PROJECT_ROOT}\v2p5\TDMS_preprocessFile.m ${PROJECT_ROOT}\v2p5\TDMS_processLeadIn.m ${PROJECT_ROOT}\v2p5\TDMS_readFileHelper_v1.m ${PROJECT_ROOT}\v2p5\TDMS_readFileHelper_v2.m ${PROJECT_ROOT}\v2p5\TDMS_readTDMSFile.m D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\splash.png D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\readme.txt D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\PP_routine.exe C:\Program Files\MATLAB\R2020a true true true true true true false false true false false false false false 10.0 false true win64 true \ No newline at end of file diff --git a/PP_routine/PackagingLog.html b/PP_routine/PackagingLog.html index 11ebf05..3499b55 100644 --- a/PP_routine/PackagingLog.html +++ b/PP_routine/PackagingLog.html @@ -1,22 +1,22 @@
-mcc -o PP_routine -W 'WinMain:PP_routine,version=2.0' -T link:exe -d 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing' -v 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp' -r 'C:\Program Files\MATLAB\R2020a\toolbox\compiler\resources\default_icon.ico' 
+mcc -o PP_routine -W 'WinMain:PP_routine,version=3.1' -T link:exe -d 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing' -v 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp' -r 'C:\Program Files\MATLAB\R2020a\toolbox\compiler\resources\default_icon.ico' 
 Compiler version: 8.0 (R2020a)
 
 Dependency analysis by REQUIREMENTS.
 
 Warning: Your deployed application may fail because file or folder paths
 not present in the deployed environment may be included in your MATLAB startup
 file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
 determine the appropriate execution environment when including file and folder
 paths, and recompile your application.
 
 Parsing file "D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp"
 	(referenced from command line).
 Generating file "D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\readme.txt".
 Packaging...
 Creating the bundle...
 Creating the install agent URL file...
 Web based installer created at D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_redistribution\MyAppInstaller_web.exe.
 Packaging complete.
-Elapsed packaging time was: 30 seconds.
+Elapsed packaging time was: 31 seconds.
 
diff --git a/PP_routine/for_redistribution/MyAppInstaller_web.exe b/PP_routine/for_redistribution/MyAppInstaller_web.exe index f725e0b..eb0322a 100644 Binary files a/PP_routine/for_redistribution/MyAppInstaller_web.exe and b/PP_routine/for_redistribution/MyAppInstaller_web.exe differ diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/PP_routine/for_redistribution_files_only/PP_routine.exe index 025062b..b7e5678 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/PP_routine/for_redistribution_files_only/PP_routine.exe differ diff --git a/PP_routine/for_testing/PP_routine.exe b/PP_routine/for_testing/PP_routine.exe index 025062b..b7e5678 100644 Binary files a/PP_routine/for_testing/PP_routine.exe and b/PP_routine/for_testing/PP_routine.exe differ diff --git a/Results/Results/Saves/calc.mat b/Results/Results/Saves/calc.mat new file mode 100644 index 0000000..70de655 Binary files /dev/null and b/Results/Results/Saves/calc.mat differ diff --git a/Results/Results/Saves/calc_p2.mat b/Results/Results/Saves/calc_p2.mat new file mode 100644 index 0000000..4a56e7b Binary files /dev/null and b/Results/Results/Saves/calc_p2.mat differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-1.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-1.pdf new file mode 100644 index 0000000..5720ef7 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-2.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-2.pdf new file mode 100644 index 0000000..9bfaffe Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-3.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-3.pdf new file mode 100644 index 0000000..6df3b15 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-4.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-4.pdf new file mode 100644 index 0000000..cd893fb Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-5.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-5.pdf new file mode 100644 index 0000000..70aeaf9 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-6.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-6.pdf new file mode 100644 index 0000000..41bd82d Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-7.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-7.pdf new file mode 100644 index 0000000..f127ddc Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-8.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-8.pdf new file mode 100644 index 0000000..112acce Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-86-9.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-86-9.pdf new file mode 100644 index 0000000..a624add Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-86-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-1.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-1.pdf new file mode 100644 index 0000000..576c6d0 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-2.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-2.pdf new file mode 100644 index 0000000..e340fe9 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-3.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-3.pdf new file mode 100644 index 0000000..7390fdd Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-4.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-4.pdf new file mode 100644 index 0000000..d4df230 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-5.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-5.pdf new file mode 100644 index 0000000..a4fc3d6 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-6.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-6.pdf new file mode 100644 index 0000000..a0fdfba Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-7.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-7.pdf new file mode 100644 index 0000000..8880203 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-8.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-8.pdf new file mode 100644 index 0000000..e037883 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-87-9.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-87-9.pdf new file mode 100644 index 0000000..4cf7ba6 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-87-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-1.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-1.pdf new file mode 100644 index 0000000..b9704eb Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-2.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-2.pdf new file mode 100644 index 0000000..55df553 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-3.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-3.pdf new file mode 100644 index 0000000..bac054c Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-4.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-4.pdf new file mode 100644 index 0000000..1a6de37 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-5.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-5.pdf new file mode 100644 index 0000000..7f14402 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-6.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-6.pdf new file mode 100644 index 0000000..9e4ecd9 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-7.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-7.pdf new file mode 100644 index 0000000..0052ca8 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-8.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-8.pdf new file mode 100644 index 0000000..e740ede Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-88-9.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-88-9.pdf new file mode 100644 index 0000000..914b198 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-88-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-1.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-1.pdf new file mode 100644 index 0000000..f84f120 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-2.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-2.pdf new file mode 100644 index 0000000..2b2fb7f Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-3.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-3.pdf new file mode 100644 index 0000000..da78f53 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-4.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-4.pdf new file mode 100644 index 0000000..ba27829 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-5.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-5.pdf new file mode 100644 index 0000000..8584a9f Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-6.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-6.pdf new file mode 100644 index 0000000..b2c305e Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-7.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-7.pdf new file mode 100644 index 0000000..f514ecf Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-8.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-8.pdf new file mode 100644 index 0000000..33ce833 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-freqplot-MP-99-9.pdf b/Results/Results/images/tsr/tsr-freqplot-MP-99-9.pdf new file mode 100644 index 0000000..b857d99 Binary files /dev/null and b/Results/Results/images/tsr/tsr-freqplot-MP-99-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-1.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-1.pdf new file mode 100644 index 0000000..263d9c7 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-2.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-2.pdf new file mode 100644 index 0000000..107cc41 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-3.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-3.pdf new file mode 100644 index 0000000..4950fd0 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-4.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-4.pdf new file mode 100644 index 0000000..bf75283 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-5.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-5.pdf new file mode 100644 index 0000000..cdccba2 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-6.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-6.pdf new file mode 100644 index 0000000..ef998d2 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-7.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-7.pdf new file mode 100644 index 0000000..ead26d1 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-8.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-8.pdf new file mode 100644 index 0000000..1eef962 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-86-9.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-86-9.pdf new file mode 100644 index 0000000..f36840b Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-86-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-1.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-1.pdf new file mode 100644 index 0000000..13be504 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-2.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-2.pdf new file mode 100644 index 0000000..5a5e42c Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-3.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-3.pdf new file mode 100644 index 0000000..c73802f Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-4.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-4.pdf new file mode 100644 index 0000000..736431f Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-5.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-5.pdf new file mode 100644 index 0000000..9c55f7f Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-6.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-6.pdf new file mode 100644 index 0000000..f3c5e16 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-7.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-7.pdf new file mode 100644 index 0000000..a2d07c0 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-8.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-8.pdf new file mode 100644 index 0000000..39c60c4 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-87-9.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-87-9.pdf new file mode 100644 index 0000000..309e092 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-87-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-1.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-1.pdf new file mode 100644 index 0000000..6e18418 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-2.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-2.pdf new file mode 100644 index 0000000..fccd648 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-3.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-3.pdf new file mode 100644 index 0000000..7440bfa Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-4.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-4.pdf new file mode 100644 index 0000000..1dd0967 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-5.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-5.pdf new file mode 100644 index 0000000..0f98033 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-6.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-6.pdf new file mode 100644 index 0000000..a642eaa Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-7.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-7.pdf new file mode 100644 index 0000000..c3e7791 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-8.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-8.pdf new file mode 100644 index 0000000..ae03a32 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-88-9.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-88-9.pdf new file mode 100644 index 0000000..03ddc83 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-88-9.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-1.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-1.pdf new file mode 100644 index 0000000..3b80aeb Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-1.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-2.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-2.pdf new file mode 100644 index 0000000..ee3cd04 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-2.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-3.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-3.pdf new file mode 100644 index 0000000..7dc682d Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-3.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-4.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-4.pdf new file mode 100644 index 0000000..a558cec Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-4.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-5.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-5.pdf new file mode 100644 index 0000000..16e4a6e Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-5.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-6.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-6.pdf new file mode 100644 index 0000000..8de1ca4 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-6.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-7.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-7.pdf new file mode 100644 index 0000000..d4e4333 Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-7.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-8.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-8.pdf new file mode 100644 index 0000000..96603bd Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-8.pdf differ diff --git a/Results/Results/images/tsr/tsr-timeplot-MP-99-9.pdf b/Results/Results/images/tsr/tsr-timeplot-MP-99-9.pdf new file mode 100644 index 0000000..37c53fa Binary files /dev/null and b/Results/Results/images/tsr/tsr-timeplot-MP-99-9.pdf differ diff --git a/Results/Saves/calc.mat b/Results/Saves/calc.mat index 66494c6..1791ada 100644 Binary files a/Results/Saves/calc.mat and b/Results/Saves/calc.mat differ diff --git a/Results/Saves/calc_p2.mat b/Results/Saves/calc_p2.mat index 903d20f..59494df 100644 Binary files a/Results/Saves/calc_p2.mat and b/Results/Saves/calc_p2.mat differ diff --git a/calculate_v5.m b/calculate_v5.m index 189c2a6..05e1239 100644 --- a/calculate_v5.m +++ b/calculate_v5.m @@ -1,456 +1,458 @@ -function [dh_max, dh_min, dh_f, dh_pp, r_f,fdom]= calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump, F_pump2,harmo1, harmo2, harmo3,log,norm, MP, projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool) +function [dh_max, dh_min, dh_f, dh_pp, r_f,fdom]= calculate_v5(folder_save,freq,time,nb,nbsensor,dat_cp,hm,length_sig,lowp,highp,removefrequ,removefrequ2,percentage,Em,rho,nm,folder,del_pump, F_pump, F_pump2,log,norm, MP, projectname,dele,channel,save_post,folder_res,rel,lowpass_s,highpass_s,Bandstop1_s,Bandstop2_s, del_s_p, exception_bool) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%Function defintition %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %This function is called by the function main after calling the read %function. It receives a matrix dat_cp with all the pressure fluctuation %data already centered %% Here is what the function do : % - Add low pass filter to the temporal signal % - Add a high pass filter to the temporal signal % - Remove unwanted frequencies to the temporal signal % - Apply fft with proper windowing % - Delete the extremums in function of the confidence interval chosen. % - Plot and store the plot in the time domain. % - Plot and store the plot in the frequency domain. % - Calculate the data such as DH/H_max, DH/H_min DH/H_pp etc... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% filter the data %%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 4.0 if exception_bool ==1 if strcmp(lowpass_s,'all')==1 lowpass_s = [1:1:nbsensor]; else s1=split(lowpass_s,' ') lowpass_s=str2double(s1); end if strcmp(highpass_s,'all')==1 highpass_s = [1:1:nbsensor]; else s1=split(highpass_s,' ') highpass_s=str2double(s1); end if strcmp(Bandstop1_s,'all')==1 Bandstop1_s = [1:1:nbsensor]; else s1=split(Bandstop1_s,' ') Bandstop1_s=str2double(s1); end if strcmp(Bandstop2_s,'all')==1 Bandstop2_s = [1:1:nbsensor]; else s1=split(Bandstop2_s,' ') Bandstop2_s=str2double(s1); end if strcmp(del_s_p,'all')==1 del_s_p = [1:1:nbsensor]; else s1=split(del_s_p,' ') del_s_p=str2double(s1); end else lowpass_s = [1:1:nbsensor]; highpass_s = [1:1:nbsensor]; Bandstop1_s = [1:1:nbsensor]; Bandstop2_s = [1:1:nbsensor]; del_s_p = [1:1:nbsensor]; end %% 4.1 : add low pass filer lowp_exist = lowp>1; % Check if a lowpass filter if lowp_exist ==1 % if a lowpass is requested dlp = designfilt('lowpassiir','FilterOrder',7, ... % Definition of the lowpass filter 'PassbandFrequency',lowp,'PassbandRipple',0.2, ... 'SampleRate',freq); if exception_bool ==1 dat_cp_lp=dat_cp; dat_cp_lp(:,:,lowpass_s) = filtfilt(dlp,dat_cp(:,:,lowpass_s)); % Application of the lowpass filter on the data. else dat_cp_lp = filtfilt(dlp,dat_cp); % Application of the lowpass filter on the data. end else dat_cp_lp=dat_cp; % data centered, permuted and "lowpassed" end %% 4.2 add high pass filer highp_exist = highp>0; % Check if a highpass filter was demanded in GUI if highp_exist ==1 % if a highpass is requested dhp = designfilt('highpassiir','FilterOrder',7, ... % Definition of the highpass filter 'PassbandFrequency',highp,'PassbandRipple',0.2, ... 'SampleRate',freq); if exception_bool ==1 dat_cp_lp_hp=dat_cp_lp; dat_cp_lp_hp(:,:,highpass_s) = filtfilt(dhp,dat_cp_lp(:,:,highpass_s)); % Application of the lowpass filter on the data. else dat_cp_lp_hp = filtfilt(dhp,dat_cp_lp); % Application of the highpass filter on the data. end else dat_cp_lp_hp=dat_cp_lp; % data centered, permuted "lowpassed" and "highpassed" end %% 4.3 : Remove specific frequencies (50 Hz, 100 hz etc...) %The specific frequencies removal are performed in two parts % 4.3.1 : Remove specific frequencies (50 Hz, 100 hz etc...) d1=split(removefrequ,' ') delfrequ=str2double(d1); % removefrequ = the frequencies that the user ask to remove in the GUI dat_cp_lp_hp_f=dat_cp_lp_hp; % Predifine the variable if delfrequ>1 % if we want to delete specified frequencies for i=1:length(delfrequ) % The Filterorder is very important ! If set too small too much data will be removed d(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-0.5 Hz to delfrequ + 0.5 Hz 'HalfPowerFrequency1',delfrequ(i)-0.5,'HalfPowerFrequency2',delfrequ(i)+0.5, ... 'DesignMethod','butter','SampleRate',freq); dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter - if harmo1>0 % If we want to also delete the harmonic of the specified frequency. - d1(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1 Hz to delfrequ + 1 Hz - 'HalfPowerFrequency1',2*(delfrequ(i)-0.5),'HalfPowerFrequency2',2*(delfrequ(i)+0.5), ... - 'DesignMethod','butter','SampleRate',freq); - dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d1(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter - end - - if harmo2>0 - d2(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1.5 Hz to delfrequ + 1.5 Hz - 'HalfPowerFrequency1',3*(delfrequ(i)-0.5),'HalfPowerFrequency2',3*(delfrequ(i)+0.5), ... - 'DesignMethod','butter','SampleRate',freq); - dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d2(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter - end - - if harmo3>0 - d3(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-2 Hz to delfrequ + 2 Hz - 'HalfPowerFrequency1',4*(delfrequ(i)-0.5),'HalfPowerFrequency2',4*(delfrequ(i)+0.5), ... - 'DesignMethod','butter','SampleRate',freq); - dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d3(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter - end +% if harmo1>0 % If we want to also delete the harmonic of the specified frequency. +% d1(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1 Hz to delfrequ + 1 Hz +% 'HalfPowerFrequency1',2*(delfrequ(i)-0.5),'HalfPowerFrequency2',2*(delfrequ(i)+0.5), ... +% 'DesignMethod','butter','SampleRate',freq); +% dat_cp_lp_hp_f(:,:,Bands top1_s) = filtfilt(d1(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter +% end +% +% if harmo2>0 +% d2(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1.5 Hz to delfrequ + 1.5 Hz +% 'HalfPowerFrequency1',3*(delfrequ(i)-0.5),'HalfPowerFrequency2',3*(delfrequ(i)+0.5), ... +% 'DesignMethod','butter','SampleRate',freq); +% dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d2(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter +% end +% +% if harmo3>0 +% d3(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-2 Hz to delfrequ + 2 Hz +% 'HalfPowerFrequency1',4*(delfrequ(i)-0.5),'HalfPowerFrequency2',4*(delfrequ(i)+0.5), ... +% 'DesignMethod','butter','SampleRate',freq); +% dat_cp_lp_hp_f(:,:,Bandstop1_s) = filtfilt(d3(i),dat_cp_lp_hp_f(:,:,Bandstop1_s)); % Application of the filter +% end end end % 4.3.2 : Remove specific frequencies (50 Hz, 100 hz etc...) d2=split(removefrequ2,' ') delfrequ2=str2double(d2); % removefrequ = the frequencies that the user ask to remove in the GUI dat_cp_lp_hp_f2=dat_cp_lp_hp_f; % Predifine the variable if delfrequ2>1 % if we want to delete specified frequencies for i=1:length(delfrequ2) % The Filterorder is very important ! If set too small too much data will be removed d(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-0.5 Hz to delfrequ + 0.5 Hz 'HalfPowerFrequency1',delfrequ2(i)-0.5,'HalfPowerFrequency2',delfrequ2(i)+0.5, ... 'DesignMethod','butter','SampleRate',freq); dat_cp_lp_hp_f2(:,:,Bandstop2_s) = filtfilt(d(i),dat_cp_lp_hp_f2(:,:,Bandstop2_s)); % Application of the filter if harmo1>0 % If we want to also delete the harmonic of the specified frequency. d1(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1 Hz to delfrequ + 1 Hz 'HalfPowerFrequency1',2*(delfrequ2(i)-0.5),'HalfPowerFrequency2',2*(delfrequ2(i)+0.5), ... 'DesignMethod','butter','SampleRate',freq); dat_cp_lp_hp_f2(:,:,Bandstop2_s) = filtfilt(d1(i),dat_cp_lp_hp_f2(:,:,Bandstop2_s)); % Application of the filter end if harmo2>0 d2(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-1.5 Hz to delfrequ + 1.5 Hz 'HalfPowerFrequency1',3*(delfrequ2(i)-0.5),'HalfPowerFrequency2',3*(delfrequ2(i)+0.5), ... 'DesignMethod','butter','SampleRate',freq); dat_cp_lp_hp_f2(:,:,Bandstop2_s) = filtfilt(d2(i),dat_cp_lp_hp_f2(:,:,Bandstop2_s)); % Application of the filter end if harmo3>0 d3(i) = designfilt('bandstopiir','FilterOrder',8, ... % definition of the filter, order 4. From delfrequ-2 Hz to delfrequ + 2 Hz 'HalfPowerFrequency1',4*(delfrequ2(i)-0.5),'HalfPowerFrequency2',4*(delfrequ2(i)+0.5), ... 'DesignMethod','butter','SampleRate',freq); dat_cp_lp_hp_f2(:,:,Bandstop2_s) = filtfilt(d3(i),dat_cp_lp_hp_f2(:,:,Bandstop2_s)); % Application of the filter end end end %% 4.4 :Remove circuit pump frequency dat_cp_lp_hp_f_pump=dat_cp_lp_hp_f2; if del_pump>0 % if we want to delete specified frequencies. Defined in the GUI. dat_cp_lp_hp_f_pump1=dat_cp_lp_hp_f2; for i=1:nb d_pump(i) = designfilt('bandstopiir','FilterOrder',8, ... % define a filter to delete the pump frequency. 'HalfPowerFrequency1',abs(F_pump(i)-0.4),'HalfPowerFrequency2',abs(F_pump(i)+0.4), ... 'DesignMethod','butter','SampleRate',freq); if F_pump2 ~=0 %There are two pumps on the the third platform. If we are on the third platform we have to delete the frequency of the second pump as well as the sixth harmonic of bpoth pumps d_pump6(i) = designfilt('bandstopiir','FilterOrder',8, ... % define a filter to delete the 6th pump frequency. 'HalfPowerFrequency1',abs(6*F_pump(i)-0.4),'HalfPowerFrequency2',abs(6*F_pump(i)+0.4), ... 'DesignMethod','butter','SampleRate',freq); % delete the sixth harmonic (6 blades) d_pump2(i) = designfilt('bandstopiir','FilterOrder',8, ... % define the filter of the second pump 'HalfPowerFrequency1',abs(F_pump2(i)-0.4),'HalfPowerFrequency2',abs(F_pump2(i)+0.4), ... 'DesignMethod','butter','SampleRate',freq); d_pump26(i) = designfilt('bandstopiir','FilterOrder',8, ... % define a filter to delete the 6th pump frequency of the second pump. 'HalfPowerFrequency1',abs(6*F_pump2(i)-0.4),'HalfPowerFrequency2',abs(6*F_pump2(i)+0.4), ... 'DesignMethod','butter','SampleRate',freq); end dat_cp_lp_hp_f_pump_cut=dat_cp_lp_hp_f_pump1(:,i,:); dat_cp_lp_hp_f_pump_cut(:,:,del_s_p) = filtfilt(d_pump(i),dat_cp_lp_hp_f_pump_cut(:,:,del_s_p)); % remove the phase shift if F_pump2 ~=0 dat_cp_lp_hp_f_pump6_cut(:,:,del_s_p) = filtfilt(d_pump6(i),dat_cp_lp_hp_f_pump_cut(:,:,del_s_p));% remove the phase shift of the 6th harmonic dat_cp_lp_hp_f_pump2_cut(:,:,del_s_p) = filtfilt(d_pump2(i),dat_cp_lp_hp_f_pump6_cut(:,:,del_s_p)); dat_cp_lp_hp_f_pump26_cut(:,:,del_s_p) = filtfilt(d_pump26(i),dat_cp_lp_hp_f_pump2_cut(:,:,del_s_p)); dat_cp_lp_hp_f_pump(:,i,:)=dat_cp_lp_hp_f_pump26_cut; else dat_cp_lp_hp_f_pump(:,i,:)=dat_cp_lp_hp_f_pump_cut; % data centered, permuted, lowpassed, highpassed, filtered, pump_filtered. end end end save([folder_save 'calc_p2']) %% 4.5 :Apply windowing for proper spectrum (for dh_f only) %pwelch provides the PSD but not the amplitude of different frequences therefore we will not use windowing for df/f calc Method = 'Hamming'; fs=2000; Overlap=0.5; Window_Size=2^13; Time = [0:1/fs:20]; for i=1:nb for j=1:nbsensor Signal = dat_cp_lp_hp_f_pump(:,i,j); [fhf(:,i,j), pxxf(:,i,j)] = Sxx_Function_Local(Time, Signal, Method, Overlap, Window_Size); end end % pxxf=sqrt(pxxf); fhf_r=fhf(:,1,1); % fhf is always the same [dh_f1,ind_f]= max(pxxf); fdom= squeeze(round(fhf_r(ind_f),3)); r_f= abs((round(60*fdom./nm',3))); %% 4.6 :Take out xx % of the data (interval confidence) k=round((1-(percentage/100))*length_sig/2); % nb of data to remove. In fucntion of the chose percentage of confidence interval chosen in GUI for i=1:nb % nb of measurement for j=1:nbsensor % nb of sensor in each measurement temp=dat_cp_lp_hp_f_pump(:,i,j); [~, I(:,i,j)] = maxk(temp,k); % fing the k largest elements temp(I(:,i,j))=[]; % delete the largest elements dat_f1(:,i,j)=temp; end end for i=1:nb % nb of measurement for j=1:nbsensor % nb of sensor in each measuremen temp=dat_f1(:,i,j); [Bmin(:,i,j), Imin(:,i,j)] = mink(temp,k); % fing the k samllest elements temp(Imin(:,i,j))=[]; % delete the smallest elements dat_cp_f97(:,i,j)=temp; end end %% 4.7 : Calculate the key values : dh_max1=max(dat_cp_f97); %dat_cp_f97 = data centered permuted filtered with confidence interval 97% dh_min1=min(dat_cp_f97); %[dh_f1,ind_f]= max(ft); %% Convert the signal from bars to DH/H dh_max = squeeze(round(dh_max1.*100.*100000./(Em.*rho),10)); dh_min = squeeze(round(dh_min1.*100.*100000./(Em.*rho),10)); dh_f = squeeze(round(dh_f1.*100.*100000./(Em.*rho),3)); dh_pp=dh_max-dh_min; % if there is only one MP the matrix have one less dimension so we need to % do this trick to avoid an error if nb ==1 dh_max=dh_max'; dh_min =dh_min'; dh_f=dh_f'; dh_pp=dh_pp'; fdom=fdom'; r_f=r_f'; end save([folder_save 'calc']) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%% Save postprocessed signals %%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - +%% 4.8 Save postprocessed signals % We know have done all the signal analysis. We will save the post-treated -% signals with the following lines. +% signals if save_post ==1 for i = 1 :nb xlswrite([folder_res,'\Excel\signal_post\', projectname,'_MP',num2str(MP(i)),'_post_pro.xlsx'],channel,['MP', num2str(MP(i))],'A1') xlswrite([folder_res,'\Excel\signal_post\', projectname,'_MP',num2str(MP(i)),'_post_pro.xlsx'],squeeze(dat_cp_f97(:,i,:)),['MP', num2str(MP(i))],'A2') end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%% PLOT TIME DOMAIN %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% 4.8 plot time domain + k=0; t= (1:freq*time)/freq; % time vector %% define the min and the max value of the ordinate axis. if nb==1 % if we have only one sensor the matrix have one less dimension it requires special attention ma=max(max(squeeze(dat_cp))*100000*100./(rho*Em')); mi=min(min(squeeze(dat_cp))*1000./hm'); else ma=max(squeeze(max(dat_cp)),[],2)*1000./hm'; % ma is the maximal DH/H value of each MP mi=min(squeeze(min(dat_cp)),[],2)*1000./hm'; % mi is the minimal DH/H value of each MP end timegraph =figure('Name','tempplot','visible','off'); %timegraph =figure('Name','tempplot') set(0, 'CurrentFigure', timegraph); for i=1:nb % Nb of MP files to treat for j= 1:nbsensor % nb of sensors per MP file k=k+1; % for the name of the plot set(0, 'CurrentFigure', timegraph); plot(downsample(t,10),downsample(squeeze(dat_cp(:,i,j)*1000./hm(i)),10),'Color',[1,0,0]); grid on grid minor set(gca,'Fontsize',18); ylab=ylabel('$\Delta H/H_{\rm{M}}\ (\%)$','Interpreter','latex'); ylim([1.1*mi(i) 1.1*ma(i)]); yticks([round(mi(i),1),0,round(ma(i),1)]); if mod(j,4)==0 || mod(j,nbsensor)==0 % If it is the last graph on the page we want to include xlabel set(gcf,'units','points','position',[10,10,550,245]) % as the xlabel is added we need to slightly change the shape of the graph xlab=xlabel('$t \ $(s)','Interpreter','latex'); set(xlab,'Fontsize',20); set(ylab,'Fontsize',20); set(ylab,'Fontweight','bold'); else set(gca, 'XTickLabel', []) set(gcf,'units','points','position',[10,10,550,213]) % set size of the plot end %namefig=[folder '\Results\images\' projectname '\' projectname '-timeplot-MP-' num2str(MP(i)) '-' num2str(j)]; namefig=[folder '\Results\images\' projectname '\' projectname '-timeplot-MP-' num2str(MP(i)) '-' num2str(j)]; set(0, 'CurrentFigure', timegraph); save2pdf(namefig); % save the plot end end - +%% 4.9 plot time domain %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%% PLOT FREQ DOMAIN %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% TO save time, we discard the data after the lowpass % if lowp_exist ==1 % indice_lowp=find(fhf_r==lowp); % end % fhf_r(indice_lowp+100:end-1)=[]; % pxxf(indice_lowp+100:end-1,:,:)=[]; freqgraph=figure('Name','frequ','visible','off'); set(0, 'CurrentFigure', freqgraph); k=0; rel_decided=rel; for i=1:nb rel=rel_decided; %% if the rotational speed is less than 50 rpm, the x-plot is set to absolute. if abs(nm(i))<50 rel=0; end for j= 1:nbsensor k=k+1; maxf=max(squeeze(pxxf(:,i,j))); % max value for each sensor of each MP %plot(fr*60./abs(nm(i)),squeeze(ft(:,i,j)/maxf),'Color',[1,0,0]) % frequency domain is normalizedby maximal value if norm ==0 % In case we don't want to have normalized freqency plots. maxf= Em(i)*rho(i)*maxf./(maxf *100*100000); % If we don't want to normallize we want to have DH/H values. 100000 is to convert bars to Pa 100 is to convert to percent Em * rho (=rho *g*H) is to get the value of the Head in Pa ylab=ylabel('$\Delta H/{H} \ $(%)','Interpreter','latex'); end set(0, 'CurrentFigure', freqgraph); if log>0 % If we want a semilog plot if rel>0 % If we want f at the x-axis instead of f/f. ab=bar(downsample(fhf_r*60./abs(nm(i)),2),downsample(squeeze(pxxf(:,i,j)/maxf),2),'r'); set(gca,'XScale','log') else ab=bar(downsample(fhf_r,2),downsample(squeeze(pxxf(:,i,j)/maxf),2),'r'); set(gca,'XScale','log') end %ab=semilogx(fhf_r*60,squeeze(pxxf(:,j,i)/maxf),'Color',[1,0,0]) else if rel>0 % If we want f at the x-axis instead of f/f. plot(fhf_r*60./abs(nm(i)),squeeze(pxxf(:,i,j)/maxf),'r'); else plot(fhf_r,squeeze(pxxf(:,i,j)/maxf),'r'); end end grid on grid minor set(gca,'Fontsize',16); if norm ==0 ylab=ylabel('$\Delta H/{H} \ $(-)','Interpreter','latex'); else ylab=ylabel('$\Delta H/{\Delta H}_{\rm{f,dom}} \ $(-)','Interpreter','latex'); end % if log>0 % xlim([0.1,min(1.1*freq*60./abs(nm(i)),1.2*lowp*60./abs(nm(i)))]); % %xlim([0.1,min((1.1*freq*60),1.2*lowp*60)]); if rel>0 xlim([0.1,min(1.1*freq*60./abs(nm(i)),1.2*lowp*60./abs(nm(i)))]); %xlim([0.1,min((1.1*freq*60),1.2*lowp*60)]); else xlim([0.1,min(1000,1.2*lowp)]); end % ylim([0 5]); if mod(j,4)==0 || mod(j,nbsensor)==0 % If it is the last graph of the page... set(gcf,'units','points','position',[10,10,550,250]); %set(gcf,'units','points','position',[10,10,110,49]); if rel>0 xlab=xlabel('${f}/{f_{\rm{n}}}\ $ (-) ','Interpreter','latex'); else xlab=xlabel('${f}$ (Hz) ','Interpreter','latex'); xlim([0.1,min(1000,1.2*lowp)]); end set(xlab,'Fontsize',25); set(ylab,'Fontsize',18); else %xlab=xlabel(' ') %set(gcf,'units','points','position',[10,10,110,43]); set(gcf,'units','points','position',[10,10,550,213]); set(gca, 'XTickLabel', []); end %namefig=[folder '\Results\images\' projectname '\' projectname '-freqplot-MP-' num2str(MP(i)) '-' num2str(j)]; namefig=[folder,'\Results\images\' projectname '\' projectname '-freqplot-MP-' num2str(MP(i)) '-' num2str(j)]; % index_dot=strfind(namefig,'.') % namefig(index_dot(end))='-'; %saveas(gcf,namefig,'epsc') set(0, 'CurrentFigure', freqgraph); save2pdf(namefig,freqgraph,20); %exportgraphics(freqgraph,[namefig,'.pdf']) % exportgraphics %appears to be slower. save2pdf is preferred. if dele ==1 savefig(namefig) end end end end \ No newline at end of file diff --git a/excel_v2.m b/excel_v2.m index 21b480a..395f803 100644 --- a/excel_v2.m +++ b/excel_v2.m @@ -1,120 +1,117 @@ function []= excel_v2 (folder_save, dh_max,dh_min,dh_pp,fdom,dh_f,r_f, coeff,nb,MP,alpha,n11,Q11,nm,hm,sigma,Hp,Qp,Pp,nbsensor,folder_results, projectname, pagename,date1,channel,projectname_title,MP_ref_bool,MP_ref) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %This function is called by the function "Main" after calling the read, %the calculate and the latex function. %The excel function does not perform any calclations but it stores the %main results of the calculate function in an Excel file. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 6.1 For simplicity transpose the data. dh_maxt=dh_max'; dh_mint=dh_min'; dh_ppt=dh_pp'; fdomt=fdom'; dh_ft=dh_f'; r_ft = r_f'; %% 6.2 Copy the model excel file if strcmp(coeff,'n11 Q11')==1 filename ='EXCEL\Modele_n11.xlsx' %copy the model elseif strcmp(coeff,'ned Qed')==1 filename ='EXCEL\Modele_nED.xlsx' elseif strcmp(coeff,'End Qnd')==1 filename ='EXCEL\Modele_EnD.xlsx' else filename ='EXCEL\Modele_phi.xlsx' end copyfile(['\\lmhnas2\Gem\07_Software\02_Matlab\PP modeles\' filename], [folder_results,'\EXCEL']) %copy cd(folder_results) -%% 6.3 Rewrite the coefficient +%% 6.3 Initialization CO=[coeff(1:3);coeff(5:7)]; CO2=cellstr(CO); %% Ecriture des en-têtes length_page = 16; % number of MP per page pagenb1=nb/length_page; pagenb=ceil(pagenb1); % Number of excel sheets required %% Definition of A1 containing the processed values of pressure fluctuations A1=zeros(6*nbsensor,nb); for i=1:nbsensor A1(6*(i-1)+1:6*(i),:) = [dh_maxt(i,:);dh_mint(i,:);dh_ppt(i,:);fdomt(i,:);dh_ft(i,:);r_ft(i,:)]; end - -%% Write project number,chapter, page and date +%% 6.4 Write Headers % filename = 'Excel\Modele.xlsx'; sheet = 1; tiret=strfind(pagename,'-'); proj_nb=pagename(1:(tiret(1)-1)); chap_nb=pagename((tiret(1)+1):(tiret(2)-1)); page_nb=pagename((tiret(end)+1):end); if MP_ref_bool==0 MP_ref=chap_nb else MP_ref=str2num(MP_ref) end - - xlRange = ['V', num2str(3)]; xlswrite(filename,str2double(proj_nb),sheet,xlRange) xlRange = ['Y', num2str(3)]; xlswrite(filename,str2double(chap_nb),sheet,xlRange) xlRange = ['Z', num2str(3)]; xlswrite(filename,str2double(page_nb),sheet,xlRange) xlRange = ['AB', num2str(3)]; xlswrite(filename,{projectname_title},sheet,xlRange) xlRange = ['AD',num2str(3)]; xlswrite(filename,{date1},sheet,xlRange) xlRange = ['AA',num2str(3)]; xlswrite(filename,str2double(MP_ref),sheet,xlRange) ; -%% Write data +%% 6.5 Write data for ind=1:pagenb off_main=(ind-1)*ceil(nbsensor/4)*38+14; % define the offsets, 38 = nb of lines in one page, 14 first line after headers. off_coeff=(ind-1)*ceil(nbsensor/4)*38+6; %coeff n11 q11 are writen on te 6th line of each page off_head=(ind-1)*ceil(nbsensor/4)*38+4; % the headers start on the 4th line of each page. E=[MP; alpha; n11; Q11; 1/60*nm; hm; sigma; Hp; Qp; Pp/1E6]; for ind2=1:ceil(nbsensor/4) % iterates in every page required for one measurement point pos_main=off_main+38*(ind2-1); pos_coeff=off_coeff+38*(ind2-1); pos_head=off_head+38*(ind2-1); xlRange = ['E', num2str(pos_head)]; xlswrite(filename,E(:,max(1,length_page*(ind-1)+1):min(nb,ind*length_page)),sheet,xlRange) % xlRange = ['A', num2str(pos_coeff)]; % xlswrite(filename,CO2,sheet,xlRange); xlRange = ['E',num2str(pos_main)]; xlswrite(filename,A1((ind2-1)*24+1:min(ind2*24,nbsensor*6),length_page*(ind-1)+1:min(nb,ind*length_page)),sheet,xlRange) end end %% Write the sensors name %Write them first somewhere random and them in the appropriate cell xlRange = 'V5'; xlswrite(filename,channel',sheet,xlRange) for k= (1:ceil(nbsensor/4):ceil(nb/17)*ceil(nbsensor/4)-1) for j= 1:ceil(nbsensor/4) for i =1:min(nbsensor,4) off_name = 14+(i-1)*6+(j-1)*38+(k-1)*38; xlRange = ['A',num2str(off_name)]; xlswrite(filename,{['=v',num2str(4+i+(j-1)*4)]},sheet,xlRange); %writematrix(['=v',num2str(4+i+(j-1)*4)],filename,'Sheet',sheet,'Range',xlRange,'UseExcel',1); end end end movefile(fullfile(folder_results, filename), [folder_results, '\EXCEL\', projectname, '.xlsx']); end \ No newline at end of file diff --git a/howtoPP.pptx b/howtoPP.pptx new file mode 100644 index 0000000..b4bcebf Binary files /dev/null and b/howtoPP.pptx differ diff --git a/initFolder.mat b/initFolder.mat new file mode 100644 index 0000000..c7dbb5d Binary files /dev/null and b/initFolder.mat differ diff --git a/interface_v1_App.mlapp b/interface_v1_App.mlapp index 101e82e..79c6336 100644 Binary files a/interface_v1_App.mlapp and b/interface_v1_App.mlapp differ diff --git a/PP_routine.prj b/interface_v1_App.prj similarity index 75% copy from PP_routine.prj copy to interface_v1_App.prj index 43805ba..3b31946 100644 --- a/PP_routine.prj +++ b/interface_v1_App.prj @@ -1,175 +1,178 @@ - - PP_routine + + Essai - 2.0 - Dre and Brg - etienne.dorz@epfl.ch + 1.0 + + - \PP_routine\ + \Essai\ option.installpath.programfiles - ${PROJECT_ROOT}\PP_routine\for_testing - ${PROJECT_ROOT}\PP_routine\for_redistribution_files_only - ${PROJECT_ROOT}\PP_routine\for_redistribution - ${PROJECT_ROOT}\PP_routine + ${PROJECT_ROOT}\interface_v1_App\for_testing + ${PROJECT_ROOT}\interface_v1_App\for_redistribution_files_only + ${PROJECT_ROOT}\interface_v1_App\for_redistribution + ${PROJECT_ROOT}\interface_v1_App false subtarget.standalone true false false MyAppInstaller_web MyAppInstaller_mcr MyAppInstaller_app true false false false Syntax -? Input Arguments -? print help on how to use the application input arguments + + + ${PROJECT_ROOT}\interface_v1_App.mlapp ${PROJECT_ROOT}\calculate_v5.m ${PROJECT_ROOT}\EPFL2.png ${PROJECT_ROOT}\excel_v2.m ${PROJECT_ROOT}\Folder_icon.png ${PROJECT_ROOT}\icon_info.png ${PROJECT_ROOT}\latex_v2.m ${PROJECT_ROOT}\Load2_icon.png ${PROJECT_ROOT}\Logo_PTMH.png ${PROJECT_ROOT}\Main_v1.m ${PROJECT_ROOT}\myprogress3.m ${PROJECT_ROOT}\PTMH_Icon.png ${PROJECT_ROOT}\read_v1.m ${PROJECT_ROOT}\save2pdf.m ${PROJECT_ROOT}\Sxx_Function_Local.m ${PROJECT_ROOT}\v2p5\TDMS_getDataSize.m ${PROJECT_ROOT}\v2p5\TDMS_getDataTypeName.m ${PROJECT_ROOT}\v2p5\TDMS_getGroupChanNames.m ${PROJECT_ROOT}\v2p5\TDMS_getPropValue.m ${PROJECT_ROOT}\v2p5\TDMS_getTypeSeekSizes.m ${PROJECT_ROOT}\v2p5\TDMS_handleGetDataOption.m ${PROJECT_ROOT}\v2p5\TDMS_initData.m ${PROJECT_ROOT}\v2p5\TDMS_preprocessFile.m ${PROJECT_ROOT}\v2p5\TDMS_processLeadIn.m ${PROJECT_ROOT}\v2p5\TDMS_readFileHelper_v1.m ${PROJECT_ROOT}\v2p5\TDMS_readFileHelper_v2.m ${PROJECT_ROOT}\v2p5\TDMS_readTDMSFile.m - D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\splash.png - D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\readme.txt - D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\PP_routine.exe + D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_testing\splash.png + D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_testing\Essai.exe + D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_testing\readme.txt C:\Program Files\MATLAB\R2020a true true true true true true false false true false false false false false 10.0 false true win64 true \ No newline at end of file diff --git a/PP_routine/PackagingLog.html b/interface_v1_App/PackagingLog.html similarity index 61% copy from PP_routine/PackagingLog.html copy to interface_v1_App/PackagingLog.html index 11ebf05..1bb0366 100644 --- a/PP_routine/PackagingLog.html +++ b/interface_v1_App/PackagingLog.html @@ -1,22 +1,22 @@
-mcc -o PP_routine -W 'WinMain:PP_routine,version=2.0' -T link:exe -d 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing' -v 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp' -r 'C:\Program Files\MATLAB\R2020a\toolbox\compiler\resources\default_icon.ico' 
+mcc -o Essai -W 'WinMain:Essai,version=1.0' -T link:exe -d 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_testing' -v 'D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp' -r 'C:\Program Files\MATLAB\R2020a\toolbox\compiler\resources\default_icon.ico' 
 Compiler version: 8.0 (R2020a)
 
 Dependency analysis by REQUIREMENTS.
 
 Warning: Your deployed application may fail because file or folder paths
 not present in the deployed environment may be included in your MATLAB startup
 file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
 determine the appropriate execution environment when including file and folder
 paths, and recompile your application.
 
 Parsing file "D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App.mlapp"
 	(referenced from command line).
-Generating file "D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_testing\readme.txt".
+Generating file "D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_testing\readme.txt".
 Packaging...
 Creating the bundle...
 Creating the install agent URL file...
-Web based installer created at D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\PP_routine\for_redistribution\MyAppInstaller_web.exe.
+Web based installer created at D:\Users\erdroz\Desktop\PP bureau\Matlab\PP Routine\pp-routine\interface_v1_App\for_redistribution\MyAppInstaller_web.exe.
 Packaging complete.
-Elapsed packaging time was: 30 seconds.
+Elapsed packaging time was: 31 seconds.
 
diff --git a/PP_routine/for_redistribution/MyAppInstaller_web.exe b/interface_v1_App/for_redistribution/MyAppInstaller_web.exe similarity index 90% copy from PP_routine/for_redistribution/MyAppInstaller_web.exe copy to interface_v1_App/for_redistribution/MyAppInstaller_web.exe index f725e0b..b24c4b0 100644 Binary files a/PP_routine/for_redistribution/MyAppInstaller_web.exe and b/interface_v1_App/for_redistribution/MyAppInstaller_web.exe differ diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/interface_v1_App/for_redistribution_files_only/Essai.exe similarity index 92% copy from PP_routine/for_redistribution_files_only/PP_routine.exe copy to interface_v1_App/for_redistribution_files_only/Essai.exe index 025062b..6ba9907 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/interface_v1_App/for_redistribution_files_only/Essai.exe differ diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/interface_v1_App/for_redistribution_files_only/interface_v1_App.exe similarity index 92% copy from PP_routine/for_redistribution_files_only/PP_routine.exe copy to interface_v1_App/for_redistribution_files_only/interface_v1_App.exe index 025062b..d2cad25 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/interface_v1_App/for_redistribution_files_only/interface_v1_App.exe differ diff --git a/interface_v1_App/for_redistribution_files_only/readme.txt b/interface_v1_App/for_redistribution_files_only/readme.txt new file mode 100644 index 0000000..f38ee98 --- /dev/null +++ b/interface_v1_App/for_redistribution_files_only/readme.txt @@ -0,0 +1,47 @@ +Essai Executable + +1. Prerequisites for Deployment + +Verify that version 9.8 (R2020a) of the MATLAB Runtime is installed. +If not, you can run the MATLAB Runtime installer. +To find its location, enter + + >>mcrinstaller + +at the MATLAB prompt. +NOTE: You will need administrator rights to run the MATLAB Runtime installer. + +Alternatively, download and install the Windows version of the MATLAB Runtime for R2020a +from the following link on the MathWorks website: + + https://www.mathworks.com/products/compiler/mcr/index.html + +For more information about the MATLAB Runtime and the MATLAB Runtime installer, see +"Distribute Applications" in the MATLAB Compiler documentation +in the MathWorks Documentation Center. + +2. Files to Deploy and Package + +Files to Package for Standalone +================================ +-Essai.exe +-MCRInstaller.exe + Note: if end users are unable to download the MATLAB Runtime using the + instructions in the previous section, include it when building your + component by clicking the "Runtime included in package" link in the + Deployment Tool. +-This readme file + + + +3. Definitions + +For information on deployment terminology, go to +https://www.mathworks.com/help and select MATLAB Compiler > +Getting Started > About Application Deployment > +Deployment Product Terms in the MathWorks Documentation +Center. + + + + diff --git a/interface_v1_App/for_redistribution_files_only/splash.png b/interface_v1_App/for_redistribution_files_only/splash.png new file mode 100644 index 0000000..d60c6fa Binary files /dev/null and b/interface_v1_App/for_redistribution_files_only/splash.png differ diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/interface_v1_App/for_testing/Essai.exe similarity index 92% copy from PP_routine/for_redistribution_files_only/PP_routine.exe copy to interface_v1_App/for_testing/Essai.exe index 025062b..6ba9907 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/interface_v1_App/for_testing/Essai.exe differ diff --git a/PP_routine/for_redistribution_files_only/PP_routine.exe b/interface_v1_App/for_testing/interface_v1_App.exe similarity index 92% copy from PP_routine/for_redistribution_files_only/PP_routine.exe copy to interface_v1_App/for_testing/interface_v1_App.exe index 025062b..d2cad25 100644 Binary files a/PP_routine/for_redistribution_files_only/PP_routine.exe and b/interface_v1_App/for_testing/interface_v1_App.exe differ diff --git a/interface_v1_App/for_testing/mccExcludedFiles.log b/interface_v1_App/for_testing/mccExcludedFiles.log new file mode 100644 index 0000000..9d0f909 --- /dev/null +++ b/interface_v1_App/for_testing/mccExcludedFiles.log @@ -0,0 +1,2 @@ +The List of Excluded Files +Excluded files Exclusion Message ID Reason For Exclusion Exclusion Rule diff --git a/interface_v1_App/for_testing/readme.txt b/interface_v1_App/for_testing/readme.txt new file mode 100644 index 0000000..f38ee98 --- /dev/null +++ b/interface_v1_App/for_testing/readme.txt @@ -0,0 +1,47 @@ +Essai Executable + +1. Prerequisites for Deployment + +Verify that version 9.8 (R2020a) of the MATLAB Runtime is installed. +If not, you can run the MATLAB Runtime installer. +To find its location, enter + + >>mcrinstaller + +at the MATLAB prompt. +NOTE: You will need administrator rights to run the MATLAB Runtime installer. + +Alternatively, download and install the Windows version of the MATLAB Runtime for R2020a +from the following link on the MathWorks website: + + https://www.mathworks.com/products/compiler/mcr/index.html + +For more information about the MATLAB Runtime and the MATLAB Runtime installer, see +"Distribute Applications" in the MATLAB Compiler documentation +in the MathWorks Documentation Center. + +2. Files to Deploy and Package + +Files to Package for Standalone +================================ +-Essai.exe +-MCRInstaller.exe + Note: if end users are unable to download the MATLAB Runtime using the + instructions in the previous section, include it when building your + component by clicking the "Runtime included in package" link in the + Deployment Tool. +-This readme file + + + +3. Definitions + +For information on deployment terminology, go to +https://www.mathworks.com/help and select MATLAB Compiler > +Getting Started > About Application Deployment > +Deployment Product Terms in the MathWorks Documentation +Center. + + + + diff --git a/interface_v1_App/for_testing/requiredMCRProducts.txt b/interface_v1_App/for_testing/requiredMCRProducts.txt new file mode 100644 index 0000000..92b5b43 --- /dev/null +++ b/interface_v1_App/for_testing/requiredMCRProducts.txt @@ -0,0 +1 @@ +35000 35010 35108 35124 35191 35274 \ No newline at end of file diff --git a/interface_v1_App/for_testing/splash.png b/interface_v1_App/for_testing/splash.png new file mode 100644 index 0000000..d60c6fa Binary files /dev/null and b/interface_v1_App/for_testing/splash.png differ diff --git a/latex_v2.m b/latex_v2.m index 7636622..fa82cb0 100644 --- a/latex_v2.m +++ b/latex_v2.m @@ -1,191 +1,191 @@ function []= latex_v2(pagename,projectname,nb,nbsensor,percentage,MP,alpha,nm,n11,Q11,hm,sigma,date1,dh_max,dh_min,dh_pp,fdom,dh_f,r_f,channel,folder,coeff_n,coeff_q,folder_results,projectname_title) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%Function defintition %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %This function is called by the function "Main" after calling the read and %the calculate function. At this stage all the claculation have been %performed. This function will first load the latex layout and fill it in %with the results of the post processing calculation performed in the %calculate function. It will finally compiled the tex file in PDF and %create the D annex. %% 5.1 Open the latex file and store it in the cell A idcs = strfind(folder,'\'); folder2 = folder(1:idcs(end)-1); fid = fopen(fullfile(folder2,'latex_new_logos_append.tex'),'r'); % Latex.tex is the structure file that will be filled in. i = 1; tline = fgetl(fid); A{i} = tline; while ischar(tline) i = i+1; tline = fgetl(fid); A{i} = tline; end fclose(fid); Asave=A; %% 5.2 Separate the annex number: %For example 715-07-D-01 we want to separate the 01 from the rest. The %first part XXX-XX-X is constant while the last two digits increase. tiret=find(pagename=='-'); l=max(tiret); pagenamelast=pagename(l+1:end); % the last two digits. pagenamefirst=pagename(1:l);% name of the annex corresponds to 715-07-D in the example pagenb= str2double(pagenamelast); %% 5.3 Find lines where to change contents %The latex document is organised with specified comments at the lines that %need to be re-written. In this subsection, we store in the cell "ind" the %lines where modification are needed. ind{1}=find(strcmp(A,'%donnee1')); ind{2}=find(strcmp(A,'%donnee2')); ind{3}=find(strcmp(A,'%time1')); ind{4}=find(strcmp(A,'%freq1')); ind{5}=find(strcmp(A,'%time2')); ind{6}=find(strcmp(A,'%freq2')); ind{7}=find(strcmp(A,'%time3')); ind{8}=find(strcmp(A,'%freq3')); ind{9}=find(strcmp(A,'%time4')); ind{10}=find(strcmp(A,'%freq4')); ind{11}=find(strcmp(A,'\end{figure}')); ind{13}=find(strcmp(A,'%graph2')); ind{14}=find(strcmp(A,'%graph3')); ind{15}=find(strcmp(A,'%graph4')); ind{16}=find(strcmp(A,'%entete')); ind{17}=find(strcmp(A,'%channels')); ind{18}=find(strcmp(A,'%final datas')); ind{19}=find(strcmp(A,'%entete last')); ind{20}=find(strcmp(A,'%coeffs')); ind{21}=find(strcmp(A,'%start')); ind{22}=find(strcmp(A,'%end')); %% 5.4 Initialization of the iterative variables. page =1; % page iterative number measure = 1; % measurement point iterative number sensor =1; % sensor number iterative number curse=1; % current page for one MP. curse goes from 1 to ppm and is set to 1 at every new MP. ppm = ceil(nbsensor/4); % nb of page necessary for each measurement (if <4sensors we only one page per measurement if 4-8 sensor 2 pages, etc...) last = mod(nbsensor,4); %number of graph on the last page per measuremet. For exemple if nbsensor = 5 last =1. -%% 5.5 Write in the A variable the frequency and temporal plot at the approproate lines. +%% 5.5 Write in the A variable the frequency and temporal plot at the appropriate lines. while measure1 || sensor<(ppm-1)*4 +1 || last==0 A{ind{2}+1} = [channel{sensor-1}, ' & ', channel{sensor} ,'\\']; A{ind{5}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname '-timeplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{6}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname, '-freqplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{18}+2} = [num2str(sensor), '&', sprintf('%.3f',dh_max(measure,sensor)), '&', sprintf('%.3f',dh_min(measure,sensor)), '&',sprintf('%.3f',dh_pp(measure,sensor)), '&',sprintf('%.3f',fdom(measure,sensor)), '&',sprintf('%.3f',dh_f(measure,sensor)), '&',sprintf('%.3f',r_f(measure,sensor)), '\\']; sensor = sensor+1; if last>2 || sensor<(ppm-1)*4 +1 || last==0 A{ind{2}+1} = [channel{sensor-2} ,' & ', channel{sensor-1} ,' & ', channel{sensor} ,'\\']; A{ind{7}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname '-timeplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{8}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname, '-freqplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{18}+3} = [num2str(sensor), '&', sprintf('%.3f',dh_max(measure,sensor)), '&', sprintf('%.3f',dh_min(measure,sensor)), '&',sprintf('%.3f',dh_pp(measure,sensor)), '&',sprintf('%.3f',fdom(measure,sensor)), '&',sprintf('%.3f',dh_f(measure,sensor)), '&',sprintf('%.3f',r_f(measure,sensor)), '\\']; sensor = sensor+1; if last>3 || sensor<(ppm-1)*4 +1 || last==0 A{ind{2}+1} = [channel{sensor-3} , ' & ', channel{sensor-2} , ' & ', channel{sensor-1} , ' & ' channel{sensor},'\\']; A{ind{9}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname '-timeplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{10}+1} = ['\includegraphics[width=\linewidth]{images/', projectname, '/' projectname, '-freqplot-MP-' ,num2str(MP(measure)),'-',num2str(sensor),'.pdf}']; A{ind{18}+4} = [num2str(sensor), '&', sprintf('%.3f',dh_max(measure,sensor)), '&', sprintf('%.3f',dh_min(measure,sensor)), '&',sprintf('%.3f',dh_pp(measure,sensor)), '&',sprintf('%.3f',fdom(measure,sensor)), '&',sprintf('%.3f',dh_f(measure,sensor)), '&',sprintf('%.3f',r_f(measure,sensor)), '\\']; sensor=sensor+1; end end end -%% 5.6 Delete the redondant graphs and the redundant columns of last table on the last page for each measurement point +%% 5.6 Delete the redundant graphs and the redundant columns of last table on the last page for each measurement point - if mod(page,ppm)==0 % if we are in the last page where there might be less than 4 graphs to plot. + if mod(page,ppm)==0 && last ~=0% if we are in the last page where there might be less than 4 graphs to plot. for i=ind{12+last}:(ind{11}-1) A{i}=[]; end for i=ind{18}+1+last :ind{18}+4 A{i}=[]; end end -%% 5.7 If we are at the last page of the last MP we end the document +%If we are at the last page of the last MP we end the document if measure ==nb && curse == ppm A{ind{22}+1}= '\end{document}'; end -%% 5.8 Write the updated A matrix in a new tex file called by the project name and the MP range. +%% 5.7 Write the updated A matrix in a new tex file called by the project name and the MP range. tempdirectory=fullfile(folder,'\Results'); mkdir(tempdirectory); nom=strcat(tempdirectory, '\',projectname,'-MP',num2str(MP(1)),'-',num2str(MP(end)),'.tex'); if curse ==1 && measure ==1 fid = fopen(nom, 'w'); for i = 1:numel(A) if A{i+1} == -1 fprintf(fid,'%s', A{i}); break else fprintf(fid,'%s\n', A{i}); end end else fid = fopen(nom, 'a'); for i = ind{21}:ind{22}+1 if A{i+1} == -1 fprintf(fid,'%s', A{i}); break else fprintf(fid,'%s\n', A{i}); end end end fclose(fid); A=Asave; % First page has been updated page=page+1; curse=curse+1; end measure = measure +1; sensor=1; curse=1; end %% 5.9 Convert the latex to pdf. cd(fullfile(folder,'Results')) sys=['pdflatex -interaction=nonstopmode ', [projectname,'-MP',num2str(MP(1)),'-',num2str(MP(end)),'.tex']]; system(sys); %% 5.10 Copy the pdf created in the Matlab folder to a PDF folder in the project folder copyfile(strcat(projectname,'-MP',num2str(MP(1)),'-',num2str(MP(end)),'.pdf'), [folder_results,'\PDF']); %% 5.11 Copy the .fig created list=dir(fullfile(folder,'Results\images',projectname)); j=1; for i=1:length(list) filestocopy1=strfind(list(i).name,'fig'); % find all the fig files. filestocopy2=strfind(list(i).name,projectname); % find all the fig files. for k= 1:length(MP) filestocopyf3(k)=isempty(strfind(list(i).name,['MP-',num2str(MP(k)),'-'])); end if isempty(filestocopy1)<1 && isempty(filestocopy2)<1 && sum(filestocopyf3)