@@ -0,0 +1,1031 @@
+package nl.fifth.postulate.bin;%0A%0Aimport nom.tam.fits.BinaryTableHDU;%0Aimport nom.tam.fits.Fits;%0Aimport nom.tam.fits.FitsException;%0A%0Aimport java.io.IOException;%0A%0Apublic class ToCSV %7B%0A    public static void main(String%5B%5D args) throws FitsException, IOException %7B%0A        String filename = args%5B0%5D;%0A        Fits f = new Fits(filename);%0A        BinaryTableHDU hdu = (BinaryTableHDU) f.getHDU(1);%0A        double%5B%5D time = (double%5B%5D) hdu.getColumn(%22TIME%22);%0A        float%5B%5D%5B%5D%5B%5D rows = (float%5B%5D%5B%5D%5B%5D) hdu.getColumn(%22FLUX%22);%0A%0A        for (int row = 0, rowLimit = rows.length; row %3C rowLimit; row++ ) %7B%0A            System.out.printf(%22%25f%22, time%5Brow%5D);%0A            float%5B%5D%5B%5D inputImage = rows%5Brow%5D;%0A            for (int y = 0, ylimit = inputImage.length; y %3C ylimit; y++) %7B%0A                for (int x = 0, xlimit = inputImage%5B0%5D.length; x %3C xlimit; x++) %7B%0A                    float value = inputImage%5By%5D%5Bx%5D;%0A                    System.out.printf(%22,%25f%22, value);%0A                %7D%0A            %7D%0A            System.out.println();%0A        %7D%0A%0A    %7D%0A%7D%0A

Create a ToCSV class