@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."); }
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 { 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 { 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); }
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(); }
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();  }