chirped WDM analsyis
minor stuff in FSO link with Magnus
This commit is contained in:
@@ -1,7 +1,58 @@
|
||||
filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_131152_n261_14408161_10km_16ch_400ghz_co_alpha0_5.mat";
|
||||
filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_131152_n262_14408165_10km_16ch_400ghz_co_alpha-0_5.mat";
|
||||
filename = "C:\Users\Silas\Documents\MATLAB\Datensätze\FWM_2025\WDM_20260106_134921_n223_14409338_10km_16ch_400ghz_co_alpha0_0.mat";
|
||||
res = load(filename,'res');
|
||||
|
||||
base = "C:\Users\Silas\Nextcloud\Cluster";
|
||||
all_files = dir(fullfile(base, "**/*.mat"));
|
||||
|
||||
schemes = ["co","pair","alt","seg"];
|
||||
|
||||
% Preallocate as table (minimal + convenient)
|
||||
T = table('Size',[0 10], ...
|
||||
'VariableTypes', ["string","string","string","datetime","double","double","double","double","double","double"], ...
|
||||
'VariableNames', ["folder","file","scheme","date","node","jobid","L_km","Nch","df_GHz","alpha"]);
|
||||
|
||||
% filename parser
|
||||
rx = "^WDM_(?<date>\d{8})_(?<time>\d{6})_n(?<node>\d+)_(?<jobid>\d+)_" + ...
|
||||
"(?<L>\d+)km_(?<Nch>\d+)ch_(?<df>\d+)ghz_(?<scheme>[a-z]+)_alpha(?<alpha>\d+(?:_\d+)?)\.mat$";
|
||||
|
||||
for k = 1:numel(all_files)
|
||||
f = all_files(k);
|
||||
folder = string(f.folder);
|
||||
file = string(f.name);
|
||||
|
||||
tok = regexp(file, rx, 'names');
|
||||
if isempty(tok)
|
||||
continue
|
||||
end
|
||||
|
||||
% scheme from filename is the most reliable
|
||||
scheme = string(tok.scheme);
|
||||
|
||||
% optional: ignore unexpected schemes
|
||||
if ~any(strcmpi(scheme, schemes)), continue; end
|
||||
|
||||
node = str2double(tok.node);
|
||||
jobid = str2double(tok.jobid);
|
||||
L_km = str2double(tok.L);
|
||||
Nch = str2double(tok.Nch);
|
||||
df_GHz = str2double(tok.df);
|
||||
date = datetime(strcat(tok.date, tok.time), 'InputFormat','yyyyMMddHHmmss');
|
||||
|
||||
|
||||
% alpha uses "_" as decimal separator in your filenames
|
||||
alpha = str2double(strrep(tok.alpha, "_", "."));
|
||||
|
||||
T(end+1,:) = {folder, file, scheme,date, node, jobid, L_km, Nch, df_GHz, alpha};
|
||||
end
|
||||
|
||||
%%
|
||||
idx = strcmp(T.scheme,"co") & ...
|
||||
T.alpha == 0.4 & ...
|
||||
T.date >= datetime(2026,1,9) & ...
|
||||
T.date <= datetime(2026,1,10,23,59,59);
|
||||
|
||||
T_sel = T(idx,:);
|
||||
|
||||
i = 2;
|
||||
res = load(fullfile(T_sel.folder(i),T_sel.file(i)),'res');
|
||||
res = res.res;
|
||||
|
||||
%%
|
||||
@@ -9,4 +60,4 @@ res = res.res;
|
||||
S = plot_BER_vs_ROP(res, 'fec', 3.8e-3);
|
||||
|
||||
%% Routine B: violin plot (independent)
|
||||
plot_FEC_violin(res, 'tech','VNLE', 'fec',3.8e-3, 'eval_ptr',3, 'ylim',[-10 -3]);
|
||||
plot_FEC_violin(res, 'tech','VNLE', 'fec',3.8e-3, 'ylim',[-10 0]);
|
||||
|
||||
Reference in New Issue
Block a user