@Test public void testCalculateRayleighCrossSection() { double[] sectionSigma = algo.getCrossSection(new double[]{1., 2.}); assertEquals(2, sectionSigma.length); assertEquals(1.004158010817489E-9, sectionSigma[0], 1e-8); assertEquals(3.9154039638717356E-12, sectionSigma[1], 1e-8); }
double[] getCrossSection(double[] lambdas) { double n_ratio = 1 + 0.54 * (RayleighConstants.CO2 - 0.0003); double molecularDen = RayleighConstants.Molecular_cm3; double[] sigma = new double[lambdas.length]; for (int i = 0; i < lambdas.length; i++) { double lambdamm = lambdas[i] / 1000.0; double lambdaWLcm = lambdas[i] / 1.E7; double F_N2 = 1.034 + 0.000317 / Math.pow(lambdamm, 2); double F_O2 = 1.096 + 0.001385 / Math.pow(lambdamm, 2) + 0.0001448 / Math.pow(lambdamm, 4); double n_1_300 = (8060.51 + (2480990.0 / (132.274 - Math.pow(lambdamm, (-2)))) + (17455.7 / (39.32957 - Math.pow(lambdamm, (-2))))) / 100000000; double F_air = (78.084 * F_N2 + 20.946 * F_O2 + 0.934 * 1 + RayleighConstants.C_CO2 * 1.15) / (78.084 + 20.946 + 0.934 + RayleighConstants.C_CO2); double nCO2 = n_ratio * n_1_300 + 1.; sigma[i] = 24 * Math.pow(Math.PI, 3) * Math.pow((Math.pow(nCO2, 2) - 1), 2) / (Math.pow(lambdaWLcm, 4) * Math.pow(molecularDen, 2) * Math.pow((Math.pow(nCO2, 2) + 2), 2)) * F_air; } return sigma; }
RayleighCorrAlgorithm { double[] getCrossSection(double[] lambdas) { double n_ratio = 1 + 0.54 * (RayleighConstants.CO2 - 0.0003); double molecularDen = RayleighConstants.Molecular_cm3; double[] sigma = new double[lambdas.length]; for (int i = 0; i < lambdas.length; i++) { double lambdamm = lambdas[i] / 1000.0; double lambdaWLcm = lambdas[i] / 1.E7; double F_N2 = 1.034 + 0.000317 / Math.pow(lambdamm, 2); double F_O2 = 1.096 + 0.001385 / Math.pow(lambdamm, 2) + 0.0001448 / Math.pow(lambdamm, 4); double n_1_300 = (8060.51 + (2480990.0 / (132.274 - Math.pow(lambdamm, (-2)))) + (17455.7 / (39.32957 - Math.pow(lambdamm, (-2))))) / 100000000; double F_air = (78.084 * F_N2 + 20.946 * F_O2 + 0.934 * 1 + RayleighConstants.C_CO2 * 1.15) / (78.084 + 20.946 + 0.934 + RayleighConstants.C_CO2); double nCO2 = n_ratio * n_1_300 + 1.; sigma[i] = 24 * Math.pow(Math.PI, 3) * Math.pow((Math.pow(nCO2, 2) - 1), 2) / (Math.pow(lambdaWLcm, 4) * Math.pow(molecularDen, 2) * Math.pow((Math.pow(nCO2, 2) + 2), 2)) * F_air; } return sigma; } }
RayleighCorrAlgorithm { double[] getCrossSection(double[] lambdas) { double n_ratio = 1 + 0.54 * (RayleighConstants.CO2 - 0.0003); double molecularDen = RayleighConstants.Molecular_cm3; double[] sigma = new double[lambdas.length]; for (int i = 0; i < lambdas.length; i++) { double lambdamm = lambdas[i] / 1000.0; double lambdaWLcm = lambdas[i] / 1.E7; double F_N2 = 1.034 + 0.000317 / Math.pow(lambdamm, 2); double F_O2 = 1.096 + 0.001385 / Math.pow(lambdamm, 2) + 0.0001448 / Math.pow(lambdamm, 4); double n_1_300 = (8060.51 + (2480990.0 / (132.274 - Math.pow(lambdamm, (-2)))) + (17455.7 / (39.32957 - Math.pow(lambdamm, (-2))))) / 100000000; double F_air = (78.084 * F_N2 + 20.946 * F_O2 + 0.934 * 1 + RayleighConstants.C_CO2 * 1.15) / (78.084 + 20.946 + 0.934 + RayleighConstants.C_CO2); double nCO2 = n_ratio * n_1_300 + 1.; sigma[i] = 24 * Math.pow(Math.PI, 3) * Math.pow((Math.pow(nCO2, 2) - 1), 2) / (Math.pow(lambdaWLcm, 4) * Math.pow(molecularDen, 2) * Math.pow((Math.pow(nCO2, 2) + 2), 2)) * F_air; } return sigma; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); }
RayleighCorrAlgorithm { double[] getCrossSection(double[] lambdas) { double n_ratio = 1 + 0.54 * (RayleighConstants.CO2 - 0.0003); double molecularDen = RayleighConstants.Molecular_cm3; double[] sigma = new double[lambdas.length]; for (int i = 0; i < lambdas.length; i++) { double lambdamm = lambdas[i] / 1000.0; double lambdaWLcm = lambdas[i] / 1.E7; double F_N2 = 1.034 + 0.000317 / Math.pow(lambdamm, 2); double F_O2 = 1.096 + 0.001385 / Math.pow(lambdamm, 2) + 0.0001448 / Math.pow(lambdamm, 4); double n_1_300 = (8060.51 + (2480990.0 / (132.274 - Math.pow(lambdamm, (-2)))) + (17455.7 / (39.32957 - Math.pow(lambdamm, (-2))))) / 100000000; double F_air = (78.084 * F_N2 + 20.946 * F_O2 + 0.934 * 1 + RayleighConstants.C_CO2 * 1.15) / (78.084 + 20.946 + 0.934 + RayleighConstants.C_CO2); double nCO2 = n_ratio * n_1_300 + 1.; sigma[i] = 24 * Math.pow(Math.PI, 3) * Math.pow((Math.pow(nCO2, 2) - 1), 2) / (Math.pow(lambdaWLcm, 4) * Math.pow(molecularDen, 2) * Math.pow((Math.pow(nCO2, 2) + 2), 2)) * F_air; } return sigma; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); RayleighOutput getRayleighReflectance(RayleighInput rayleighInput, RayleighAux rayleighAux,
                                                 double[] absorptionOfBand, Product product); void getRayleighThicknessBodhaineTest(); }
