before new database
This commit is contained in:
@@ -27,7 +27,7 @@ db = DBHandler("dataBase", [dsp_options.dataBase],...
|
||||
pamformats = [4,6,8];
|
||||
baudrates = [112e9,96e9,72e9];
|
||||
|
||||
for i = 1:3
|
||||
for i = 1
|
||||
|
||||
B = baudrates(i);
|
||||
M = pamformats(i);
|
||||
@@ -37,7 +37,7 @@ for i = 1:3
|
||||
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', 20);
|
||||
fp.where('Runs', 'db_mode', 'EQUALS', '"no_db"');
|
||||
% fp.where('Runs', 'is_mpi', 'EQUALS', 1);
|
||||
fp.where('Runs', 'pam_level', 'EQUALS', M);
|
||||
@@ -45,13 +45,18 @@ for i = 1:3
|
||||
|
||||
[dataTable,~] = db.queryDB(fp, db.getTableFieldNames('Runs'));
|
||||
|
||||
|
||||
[~, sortIdx] = sort(dataTable.sir, 'descend');
|
||||
dataTable = dataTable(sortIdx, :);
|
||||
|
||||
% 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,512,1024,2048,2048*2,2048*4];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)];
|
||||
% dsp_options.userParameters.block_update = linspace(1,224,22);
|
||||
wh = DataStorage(dsp_options.userParameters);
|
||||
|
||||
|
||||
@@ -68,7 +73,7 @@ for i = 1:3
|
||||
%% === 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.serial, ...
|
||||
[results, wh] = submitJobs(run_ids, dsp_options, processingMode.parallel, ...
|
||||
"wh", wh, ...
|
||||
"waitbar", true);
|
||||
|
||||
@@ -78,3 +83,56 @@ for i = 1:3
|
||||
|
||||
end
|
||||
|
||||
%% Analyze
|
||||
|
||||
storageNames = fieldnames(wh.sto);
|
||||
|
||||
x_base = dataTable.sir(:).';
|
||||
% x_base = dsp_options.userParameters.block_update;
|
||||
|
||||
figure(2026); clf; hold on
|
||||
for storage_idx = 1:numel(storageNames)
|
||||
storageName = storageNames{storage_idx};
|
||||
result = wh.sto.(storageName);
|
||||
result = result(:).';
|
||||
|
||||
% Each stored entry is a package cell containing one or more occurrences.
|
||||
ber_all = cell(1,numel(result));
|
||||
for result_idx = 1:numel(result)
|
||||
packageCell = result{result_idx};
|
||||
if isempty(packageCell)
|
||||
ber_all{result_idx} = NaN;
|
||||
continue
|
||||
end
|
||||
|
||||
ber_values = nan(1,numel(packageCell));
|
||||
for package_idx = 1:numel(packageCell)
|
||||
if isstruct(packageCell{package_idx}) && isfield(packageCell{package_idx},"metrics")
|
||||
ber_values(package_idx) = packageCell{package_idx}.metrics.BER;
|
||||
end
|
||||
end
|
||||
ber_all{result_idx} = ber_values;
|
||||
end
|
||||
|
||||
maxPackages = max(cellfun(@numel,ber_all));
|
||||
ber_mat = nan(maxPackages,numel(ber_all));
|
||||
for k = 1:numel(ber_all)
|
||||
ber_mat(1:numel(ber_all{k}),k) = ber_all{k};
|
||||
end
|
||||
ber = mean(ber_mat,1,"omitnan");
|
||||
|
||||
x = x_base;
|
||||
if numel(x) ~= numel(ber)
|
||||
x = 1:numel(ber);
|
||||
end
|
||||
|
||||
h = plot(x,ber,"DisplayName",storageName);
|
||||
for k = 1:numel(x)
|
||||
scatter(repmat(x(k),maxPackages,1),ber_mat(:,k), ...
|
||||
"MarkerEdgeColor",h.Color, ...
|
||||
"HandleVisibility","off");
|
||||
end
|
||||
end
|
||||
|
||||
beautifyBERplot("logscale",true,"setcolors",false,"setmarkers",true);
|
||||
legend("Location","best","Interpreter","none");
|
||||
|
||||
Reference in New Issue
Block a user