RayleighCorrAlgorithm { double[] getCorrOzone(double[] rho_ng_ref, double absorpO, double[] ozones, double[] cosOZARads, double[] cosSZARads) { double[] ozoneCorrRefl = new double[rho_ng_ref.length]; for (int i = 0; i < rho_ng_ref.length; i++) { double cts = cosSZARads[i]; double ctv = cosOZARads[i]; double ozone = ozones[i]; double rho_ng = rho_ng_ref[i]; ozoneCorrRefl[i] = Double.isNaN(rho_ng) ? Double.NaN : getCorrOzone(rho_ng, absorpO, ozone, cts, ctv); } return ozoneCorrRefl; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); RayleighOutput getRayleighReflectance(RayleighInput rayleighInput, RayleighAux rayleighAux,
                                                 double[] absorptionOfBand, Product product); void getRayleighThicknessBodhaineTest();  }
@Test(expected = ArithmeticException.class) public void testCorrectOzone() { int cosViewAngle = 1; int cosSunAngel = 1; int ozone = 1; int absorpO = 1; int rayThickness = 1; double corrOzone = algo.getCorrOzone(rayThickness, absorpO, ozone, cosSunAngel, cosViewAngle); assertEquals(1.002, corrOzone, 1e-3); cosSunAngel = 0; cosViewAngle = 0; corrOzone = algo.getCorrOzone(rayThickness, absorpO, ozone, cosSunAngel, cosViewAngle); assertEquals(1.002, corrOzone, 1e-3); fail("The sun angel and the view angle must not be zero."); }
@Test(expected = ArithmeticException.class) public void testCorrectOzoneZeroDenominator() { int cosSunAngel = 0; int cosViewAngle = 0; int ozone = 1; int absorpO = 1; int rayThickness = 1; double corrOzone = algo.getCorrOzone(rayThickness, absorpO, ozone, cosSunAngel, cosViewAngle); assertEquals(1.002, corrOzone, 1e-3); fail("The sun angel and the view angle must not be zero."); }
@Test public void testCorrectOzoneZero() { int cosViewAngle = 1; int cosSunAngel = 1; int ozone = 0; int absorpO = 0; int rayThickness = 0; double corrOzone = algo.getCorrOzone(rayThickness, absorpO, ozone, cosSunAngel, cosViewAngle); assertEquals(0.0, corrOzone, 1e-3); }