@Test public void testGetRho() { ArrayList<double[]> interpolateValues = getInterpolationValues(); double rayleighOpticalThickness = 1.0; double massAir = 1.0; double cosOZARad = 1.5; double cosSZARad = 1.5; double[] fourierSeriesCof = {1.2, 2.2, 3.0}; double[] fourierSeriesExpected = algo.getFourierSeries(rayleighOpticalThickness, massAir, cosOZARad, cosSZARad, interpolateValues, fourierSeriesCof); assertEquals(3, fourierSeriesExpected.length); assertEquals(0.6321, fourierSeriesExpected[0], 1e-4); }
double[] getFourierSeries(double rayleighOpticalThickness, double massAir, double cosOZARad, double cosSZARad, List<double[]> interpolateValues, double[] fourierSeriesCof) { double[] rhoRm = new double[fourierSeriesCof.length]; for (int i = 0; i < fourierSeriesCof.length; i++) { double[] interpolatedValueABCD = interpolateValues.get(i); double a = interpolatedValueABCD[0]; double b = interpolatedValueABCD[1]; double c = interpolatedValueABCD[2]; double d = interpolatedValueABCD[3]; double rayPrimaryScatters = (fourierSeriesCof[i] / (4.0 * (cosSZARad + cosOZARad))) * (1.0 - Math.exp(-massAir * rayleighOpticalThickness)); double rayMultiCorr = a + b * rayleighOpticalThickness + c * Math.pow(rayleighOpticalThickness, 2) + d * Math.pow(rayleighOpticalThickness, 3); rhoRm[i] = rayMultiCorr * rayPrimaryScatters; } return rhoRm; }
RayleighCorrAlgorithm { double[] getFourierSeries(double rayleighOpticalThickness, double massAir, double cosOZARad, double cosSZARad, List<double[]> interpolateValues, double[] fourierSeriesCof) { double[] rhoRm = new double[fourierSeriesCof.length]; for (int i = 0; i < fourierSeriesCof.length; i++) { double[] interpolatedValueABCD = interpolateValues.get(i); double a = interpolatedValueABCD[0]; double b = interpolatedValueABCD[1]; double c = interpolatedValueABCD[2]; double d = interpolatedValueABCD[3]; double rayPrimaryScatters = (fourierSeriesCof[i] / (4.0 * (cosSZARad + cosOZARad))) * (1.0 - Math.exp(-massAir * rayleighOpticalThickness)); double rayMultiCorr = a + b * rayleighOpticalThickness + c * Math.pow(rayleighOpticalThickness, 2) + d * Math.pow(rayleighOpticalThickness, 3); rhoRm[i] = rayMultiCorr * rayPrimaryScatters; } return rhoRm; } }
RayleighCorrAlgorithm { double[] getFourierSeries(double rayleighOpticalThickness, double massAir, double cosOZARad, double cosSZARad, List<double[]> interpolateValues, double[] fourierSeriesCof) { double[] rhoRm = new double[fourierSeriesCof.length]; for (int i = 0; i < fourierSeriesCof.length; i++) { double[] interpolatedValueABCD = interpolateValues.get(i); double a = interpolatedValueABCD[0]; double b = interpolatedValueABCD[1]; double c = interpolatedValueABCD[2]; double d = interpolatedValueABCD[3]; double rayPrimaryScatters = (fourierSeriesCof[i] / (4.0 * (cosSZARad + cosOZARad))) * (1.0 - Math.exp(-massAir * rayleighOpticalThickness)); double rayMultiCorr = a + b * rayleighOpticalThickness + c * Math.pow(rayleighOpticalThickness, 2) + d * Math.pow(rayleighOpticalThickness, 3); rhoRm[i] = rayMultiCorr * rayPrimaryScatters; } return rhoRm; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); }
RayleighCorrAlgorithm { double[] getFourierSeries(double rayleighOpticalThickness, double massAir, double cosOZARad, double cosSZARad, List<double[]> interpolateValues, double[] fourierSeriesCof) { double[] rhoRm = new double[fourierSeriesCof.length]; for (int i = 0; i < fourierSeriesCof.length; i++) { double[] interpolatedValueABCD = interpolateValues.get(i); double a = interpolatedValueABCD[0]; double b = interpolatedValueABCD[1]; double c = interpolatedValueABCD[2]; double d = interpolatedValueABCD[3]; double rayPrimaryScatters = (fourierSeriesCof[i] / (4.0 * (cosSZARad + cosOZARad))) * (1.0 - Math.exp(-massAir * rayleighOpticalThickness)); double rayMultiCorr = a + b * rayleighOpticalThickness + c * Math.pow(rayleighOpticalThickness, 2) + d * Math.pow(rayleighOpticalThickness, 3); rhoRm[i] = rayMultiCorr * rayPrimaryScatters; } return rhoRm; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); RayleighOutput getRayleighReflectance(RayleighInput rayleighInput, RayleighAux rayleighAux,
                                                 double[] absorptionOfBand, Product product); void getRayleighThicknessBodhaineTest(); }
RayleighCorrAlgorithm { double[] getFourierSeries(double rayleighOpticalThickness, double massAir, double cosOZARad, double cosSZARad, List<double[]> interpolateValues, double[] fourierSeriesCof) { double[] rhoRm = new double[fourierSeriesCof.length]; for (int i = 0; i < fourierSeriesCof.length; i++) { double[] interpolatedValueABCD = interpolateValues.get(i); double a = interpolatedValueABCD[0]; double b = interpolatedValueABCD[1]; double c = interpolatedValueABCD[2]; double d = interpolatedValueABCD[3]; double rayPrimaryScatters = (fourierSeriesCof[i] / (4.0 * (cosSZARad + cosOZARad))) * (1.0 - Math.exp(-massAir * rayleighOpticalThickness)); double rayMultiCorr = a + b * rayleighOpticalThickness + c * Math.pow(rayleighOpticalThickness, 2) + d * Math.pow(rayleighOpticalThickness, 3); rhoRm[i] = rayMultiCorr * rayPrimaryScatters; } return rhoRm; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); RayleighOutput getRayleighReflectance(RayleighInput rayleighInput, RayleighAux rayleighAux,
                                                 double[] absorptionOfBand, Product product); void getRayleighThicknessBodhaineTest();  }