function [ handles ] = genTestImages( handles )
% Generates pure noise images

N = 10;
xiCoor = 421;
etaCoor = 421;

imgTot = zeros(handles.numYpixels,handles.numXpixels);

for k = 1:handles.numFiltersD
    imgTot = imgTot + handles.maskCube(:,:,k).*ones(handles.numYpixels,handles.numXpixels);    
end
% imgMean = round(mean(mean(imgTot)));
imgMean = mean(mean(imgTot))
imgMult = handles.numPElectrons/imgMean;

imgTot = imgMult.*imgTot;

imgTotFFTnN = fftshift(fft2(ifftshift(imgTot)));
figure(handles.filterTestPlots(1));
imagesc(abs(imgTotFFTnN));

snrIndB = 10*log10(1/(handles.noiseMult))    


snrStr = ['SNR_' num2str(snrIndB,'%5.1f') 'dB'];
% imgTotFFTt = zeros(1,N);
stdVec = zeros(1,N);
if handles.noiseMult > 0
    parfor k=1:N    
        imgTotTemp = imgTot + handles.numPElectrons*handles.noiseMult.*randn(handles.numYpixels,handles.numXpixels);    
        imgTotFFT_T = fftshift(fft2(ifftshift(imgTotTemp)));
        stdVec(k) = imgTotFFT_T(etaCoor,xiCoor);
    end
end

% imgFFTDiff = bsxfun(@minus,imgTotFFTt,imgTotFFTnN);
imgFFTDiff = bsxfun(@minus,stdVec,squeeze(imgTotFFTnN(etaCoor,xiCoor)));
N
imgFFTStd = std(imgFFTDiff)

% figure(handles.filterTestPlots(2));
% imagesc(log10Mod(abs(imgTotFFTt)));colorbar;
% imagesc(imgFFTStd);colorbar;
% surf((abs(imgTotFFTt)),'linestyle','none');colorbar;shading interp;


