Added plotting of PCA results across scripts, minor cosmetic changes and bugfixes.
This commit is contained in:
parent
3c407617a0
commit
fb12be8e22
@ -23,10 +23,10 @@ function plotPCAResults(pcaResults, scan_parameter_values, scan_reference_values
|
|||||||
score = pcaResults.score;
|
score = pcaResults.score;
|
||||||
explained = pcaResults.explained;
|
explained = pcaResults.explained;
|
||||||
|
|
||||||
raw_scan_param_vals = scan_parameter_values;
|
raw_scan_param_vals = scan_parameter_values;
|
||||||
unique_scan_param_vals = scan_reference_values;
|
unique_scan_param_vals = scan_reference_values;
|
||||||
numGroups = numel(unique_scan_param_vals);
|
numGroups = numel(unique_scan_param_vals);
|
||||||
colors = lines(numGroups);
|
colors = lines(numGroups);
|
||||||
|
|
||||||
% --- Figure numbering setup ---
|
% --- Figure numbering setup ---
|
||||||
if isempty(opts.FigNumRange)
|
if isempty(opts.FigNumRange)
|
||||||
|
@ -70,7 +70,7 @@ options.skipBinarization = true;
|
|||||||
options.skipSaveFigures = true;
|
options.skipSaveFigures = true;
|
||||||
options.skipSaveData = false;
|
options.skipSaveData = false;
|
||||||
options.skipSaveOD = true;
|
options.skipSaveOD = true;
|
||||||
options.skipLivePlot = false;
|
options.skipLivePlot = true;
|
||||||
options.showProgressBar = true;
|
options.showProgressBar = true;
|
||||||
|
|
||||||
% Extras
|
% Extras
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
% --- User chooses which dataset to load ---
|
% --- User chooses which dataset to load ---
|
||||||
datasetIdx = 1; % <-- change this to 1, 2, 3, ...
|
datasetIdx = 6; % <-- change this to 1, 2, 3, ...
|
||||||
datasetName = sprintf('Dataset_%d', datasetIdx);
|
datasetName = sprintf('Dataset_%d', datasetIdx);
|
||||||
|
|
||||||
% Detect the folder where this script is located and set that as the Base Directory
|
% Detect the folder where this script is located and set that as the Base Directory
|
||||||
@ -107,6 +107,14 @@ Plotter.plotCumulants(options.scan_reference_values, ...
|
|||||||
'SkipSaveFigures', options.skipSaveFigures, ...
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
||||||
'SaveDirectory', figSaveDir);
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
|
%% ------------------ 5. PCA ------------------
|
||||||
|
Plotter.plotPCAResults(compiled_results.pca_results, scan_parameter_values, options.scan_reference_values, ...
|
||||||
|
'FigNumRange', [7,8,9,10,11,12], ...
|
||||||
|
'FontName', options.font, ...
|
||||||
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
%% ------------------ 6. Average of Spectra Plots ------------------
|
%% ------------------ 6. Average of Spectra Plots ------------------
|
||||||
|
@ -70,7 +70,7 @@ options.skipBinarization = true;
|
|||||||
options.skipSaveFigures = true;
|
options.skipSaveFigures = true;
|
||||||
options.skipSaveData = false;
|
options.skipSaveData = false;
|
||||||
options.skipSaveOD = true;
|
options.skipSaveOD = true;
|
||||||
options.skipLivePlot = false;
|
options.skipLivePlot = true;
|
||||||
options.showProgressBar = true;
|
options.showProgressBar = true;
|
||||||
|
|
||||||
% Extras
|
% Extras
|
||||||
|
@ -108,6 +108,14 @@ Plotter.plotCumulants(options.scan_reference_values, ...
|
|||||||
'SkipSaveFigures', options.skipSaveFigures, ...
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
||||||
'SaveDirectory', figSaveDir);
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
|
%% ------------------ 5. PCA ------------------
|
||||||
|
Plotter.plotPCAResults(compiled_results.pca_results, scan_parameter_values, options.scan_reference_values, ...
|
||||||
|
'FigNumRange', [7,8,9,10,11,12], ...
|
||||||
|
'FontName', options.font, ...
|
||||||
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
%% ------------------ 6. Average of Spectra Plots ------------------
|
%% ------------------ 6. Average of Spectra Plots ------------------
|
||||||
|
@ -70,7 +70,7 @@ options.skipBinarization = true;
|
|||||||
options.skipSaveFigures = true;
|
options.skipSaveFigures = true;
|
||||||
options.skipSaveData = false;
|
options.skipSaveData = false;
|
||||||
options.skipSaveOD = true;
|
options.skipSaveOD = true;
|
||||||
options.skipLivePlot = false;
|
options.skipLivePlot = true;
|
||||||
options.showProgressBar = true;
|
options.showProgressBar = true;
|
||||||
|
|
||||||
% Extras
|
% Extras
|
||||||
|
@ -108,6 +108,14 @@ Plotter.plotCumulants(options.scan_reference_values, ...
|
|||||||
'SkipSaveFigures', options.skipSaveFigures, ...
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
'SaveFileName', 'CumulantOfPeakOffsetAngularCorrelation.fig', ...
|
||||||
'SaveDirectory', figSaveDir);
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
|
%% ------------------ 5. PCA ------------------
|
||||||
|
Plotter.plotPCAResults(compiled_results.pca_results, scan_parameter_values, options.scan_reference_values, ...
|
||||||
|
'FigNumRange', [7,8,9,10,11,12], ...
|
||||||
|
'FontName', options.font, ...
|
||||||
|
'SkipSaveFigures', options.skipSaveFigures, ...
|
||||||
|
'SaveDirectory', figSaveDir);
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
||||||
%% ------------------ 6. Average of Spectra Plots ------------------
|
%% ------------------ 6. Average of Spectra Plots ------------------
|
||||||
|
@ -70,7 +70,7 @@ options.skipBinarization = true;
|
|||||||
options.skipSaveFigures = true;
|
options.skipSaveFigures = true;
|
||||||
options.skipSaveData = false;
|
options.skipSaveData = false;
|
||||||
options.skipSaveOD = true;
|
options.skipSaveOD = true;
|
||||||
options.skipLivePlot = false;
|
options.skipLivePlot = true;
|
||||||
options.showProgressBar = true;
|
options.showProgressBar = true;
|
||||||
|
|
||||||
% Extras
|
% Extras
|
||||||
|
Loading…
Reference in New Issue
Block a user