% initial parameters for the calculations - easier to track them later on

SignalLambda = 1550;
PumpLambda = 1480;
LaunchPowerPump = -2;
LaunchPowerSignal = 20;

% prepare the axis ...
axis_x = [0:1:20];
axis_z = [0.2:0.005:0.35];
axis_y_simple = zeros(max(size(axis_z)),max(size(axis_x)));
axis_y_detailed = zeros(max(size(axis_z)),max(size(axis_x)));
axis_y_detailed_minmaxdelta = zeros(3,max(size(axis_x)));

% display the SRS penalty difference between min and max examined
% attenuation for all examined distanced ...

figure(1);
title('SRS penalty difference between min and max examined attenuation @ 1550 nm');
xlabel('Transmission distance [km]');
ylabel('SRS penalty delta [dB]');
grid on;
axis square;
set(gcf,'Color','w');
hold on;

% go through all examined power levels ...
k = 0;
for SignalPower = 10:5:20

    % go through all attenuation levels 
    i=0;
    for attCoef = 0.2:0.005:0.35
        Result_simple = SRS_power_penalty(attCoef,'c','max',axis_x,SignalPower,LaunchPowerPump,SignalLambda,PumpLambda,true);
        Result_detailed = SRS_power_penalty(attCoef,'c','max',axis_x,SignalPower,LaunchPowerPump,SignalLambda,PumpLambda,false);
        axis_y_detailed(i+1,:) = Result_detailed(2,:);
        i = i + 1;
    end

    % calculate the difference between the min and max examined
    % attenuation for all examined distanced
    axis_y_detailed_minmaxdelta(k+1,:) = axis_y_detailed(1,:) - axis_y_detailed(max(size(axis_y_detailed)),:);
    k = k + 1;
end

% display the collected results on the figure
figure(1);
plot(axis_x,axis_y_detailed_minmaxdelta);
legend('10 dBm', '15 dBm', '20 dBm', 3);
hold off;
