@Test public void testFloatBandStatisticsWithNoDataValueSet() throws Exception { final Band band = createTestBand(ProductData.TYPE_FLOAT32, 100, 120); band.setNoDataValueUsed(true); band.setNoDataValue(-0.5); Stx stx = new StxFactory().withRoiImage(band.getValidMaskImage()).create(band, ProgressMonitor.NULL); assertEquals(5.0e-1, stx.getMedian(), 0.1e-1); assertEquals(4.1e-5, stx.getMean(), 0.1e-5); assertEquals(3464.4, stx.getStandardDeviation(), 1.0e-1); band.setNoDataValue(0.5); stx = new StxFactory().withRoiImage(band.getValidMaskImage()).create(band, ProgressMonitor.NULL); assertEquals(-5.0e-1, stx.getMedian(), 0.1e-1); assertEquals(-4.1e-5, stx.getMean(), 0.1e-5); assertEquals(3464.4, stx.getStandardDeviation(), 1.0e-1); }