function plotInLoop(obj,E_ftfxfy_e,k)
% figure(111),plot(obj.simResults.signal.PulseEnergy);
if ~mod(k,obj.simProp.showResultEach)
%%
detectorNames=fieldnames(obj.detectors);
N=length(detectorNames);
for i=1:N    

    detector=detectorNames{i};

    [~,Intensity,Ph,GD,GDD]=obj.getSpectrum(E_ftfxfy_e,'detector',detector,'alpha',0);


    GD(Intensity < max(Intensity)*1e-2)=nan;


    figure(111)
    subplot(N,1,i)
    yyaxis left
    plot(obj.constVect.lambda,Intensity);
    xlim(3e8./fliplr(obj.detectors.(detector).ftlim));
    title([detector,' E_p=',num2str(obj.simResults.(detector).PulseEnergy(end),3),'J, cL=',num2str(obj.simResults.(detector).centerWavelength(end),3),'nm, TL=',num2str(obj.simResults.(detector).TL(end),3),'fs'])
    xlabel('wavelength (m)')
    ylabel('Intensity (arb.u.)') 

    yyaxis right
    plot(obj.constVect.lambda,GD*1e15)
    ylabel('GD (fs)')



end

end