MPI plotting stuff
This commit is contained in:
@@ -0,0 +1,514 @@
|
||||
%% BER over SIR by MPI delay/coherence regime and PAM level
|
||||
% 1) gather block_update = 1 data from the database
|
||||
% 2) clean data and assign path-length regimes
|
||||
% 3) plot PAM4/PAM6/PAM8 BER-over-SIR curves in the same figure
|
||||
|
||||
clear; clc;
|
||||
|
||||
%% 1) Gather data
|
||||
|
||||
studyName = "block_update_sweep";
|
||||
selectedBlockUpdate = 1;
|
||||
selectedPamLevels = [4 6 8];
|
||||
|
||||
algorithmSelection = table( ...
|
||||
["dc_tracking"; ...
|
||||
"plain_ffe"; ...
|
||||
"a2_tracked_levels"; ...
|
||||
"a2_residual"; ...
|
||||
"a1_moving_average"], ...
|
||||
[true; true; false; false; false], ...
|
||||
'VariableNames', ["algorithm", "enabled"]);
|
||||
selectedAlgorithms = algorithmSelection.algorithm(algorithmSelection.enabled);
|
||||
|
||||
useBoundedLines = true;
|
||||
usePolyfit = true;
|
||||
polyfitOrderMax = 4;
|
||||
boundaryPolyfitOrderMax = 4;
|
||||
maxBerForPlot = 0.1;
|
||||
scatterKeepFraction = 0.2;
|
||||
boundMode = "fitStd"; % "fitStd", "directStd", "fitCI", or "directCI"
|
||||
confidenceLevel = 0.95;
|
||||
regimeNames = ["0-1 m", "10-100 m", "300 m", "1000 m"];
|
||||
|
||||
db = DBHandler( ...
|
||||
"dataBase", "labor", ...
|
||||
"type", "mysql", ...
|
||||
"server", "192.168.178.192", ...
|
||||
"user", "silas", ...
|
||||
"password", "silas");
|
||||
db.refresh();
|
||||
|
||||
fp = QueryFilter();
|
||||
fp.where('Runs', 'fiber_length', 'EQUALS', 0);
|
||||
fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
|
||||
fp.where('Runs', 'v_bias', 'EQUALS', 2.65);
|
||||
fp.where('MpiReductionResults', 'study_name', 'EQUALS', char(studyName));
|
||||
fp.where('MpiReductionResults', 'block_update', 'EQUALS', selectedBlockUpdate);
|
||||
|
||||
selectedFields = { ...
|
||||
'Runs.run_id', ...
|
||||
'Runs.sir', ...
|
||||
'Runs.pam_level', ...
|
||||
'Runs.symbolrate', ...
|
||||
'Runs.interference_path_length', ...
|
||||
'Runs.power_mpi_interference', ...
|
||||
'Runs.power_pd_in', ...
|
||||
'Runs.v_bias', ...
|
||||
'Runs.loop_id', ...
|
||||
'MpiReductionResults.occurrence_idx', ...
|
||||
'MpiReductionResults.storage_name', ...
|
||||
'MpiReductionResults.algorithm', ...
|
||||
'MpiReductionResults.algorithm_variant', ...
|
||||
'MpiReductionResults.eq_class', ...
|
||||
'MpiReductionResults.block_update', ...
|
||||
'MpiReductionResults.BER', ...
|
||||
'MpiReductionResults.BER_precoded', ...
|
||||
'MpiReductionResults.SNR', ...
|
||||
'MpiReductionResults.GMI', ...
|
||||
'MpiReductionResults.AIR'};
|
||||
selectedFields = selectedFields(:);
|
||||
|
||||
[rawData, query] = db.queryDB(fp, selectedFields);
|
||||
disp(query);
|
||||
fprintf("Fetched %d MPI reduction rows.\n", height(rawData));
|
||||
|
||||
%% 2) Clean data and assign regimes
|
||||
|
||||
data = rawData;
|
||||
numericFields = ["run_id", "sir", "pam_level", "symbolrate", ...
|
||||
"interference_path_length", "occurrence_idx", "block_update", ...
|
||||
"power_mpi_interference", "BER", "BER_precoded", "SNR", "GMI", "AIR"];
|
||||
for fieldIdx = 1:numel(numericFields)
|
||||
fieldName = numericFields(fieldIdx);
|
||||
if ismember(fieldName, string(data.Properties.VariableNames))
|
||||
data.(char(fieldName)) = numericColumn(data.(char(fieldName)));
|
||||
end
|
||||
end
|
||||
|
||||
stringFields = ["storage_name", "algorithm", "algorithm_variant", "eq_class"];
|
||||
for fieldIdx = 1:numel(stringFields)
|
||||
fieldName = stringFields(fieldIdx);
|
||||
if ismember(fieldName, string(data.Properties.VariableNames))
|
||||
data.(char(fieldName)) = stringColumn(data.(char(fieldName)));
|
||||
end
|
||||
end
|
||||
|
||||
data(data.run_id == 3866, :) = [];
|
||||
data(data.run_id == 3865, :) = [];
|
||||
data(data.run_id == 3796, :) = [];
|
||||
data(data.run_id == 3797, :) = [];
|
||||
data(data.run_id == 3798, :) = [];
|
||||
data(data.run_id == 4002, :) = [];
|
||||
data(data.run_id == 4200, :) = [];
|
||||
data(data.run_id == 4199, :) = [];
|
||||
data(data.loop_id == 91, :) = [];
|
||||
data(data.loop_id == 59, :) = [];
|
||||
|
||||
data = data(isfinite(data.BER) & data.BER > 0 & data.BER < maxBerForPlot, :);
|
||||
data.sir_exact = -7 - data.power_mpi_interference;
|
||||
|
||||
data.path_regime = strings(height(data), 1);
|
||||
data.path_regime(data.interference_path_length == 0 | ...
|
||||
data.interference_path_length == 1) = "0-1 m";
|
||||
data.path_regime(data.interference_path_length >= 10 & ...
|
||||
data.interference_path_length <= 100) = "10-100 m";
|
||||
data.path_regime(data.interference_path_length == 300) = "300 m";
|
||||
data.path_regime(data.interference_path_length == 1000) = "1000 m";
|
||||
data = data(data.path_regime ~= "", :);
|
||||
|
||||
data = data(ismember(data.pam_level, selectedPamLevels), :);
|
||||
data = data(ismember(data.algorithm, selectedAlgorithms), :);
|
||||
selectedAlgorithms = selectedAlgorithms(ismember(selectedAlgorithms, unique(data.algorithm, "stable")));
|
||||
|
||||
if isempty(data)
|
||||
warning("PLOT_mpi_reduction_db_delay_regimes_pam_comparison:NoRows", ...
|
||||
"No rows remain after BER/study/block/PAM/algorithm/regime filtering.");
|
||||
return
|
||||
end
|
||||
|
||||
data.clean_keep = true(height(data), 1);
|
||||
groupId = findgroups(data.path_regime, data.pam_level, data.algorithm, data.sir);
|
||||
for curGroup = unique(groupId(isfinite(groupId))).'
|
||||
rowMask = groupId == curGroup;
|
||||
berValues = data.BER(rowMask);
|
||||
if nnz(rowMask) > 3
|
||||
data.clean_keep(rowMask) = ~isoutlier(berValues);
|
||||
end
|
||||
end
|
||||
cleanData = data(data.clean_keep, :);
|
||||
|
||||
groupVars = ["path_regime", "pam_level", "algorithm", "sir"];
|
||||
summaryTable = groupsummary(cleanData, groupVars, ...
|
||||
{"mean", "min", "max"}, "BER");
|
||||
sirExactTable = groupsummary(cleanData, groupVars, "median", "sir_exact");
|
||||
summaryTable = sortrows(summaryTable, groupVars);
|
||||
sirExactTable = sortrows(sirExactTable, groupVars);
|
||||
summaryTable.sir_exact = sirExactTable.median_sir_exact;
|
||||
summaryTable = addBerIntervalBounds(summaryTable, cleanData, groupVars, confidenceLevel);
|
||||
|
||||
fprintf("Cleaned to %d rows across %d regime/PAM/algorithm/SIR groups.\n", ...
|
||||
height(cleanData), height(summaryTable));
|
||||
disp(groupcounts(cleanData, ["path_regime", "pam_level", "algorithm"]));
|
||||
|
||||
%% 3) Plot PAM curves in one delay-regime comparison figure
|
||||
|
||||
|
||||
|
||||
for regimeIdx = 1:numel(regimeNames)
|
||||
regimeName = regimeNames(regimeIdx);
|
||||
figure(); hold on;
|
||||
|
||||
for algIdx = 1:numel(selectedAlgorithms)
|
||||
algorithmName = selectedAlgorithms(algIdx);
|
||||
algColor = algorithmColor(algorithmName);
|
||||
displayName = algorithmDisplayName(algorithmName);
|
||||
|
||||
for pamIdx = 1:numel(selectedPamLevels)
|
||||
pamLevel = selectedPamLevels(pamIdx);
|
||||
[marker, lineStyle] = pamStyle(pamLevel);
|
||||
|
||||
rawMask = cleanData.path_regime == regimeName & ...
|
||||
cleanData.pam_level == pamLevel & ...
|
||||
cleanData.algorithm == algorithmName;
|
||||
curveMask = summaryTable.path_regime == regimeName & ...
|
||||
summaryTable.pam_level == pamLevel & ...
|
||||
summaryTable.algorithm == algorithmName;
|
||||
|
||||
if ~any(curveMask)
|
||||
continue
|
||||
end
|
||||
|
||||
scatterRows = downsampleRows(cleanData(rawMask, :), scatterKeepFraction);
|
||||
% scatter(scatterRows.sir_exact, scatterRows.BER, ...
|
||||
% 14, ...
|
||||
% "Marker", marker, ...
|
||||
% "MarkerEdgeColor", algColor, ...
|
||||
% "MarkerFaceColor", algColor, ...
|
||||
% "MarkerEdgeAlpha", 0.35, ...
|
||||
% "MarkerFaceAlpha", 0.35, ...
|
||||
% "HandleVisibility", "off");
|
||||
|
||||
sirValues = summaryTable.sir_exact(curveMask).';
|
||||
meanBer = summaryTable.mean_BER(curveMask).';
|
||||
[boundCenterBer, boundLowerBer, boundUpperBer] = ...
|
||||
selectBerBounds(summaryTable(curveMask, :), boundMode);
|
||||
valid = isfinite(sirValues) & isfinite(meanBer) & meanBer > 0;
|
||||
|
||||
if useBoundedLines && exist("boundedline", "file") && any(valid)
|
||||
[xBand, centerBand, yBounds] = berIntervalBounds( ...
|
||||
sirValues, boundCenterBer, boundLowerBer, boundUpperBer, ...
|
||||
boundMode, boundaryPolyfitOrderMax);
|
||||
|
||||
[hl, hp] = boundedline(xBand, centerBand, yBounds, ...
|
||||
'alpha', 'transparency', 0.08, ...
|
||||
'cmap', algColor, ...
|
||||
'nan', 'fill', ...
|
||||
'orientation', 'vert');
|
||||
set(hl, "LineStyle", "none", "Marker", "none", "HandleVisibility", "off");
|
||||
set(hp, "LineStyle", "-", "HandleVisibility", "off", "Marker", "none");
|
||||
end
|
||||
|
||||
plot(sirValues(valid), meanBer(valid), ...
|
||||
"LineStyle", lineStyle, ...
|
||||
"Marker", marker, ...
|
||||
"MarkerSize", 3.5, ...
|
||||
"LineWidth", 1, ...
|
||||
"Color", algColor, ...
|
||||
"MarkerFaceColor", "w", ...
|
||||
"MarkerEdgeColor", algColor, ...
|
||||
"DisplayName", sprintf("%s, PAM %.0f", displayName, pamLevel));
|
||||
|
||||
if usePolyfit
|
||||
fitMask = valid & meanBer > 0;
|
||||
if nnz(fitMask) >= 2
|
||||
fitOrder = min(polyfitOrderMax, nnz(fitMask) - 1);
|
||||
fitCoeff = polyfit(sirValues(fitMask), log10(meanBer(fitMask)), fitOrder);
|
||||
xFit = linspace(min(sirValues(fitMask)), max(sirValues(fitMask)), 300);
|
||||
yFit = 10 .^ polyval(fitCoeff, xFit);
|
||||
|
||||
% plot(xFit, yFit, ...
|
||||
% "LineStyle", "--", ...
|
||||
% "LineWidth", 1.1, ...
|
||||
% "Color", algColor, ...
|
||||
% "HandleVisibility", "off");
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
yline(2.2e-4, "LineWidth", 1, "LineStyle", "--", "HandleVisibility", "off");
|
||||
yline(3.8e-3, "LineWidth", 1, "LineStyle", "--", "HandleVisibility", "off");
|
||||
yline(2e-2, "LineWidth", 1, "LineStyle", "--", "HandleVisibility", "off");
|
||||
|
||||
title(sprintf("Interference path regime %s", regimeName));
|
||||
xlabel("SIR (dB)");
|
||||
ylabel("BER");
|
||||
set(gca, "YScale", "log");
|
||||
ylim([9e-5, maxBerForPlot]);
|
||||
xlim([15, 45]);
|
||||
grid on;
|
||||
box on;
|
||||
legend("Location", "northeast", "Interpreter", "none");
|
||||
|
||||
if exist("beautifyBERplot", "file")
|
||||
beautifyBERplot("logscale", true, "setcolors", false, ...
|
||||
"setmarkers", false, "changemarkers", false);
|
||||
end
|
||||
end
|
||||
|
||||
% mat2tikz_improved("C:/Users/Silas/Documents/6971e0b65b380ca6d71c837f/04_Experimental_Evaluation/tikz/mpi/ber_vs_sir_delay_regimes_pam_comparison.tikz","cleanfigure",1);
|
||||
|
||||
%% Local helpers
|
||||
|
||||
function values = numericColumn(values)
|
||||
if iscell(values)
|
||||
values = string(values);
|
||||
end
|
||||
if isstring(values) || ischar(values)
|
||||
values = str2double(values);
|
||||
end
|
||||
values = double(values);
|
||||
end
|
||||
|
||||
function values = stringColumn(values)
|
||||
if iscell(values)
|
||||
values = string(values);
|
||||
elseif ischar(values)
|
||||
values = string(values);
|
||||
end
|
||||
values = strip(string(values));
|
||||
end
|
||||
|
||||
function rows = downsampleRows(rows, keepFraction)
|
||||
if keepFraction >= 1 || height(rows) <= 1
|
||||
return
|
||||
end
|
||||
|
||||
keepEvery = max(1, round(1 / keepFraction));
|
||||
keepIdx = 1:keepEvery:height(rows);
|
||||
rows = rows(keepIdx, :);
|
||||
end
|
||||
|
||||
function summaryTable = addBerIntervalBounds(summaryTable, cleanData, groupVars, confidenceLevel)
|
||||
nGroups = height(summaryTable);
|
||||
ciCenter = NaN(nGroups, 1);
|
||||
ciLower = NaN(nGroups, 1);
|
||||
ciUpper = NaN(nGroups, 1);
|
||||
stdCenter = NaN(nGroups, 1);
|
||||
stdLower = NaN(nGroups, 1);
|
||||
stdUpper = NaN(nGroups, 1);
|
||||
|
||||
for groupIdx = 1:nGroups
|
||||
rowMask = true(height(cleanData), 1);
|
||||
for varIdx = 1:numel(groupVars)
|
||||
varName = groupVars(varIdx);
|
||||
rowMask = rowMask & cleanData.(char(varName)) == summaryTable.(char(varName))(groupIdx);
|
||||
end
|
||||
|
||||
[ciCenter(groupIdx), ciLower(groupIdx), ciUpper(groupIdx)] = ...
|
||||
logBerMeanConfidenceInterval(cleanData.BER(rowMask), confidenceLevel);
|
||||
[stdCenter(groupIdx), stdLower(groupIdx), stdUpper(groupIdx)] = ...
|
||||
logBerMeanStdInterval(cleanData.BER(rowMask));
|
||||
end
|
||||
|
||||
summaryTable.ci_center_BER = ciCenter;
|
||||
summaryTable.ci_lower_BER = ciLower;
|
||||
summaryTable.ci_upper_BER = ciUpper;
|
||||
summaryTable.std_center_BER = stdCenter;
|
||||
summaryTable.std_lower_BER = stdLower;
|
||||
summaryTable.std_upper_BER = stdUpper;
|
||||
end
|
||||
|
||||
function [centerBer, lowerBer, upperBer] = logBerMeanConfidenceInterval(berValues, confidenceLevel)
|
||||
berValues = berValues(isfinite(berValues) & berValues > 0);
|
||||
if isempty(berValues)
|
||||
centerBer = NaN;
|
||||
lowerBer = NaN;
|
||||
upperBer = NaN;
|
||||
return
|
||||
end
|
||||
|
||||
logBer = log10(berValues(:));
|
||||
centerLog = mean(logBer, "omitnan");
|
||||
|
||||
if numel(logBer) < 2
|
||||
centerBer = 10 .^ centerLog;
|
||||
lowerBer = centerBer;
|
||||
upperBer = centerBer;
|
||||
return
|
||||
end
|
||||
|
||||
alpha = 1 - confidenceLevel;
|
||||
if exist("tinv", "file")
|
||||
tCritical = tinv(1 - alpha/2, numel(logBer) - 1);
|
||||
else
|
||||
tCritical = 1.96;
|
||||
end
|
||||
|
||||
halfWidth = tCritical * std(logBer, 0, "omitnan") / sqrt(numel(logBer));
|
||||
centerBer = 10 .^ centerLog;
|
||||
lowerBer = 10 .^ (centerLog - halfWidth);
|
||||
upperBer = 10 .^ (centerLog + halfWidth);
|
||||
end
|
||||
|
||||
function [centerBer, lowerBer, upperBer] = logBerMeanStdInterval(berValues)
|
||||
berValues = berValues(isfinite(berValues) & berValues > 0);
|
||||
if isempty(berValues)
|
||||
centerBer = NaN;
|
||||
lowerBer = NaN;
|
||||
upperBer = NaN;
|
||||
return
|
||||
end
|
||||
|
||||
logBer = log10(berValues(:));
|
||||
centerLog = mean(logBer, "omitnan");
|
||||
stdLog = std(logBer, 0, "omitnan");
|
||||
|
||||
centerBer = 10 .^ centerLog;
|
||||
lowerBer = 10 .^ (centerLog - stdLog);
|
||||
upperBer = 10 .^ (centerLog + stdLog);
|
||||
end
|
||||
|
||||
function [centerBer, lowerBer, upperBer] = selectBerBounds(curveSummary, boundMode)
|
||||
if boundMode == "fitCI" || boundMode == "directCI"
|
||||
centerBer = curveSummary.ci_center_BER.';
|
||||
lowerBer = curveSummary.ci_lower_BER.';
|
||||
upperBer = curveSummary.ci_upper_BER.';
|
||||
else
|
||||
centerBer = curveSummary.std_center_BER.';
|
||||
lowerBer = curveSummary.std_lower_BER.';
|
||||
upperBer = curveSummary.std_upper_BER.';
|
||||
end
|
||||
end
|
||||
|
||||
function [xBand, centerBand, yBounds] = berIntervalBounds(sirValues, centerBer, lowerBer, upperBer, boundMode, maxOrder)
|
||||
if boundMode == "directCI" || boundMode == "directStd"
|
||||
[xBand, centerBand, yBounds] = directBerBounds(sirValues, centerBer, lowerBer, upperBer);
|
||||
return
|
||||
end
|
||||
|
||||
[xBand, centerBand, yBounds] = fittedBerBounds(sirValues, centerBer, lowerBer, upperBer, maxOrder);
|
||||
end
|
||||
|
||||
function [xBand, centerBand, yBounds] = directBerBounds(sirValues, centerBer, lowerBer, upperBer)
|
||||
valid = isfinite(sirValues) & isfinite(centerBer) & isfinite(lowerBer) & ...
|
||||
isfinite(upperBer) & centerBer > 0 & lowerBer > 0 & upperBer > 0;
|
||||
|
||||
xBand = sirValues(valid).';
|
||||
centerBand = centerBer(valid).';
|
||||
lowerBand = lowerBer(valid).';
|
||||
upperBand = upperBer(valid).';
|
||||
|
||||
[xBand, orderIdx] = sort(xBand(:));
|
||||
centerBand = centerBand(orderIdx);
|
||||
lowerBand = lowerBand(orderIdx);
|
||||
upperBand = upperBand(orderIdx);
|
||||
|
||||
lowerTmp = min(lowerBand, upperBand);
|
||||
upperBand = max(lowerBand, upperBand);
|
||||
lowerBand = lowerTmp;
|
||||
|
||||
centerBand = min(max(centerBand, lowerBand), upperBand);
|
||||
yBounds = [max(centerBand - lowerBand, 0), max(upperBand - centerBand, 0)];
|
||||
end
|
||||
|
||||
function [xBand, centerBand, yBounds] = fittedBerBounds(sirValues, meanBer, minBer, maxBer, maxOrder)
|
||||
valid = isfinite(sirValues) & isfinite(meanBer) & isfinite(minBer) & ...
|
||||
isfinite(maxBer) & meanBer > 0 & minBer > 0 & maxBer > 0;
|
||||
|
||||
x = sirValues(valid);
|
||||
yMean = meanBer(valid);
|
||||
yMin = minBer(valid);
|
||||
yMax = maxBer(valid);
|
||||
|
||||
if numel(x) < 2
|
||||
xBand = x(:);
|
||||
centerBand = yMean(:);
|
||||
yBounds = [max(yMean(:) - yMin(:), 0), max(yMax(:) - yMean(:), 0)];
|
||||
return
|
||||
end
|
||||
|
||||
[x, orderIdx] = sort(x(:));
|
||||
yMean = yMean(orderIdx);
|
||||
yMin = yMin(orderIdx);
|
||||
yMax = yMax(orderIdx);
|
||||
|
||||
xBand = linspace(min(x), max(x), 300).';
|
||||
fitOrder = min(maxOrder, numel(unique(x)) - 1);
|
||||
|
||||
if fitOrder < 1
|
||||
centerBand = interp1(x, yMean, xBand, "linear", "extrap");
|
||||
lowerBand = interp1(x, yMin, xBand, "linear", "extrap");
|
||||
upperBand = interp1(x, yMax, xBand, "linear", "extrap");
|
||||
else
|
||||
centerBand = fitLogBer(x, yMean, xBand, fitOrder);
|
||||
lowerBand = fitLogBer(x, yMin, xBand, fitOrder);
|
||||
upperBand = fitLogBer(x, yMax, xBand, fitOrder);
|
||||
end
|
||||
|
||||
lowerTmp = min(lowerBand, upperBand);
|
||||
upperBand = max(lowerBand, upperBand);
|
||||
lowerBand = lowerTmp;
|
||||
|
||||
centerBand = min(max(centerBand, lowerBand), upperBand);
|
||||
yBounds = [max(centerBand - lowerBand, 0), max(upperBand - centerBand, 0)];
|
||||
end
|
||||
|
||||
function yFit = fitLogBer(x, y, xFit, fitOrder)
|
||||
coeff = polyfit(x, log10(y), fitOrder);
|
||||
yFit = 10 .^ polyval(coeff, xFit);
|
||||
end
|
||||
|
||||
function label = algorithmDisplayName(algorithmName)
|
||||
algorithmName = string(algorithmName);
|
||||
switch algorithmName
|
||||
case "plain_ffe"
|
||||
label = "FFE only";
|
||||
case "a2_tracked_levels"
|
||||
label = "ACT";
|
||||
case "a2_residual"
|
||||
label = "L-DCA";
|
||||
case "a1_moving_average"
|
||||
label = "DCA";
|
||||
case "dc_tracking"
|
||||
label = "DCT";
|
||||
otherwise
|
||||
label = algorithmName;
|
||||
end
|
||||
end
|
||||
|
||||
function color = algorithmColor(algorithmName)
|
||||
algorithmName = string(algorithmName);
|
||||
switch algorithmName
|
||||
case "plain_ffe"
|
||||
color = [0.3467 0.5360 0.6907];
|
||||
case "a2_tracked_levels"
|
||||
color = [0.9153 0.2816 0.2878];
|
||||
case "a2_residual"
|
||||
color = [0.4416 0.7490 0.4322];
|
||||
case "a1_moving_average"
|
||||
color = [1.0000 0.5984 0.2000];
|
||||
case "dc_tracking"
|
||||
color = [0.6769 0.4447 0.7114];
|
||||
otherwise
|
||||
color = [0 0 0];
|
||||
end
|
||||
end
|
||||
|
||||
function [marker, lineStyle] = pamStyle(pamLevel)
|
||||
switch pamLevel
|
||||
case 4
|
||||
lineStyle = "-";
|
||||
marker = "o";
|
||||
case 6
|
||||
lineStyle = "--";
|
||||
marker = "square";
|
||||
case 8
|
||||
lineStyle = ":";
|
||||
marker = "diamond";
|
||||
otherwise
|
||||
lineStyle = "-.";
|
||||
marker = "^";
|
||||
end
|
||||
end
|
||||
@@ -3,7 +3,7 @@ dsp_options = struct();
|
||||
dsp_options.mode = "run_id";
|
||||
dsp_options.recipe = @mpi_recipe_dev;
|
||||
dsp_options.append_to_db = false;
|
||||
dsp_options.start_occurence = 5;
|
||||
dsp_options.start_occurence = 1;
|
||||
dsp_options.max_occurences = 15;
|
||||
dsp_options.debug_plots = false;
|
||||
|
||||
@@ -13,7 +13,7 @@ mpi_reduction_study_name = "pam6_8_sweep";
|
||||
mpi_reduction_writer_path = fullfile(fileparts(mfilename('fullpath')),"db");
|
||||
addpath(mpi_reduction_writer_path);
|
||||
|
||||
dsp_options.database_type = "mysql";
|
||||
dsp_options.database_type = "mysql";
|
||||
|
||||
dsp_options.dataBase = "labor";
|
||||
|
||||
@@ -51,7 +51,7 @@ for i = 1
|
||||
fp.where('Runs', 'symbolrate', 'EQUALS', B); % 72 96 112
|
||||
fp.where('Runs', 'fiber_length', 'EQUALS', 0);
|
||||
fp.where('Runs', 'interference_path_length', 'EQUALS', 1000);
|
||||
fp.where('Runs', 'sir', 'LESS_EQUAL', 20);
|
||||
fp.where('Runs', 'sir', 'LESS_EQUAL', 50);
|
||||
fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
|
||||
% fp.where('Runs', 'is_mpi', 'EQUALS', 1);
|
||||
fp.where('Runs', 'pam_level', 'EQUALS', M);
|
||||
@@ -62,14 +62,20 @@ for i = 1
|
||||
[~, sortIdx] = sort(dataTable.sir, 'descend');
|
||||
dataTable = dataTable(sortIdx, :);
|
||||
|
||||
dataTable = dataTable(1,:);
|
||||
% desired_sir = [15,22,26,30,38];
|
||||
% desired_sir = [22,30,38];
|
||||
% % Filter dataTable to only keep rows with sir in desired_sir
|
||||
% isDesired = ismember(dataTable.sir, desired_sir);
|
||||
% dataTable = dataTable(isDesired, :);
|
||||
% dataTable = dataTable(1,:);
|
||||
|
||||
run_ids = dataTable.run_id;
|
||||
|
||||
%% === Warehouse setup ===
|
||||
dsp_options.userParameters = struct();
|
||||
dsp_options.userParameters.block_update = 1;%[1,2,4,8,16,32,64,112,224,448,448*2,1024,2048,4096,8192,16384];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)];
|
||||
dsp_options.userParameters.hpf = [2e6:2e6:10e6,20e6:10e6:100e6];
|
||||
% dsp_options.userParameters.hpf = [2e6:0.5e6:10e6];
|
||||
% dsp_options.userParameters.bufferlen = [112,224,448,448*2,1024,2048,4096,8192,16384];
|
||||
wh = DataStorage(dsp_options.userParameters);
|
||||
|
||||
%%
|
||||
@@ -85,7 +91,7 @@ for i = 1
|
||||
%% === Run ===
|
||||
% submitJobs returns the raw per-job results and the filled Warehouse. For a
|
||||
% single run_id and remove_dc = [0, 1], results is a 2-by-1 cell array.
|
||||
[results, wh] = submitJobs(run_ids, dsp_options, processingMode.parallel, ...
|
||||
[results, wh] = submitJobs(run_ids, dsp_options, processingMode.serial, ...
|
||||
"wh", wh, ...
|
||||
"waitbar", true);
|
||||
|
||||
@@ -109,9 +115,9 @@ storageNames = fieldnames(wh.sto);
|
||||
|
||||
x_base = dataTable.sir(:).';
|
||||
x_base = dsp_options.userParameters.block_update;
|
||||
x_base = dsp_options.userParameters.hpf;
|
||||
|
||||
figure(2026); clf; hold on
|
||||
x_base = dsp_options.userParameters.bufferlen;
|
||||
% x_base = dsp_options.userParameters.hpf;
|
||||
figure(2029); hold on
|
||||
for storage_idx = 1:numel(storageNames)
|
||||
storageName = storageNames{storage_idx};
|
||||
result = wh.sto.(storageName);
|
||||
|
||||
@@ -8,7 +8,7 @@ clear; clc;
|
||||
|
||||
studyName = "block_update_sweep";
|
||||
pathLengthToPlot = 1000;
|
||||
selectedPamLevels = 6; % set [] to use all PAM levels in the query result
|
||||
selectedPamLevels = 4; % set [] to use all PAM levels in the query result
|
||||
selectedAlgorithms = []; % set [] to use all algorithms in the query result
|
||||
|
||||
useBoundedLines = true;
|
||||
|
||||
Reference in New Issue
Block a user