Skip to content
Snippets Groups Projects
Commit ca8a1ac9 authored by Tamas Borbath's avatar Tamas Borbath
Browse files

Moved the table from evaluateProFitFittingParameters to an Excel file

parent d41c227f
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,8 @@ folderName = 'final_simulations';
exportFolder = {'11 Simulations'};
pathNameExport = 'ProFit test data';
pathBaseExportFiles = pathToDataFolder(pathNameExport, exportFolder);
% pathBaseExportFiles = pathBaseExportFiles(1:end-1);
% pathBaseExportFiles = [pathBaseExportFiles ' - R3\'];
pathBaseExportFiles = pathBaseExportFiles(1:end-1);
pathBaseExportFiles = [pathBaseExportFiles ' - R3_new\'];% _only %+FID
dataExportPathBase = strcat(pathBaseExportFiles, exportFolder{1}, '\');
truncSuffix = '_truncOn';
folderFigures = [pathBaseExportFiles 'Output\' folderName, truncSuffix, '\'];
......@@ -16,8 +16,8 @@ folders = {'df2', 'pc1', 'pc0', 'gauss'};
folders = {'df2_global', 'df2_local', 'pc1', 'pc0', 'gauss', 'em', 'noise', 'baseline'};
folders = {'pc0', 'pc1', 'gauss', 'df2_global', 'df2_local', ...
'em', 'noise', 'baseline'};
xAxisLabels = {'$$\varphi_0$$', '$$\varphi_1$$', '$$\nu_g$$', '$$\omega_{global}$$', '{\boldmath$\omega_{local}$}', ...
'{\boldmath$\nu_{e}$}', '{\boldmath$noise$}', '{\boldmath$baseline$}'};
xAxisLabels = {'$$\rm\varphi_0$$', '$$\rm\varphi_1$$', '$$\rm\nu_g$$', '$$\rm\omega_{global}$$', '{\rm\boldmath$\omega_{local}$}', ...
'{\rm\boldmath$\nu_{e}$}', '{\rm\boldmath$noise$}', '{\rm\boldmath$baseline$}'};
legendLabels = {'\varphi_0 :\hspace{3em}', '\varphi_1 :\hspace{3.em}', '\nu_g :\hspace{3.em}', '\omega_{global} :\hspace{1.5em}', '${\boldmath$\omega_{local}$}$:\hspace{1.7em}', ...
'${\boldmath$\nu_{e}$}$:\hspace{3.5em}', '${\boldmath$noise$}$:\hspace{1.5em}', '${\boldmath$baseline$}$:'};
......@@ -40,9 +40,15 @@ if useSubPlots
else
numParam = length(parameters);
end
tableDeviations = cell(9,7);
for iFolder = 1:length(folders)
tableDeviations{iFolder+1,1} = legendLabels{iFolder};
end
for iParam = 1: numParam
legendLabels_ = {};
unitLabel = [titleLabels{iParam}, units{iParam}];
tableDeviations{1,iParam+1} = unitLabel;
for iFolder = 1:length(folders)
load([dataExportPathBase, folders{iFolder}, '\Diff_Summaries', truncSuffix, '_no_BL_df3.mat'], 'diff_conc_mat', 'diff_em_mat', 'diff_gm_mat', ...
'diff_pc0_mat', 'diff_df2_mat', 'diff_pc12_mat', 'diff_T2_mat');
......@@ -71,19 +77,24 @@ for iParam = 1: numParam
else
scatter(zeros(1,size2)+iFolder, mean(diff_mat));
end
title(['$$', titleLabels{iParam}, '$$'],'Interpreter','latex');
legendLabels_{iFolder}= ['$$' legendLabels{iFolder}, num2str(diff_mean,'%.2f'), ' \pm ', num2str(diff_std,'%.2f'), '$$'];
lgd = legend(legendLabels_,'Interpreter','latex','Location','northwest');
title(['$$\rm', titleLabels{iParam}, '$$'],'Interpreter','latex');
deviationsString = [ num2str(diff_mean,'%.2f'), ' \pm ', num2str(diff_std,'%.2f')];
tableDeviations{iFolder+1,iParam+1} = deviationsString;
% legendLabels_{iFolder}= ['$$\rm' legendLabels{iFolder}, deviationsString, '$$'];
% lgd = legend(legendLabels_,'Interpreter','latex','Location','northwest');
title(lgd,{'$$Spectra\,\,with\,\,induced$$',['$$', titleOffset{iParam}, unitLabel,'$$']},'FontSize',8);
% title(lgd,{'$$\rm Spectra\,\,with\,\,induced$$',['$$\rm', titleOffset{iParam}, unitLabel,'$$']},'FontSize',8);
end
xlim([0, length(folders)+1]);
xticks(1:length(folders));
xticklabels(xAxisLabels);
xlabel('Simulations')
set(gca,'YAxisLocation','right')
ylabel(['$$', unitLabel, '$$'],'Interpreter','latex');
% xlabel('Simulations')
xlabel('Spectra with induced variations in ')
% set(gca,'YAxisLocation','right')
ylabel(['$$\rm', unitLabel, '$$'],'Interpreter','latex');
set(gca,'TickLabelInterpreter','latex')
set(gca,'XTickLabelRotation',60)
savefig([folderFigures, parameters{iParam}])
end
\ No newline at end of file
end
writecell(tableDeviations,[folderFigures, 'Params.xlsx'])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment