public ImageIcon createLargeImage(double[][] vectors)
    {
        BufferedImage neuronImage = neuronImage = new BufferedImage(402, 81, BufferedImage.TYPE_INT_RGB); 
        for (int j = 0;j<vectors.length;j++)
        {
            double[] vector = vectors[j];
            int firstX = 0, firstY = 0;
            if (j * 40 <= 360){
                firstX = j * 40;
                firstY = 0;
            }
            else {
                firstX = (j - 10) * 40;
                firstY = 40;
            }
                
        
            
            for (int i = 0 ; i< 20; i++)
                for (int k = 0 ; k< 20; k++){
                    int gray = (int)Math.round(vector[20*i + k] + 128);
                    if ((gray < 0 ))
                        gray = 0;
                    if (gray > 255)
                        gray = 255;
                    Color cr = new Color(gray,gray,gray);
                    int RGB = cr.getRGB();
                    neuronImage.setRGB(2 * i + firstX, 2 * k + firstY, RGB);
                    neuronImage.setRGB((2 * i) + 1 + firstX, 2 * k + firstY, RGB);
                    neuronImage.setRGB(2 * i + firstX, (2 * k) + 1 + firstY, RGB);
                    neuronImage.setRGB((2 * i) + 1 + firstX, (2 * k) + 1 + firstY, RGB);
                }
            
        }
        return new ImageIcon(neuronImage);
    }