@@ -0,0 +1,976 @@
+package nl.fifth.postulate.tools;%0A%0Aimport nom.tam.fits.Fits;%0Aimport nom.tam.fits.FitsException;%0Aimport nom.tam.fits.ImageData;%0Aimport nom.tam.fits.ImageHDU;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0A%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.hamcrest.core.IsNot.not;%0Aimport static org.hamcrest.core.IsNull.nullValue;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class FitsTest %7B%0A    @Test%0A    public void shouldReadFitsFile() throws FitsException, IOException %7B%0A        Fits f = new Fits(%22../k2-trappist1-unofficial-tpf-long-cadence.fits%22);%0A        ImageHDU hdu = (ImageHDU) f.getHDU(2);%0A        ImageData imageData = (ImageData) hdu.getData();%0A        int%5B%5D%5B%5D image = (int%5B%5D%5B%5D) imageData.getData();%0A%0A        assertThat(hdu, is(not(nullValue())));%0A        assertThat(imageData, is(not(nullValue())));%0A        assertThat(image, is(not(nullValue())));%0A        assertThat(image.length, is(11));%0A        assertThat(image%5B0%5D.length, is(11));%0A    %7D%0A%7D%0A

Read an image from fits file