52 lines
1.6 KiB
Matlab
52 lines
1.6 KiB
Matlab
function plotChannelSpacingAna(wh,plotJob)
|
|
|
|
xAxis = wh.parameter.p_out.values;
|
|
|
|
|
|
realization = wh.parameter.realization.values(1:end);
|
|
|
|
channelsp = wh.parameter.channelspacing.values(1:end);
|
|
channelsp = [200 400].*1e9;
|
|
for ch = 1:2
|
|
channspacing = channelsp(ch);
|
|
for xl = 1:numel(xAxis)
|
|
p_out = xAxis(xl);
|
|
|
|
curber = wh.getStoValue('ber',plotJob.l,plotJob.d,plotJob.sgm,string(plotJob.pol),plotJob.p_in,p_out,plotJob.pmd,plotJob.gamma,realization,plotJob.numchannels,channspacing);
|
|
curzdw = wh.getStoValue('zdw',plotJob.l,plotJob.d,plotJob.sgm,string(plotJob.pol),plotJob.p_in,p_out,plotJob.pmd,plotJob.gamma,realization,plotJob.numchannels,channspacing);
|
|
|
|
ber(1:size(curber,1),1:size(curber,2),xl) = curber;
|
|
zdw(1:size(curber,1),1,xl) = curzdw;
|
|
|
|
end
|
|
|
|
ber = squeeze(mean(ber,1));
|
|
zdw = squeeze(mean(zdw,1));
|
|
|
|
hdfec = 3.8e-3.*ones(size(xAxis));
|
|
S = [];
|
|
wavelength={};
|
|
|
|
zdw_ = [];
|
|
zdw_chann = [];
|
|
zdw_tot = [];
|
|
S = [];
|
|
S_chann = [];
|
|
wl = round([1302.03471732576,1304.30061112288,1306.57440520904,1308.85614097425,1311.14586009814,1313.44360455251,1315.74941660391,1318.06333881618],2);
|
|
wl = 1:16;
|
|
wl = [1.2930 1.2953 1.2975 1.2998 1.3020 1.3043 1.3066 1.3089 1.3111 1.3134 1.3157 1.3181 1.3204 1.3227 1.3251 1.3274];
|
|
|
|
|
|
a = InterX([hdfec(:)';xAxis],[mean(ber,1);xAxis]);
|
|
if ~isempty(a)
|
|
s(ch) = a(2);
|
|
else
|
|
s(ch) = NaN;
|
|
end
|
|
end
|
|
|
|
figure(2224)
|
|
hold on
|
|
plot(channelsp,s,'LineWidth',1,'Color',plotJob.color,'Marker','o');
|
|
|