@Test(expected = IllegalArgumentException.class) public void testExceptionDetectorIndexToSmall() throws Exception { EqualizationAlgorithm algorithm = new EqualizationAlgorithm(new ProductData.UTC(), new EqualizationLUT(new Reader[0])); algorithm.performEqualization(0.0, 15, -1); }
public double performEqualization(double value, int spectralIndex, int detectorIndex) { Assert.argument(spectralIndex >= 0 && spectralIndex <= 14, "spectralIndex < 0 && spectralIndex > 14"); Assert.argument(detectorIndex >= 0, "detectorIndex < 0"); final double[] coefficients = equalizationLUT.getCoefficients(spectralIndex, detectorIndex); double cEq = coefficients[0] + coefficients[1] * julianDate + coefficients[2] * julianDate * julianDate; if (cEq == 0.0) { return value; } return value / cEq; }
EqualizationAlgorithm { public double performEqualization(double value, int spectralIndex, int detectorIndex) { Assert.argument(spectralIndex >= 0 && spectralIndex <= 14, "spectralIndex < 0 && spectralIndex > 14"); Assert.argument(detectorIndex >= 0, "detectorIndex < 0"); final double[] coefficients = equalizationLUT.getCoefficients(spectralIndex, detectorIndex); double cEq = coefficients[0] + coefficients[1] * julianDate + coefficients[2] * julianDate * julianDate; if (cEq == 0.0) { return value; } return value / cEq; } }
EqualizationAlgorithm { public double performEqualization(double value, int spectralIndex, int detectorIndex) { Assert.argument(spectralIndex >= 0 && spectralIndex <= 14, "spectralIndex < 0 && spectralIndex > 14"); Assert.argument(detectorIndex >= 0, "detectorIndex < 0"); final double[] coefficients = equalizationLUT.getCoefficients(spectralIndex, detectorIndex); double cEq = coefficients[0] + coefficients[1] * julianDate + coefficients[2] * julianDate * julianDate; if (cEq == 0.0) { return value; } return value / cEq; } EqualizationAlgorithm(Product product, ReprocessingVersion version);  EqualizationAlgorithm(ProductData.UTC utc, EqualizationLUT equalizationLUT); }
EqualizationAlgorithm { public double performEqualization(double value, int spectralIndex, int detectorIndex) { Assert.argument(spectralIndex >= 0 && spectralIndex <= 14, "spectralIndex < 0 && spectralIndex > 14"); Assert.argument(detectorIndex >= 0, "detectorIndex < 0"); final double[] coefficients = equalizationLUT.getCoefficients(spectralIndex, detectorIndex); double cEq = coefficients[0] + coefficients[1] * julianDate + coefficients[2] * julianDate * julianDate; if (cEq == 0.0) { return value; } return value / cEq; } EqualizationAlgorithm(Product product, ReprocessingVersion version);  EqualizationAlgorithm(ProductData.UTC utc, EqualizationLUT equalizationLUT); double performEqualization(double value, int spectralIndex, int detectorIndex); }
EqualizationAlgorithm { public double performEqualization(double value, int spectralIndex, int detectorIndex) { Assert.argument(spectralIndex >= 0 && spectralIndex <= 14, "spectralIndex < 0 && spectralIndex > 14"); Assert.argument(detectorIndex >= 0, "detectorIndex < 0"); final double[] coefficients = equalizationLUT.getCoefficients(spectralIndex, detectorIndex); double cEq = coefficients[0] + coefficients[1] * julianDate + coefficients[2] * julianDate * julianDate; if (cEq == 0.0) { return value; } return value / cEq; } EqualizationAlgorithm(Product product, ReprocessingVersion version);  EqualizationAlgorithm(ProductData.UTC utc, EqualizationLUT equalizationLUT); double performEqualization(double value, int spectralIndex, int detectorIndex);  }