RayleighCorrAlgorithm { double[] getCrossSection(double[] lambdas) { double n_ratio = 1 + 0.54 * (RayleighConstants.CO2 - 0.0003); double molecularDen = RayleighConstants.Molecular_cm3; double[] sigma = new double[lambdas.length]; for (int i = 0; i < lambdas.length; i++) { double lambdamm = lambdas[i] / 1000.0; double lambdaWLcm = lambdas[i] / 1.E7; double F_N2 = 1.034 + 0.000317 / Math.pow(lambdamm, 2); double F_O2 = 1.096 + 0.001385 / Math.pow(lambdamm, 2) + 0.0001448 / Math.pow(lambdamm, 4); double n_1_300 = (8060.51 + (2480990.0 / (132.274 - Math.pow(lambdamm, (-2)))) + (17455.7 / (39.32957 - Math.pow(lambdamm, (-2))))) / 100000000; double F_air = (78.084 * F_N2 + 20.946 * F_O2 + 0.934 * 1 + RayleighConstants.C_CO2 * 1.15) / (78.084 + 20.946 + 0.934 + RayleighConstants.C_CO2); double nCO2 = n_ratio * n_1_300 + 1.; sigma[i] = 24 * Math.pow(Math.PI, 3) * Math.pow((Math.pow(nCO2, 2) - 1), 2) / (Math.pow(lambdaWLcm, 4) * Math.pow(molecularDen, 2) * Math.pow((Math.pow(nCO2, 2) + 2), 2)) * F_air; } return sigma; } RayleighCorrAlgorithm(String bandPattern, int numBands);  RayleighCorrAlgorithm(Sensor sensor); RayleighOutput getRayleighReflectance(RayleighInput rayleighInput, RayleighAux rayleighAux,
                                                 double[] absorptionOfBand, Product product); void getRayleighThicknessBodhaineTest();  }