예제 #1
0
def test_kasten96_lt():
    """Test Linke turbidity factor calculated from AOD, Pwat and AM"""
    amp = np.array([1, 3, 5])
    pwat = np.array([0, 2.5, 5])
    aod_bb = np.array([0, 0.1, 1])
    lt_expected = np.array([[[1.3802, 2.4102, 11.6802],
                             [1.16303976, 2.37303976, 13.26303976],
                             [1.12101907, 2.51101907, 15.02101907]],
                            [[2.95546945, 3.98546945, 13.25546945],
                             [2.17435443, 3.38435443, 14.27435443],
                             [1.99821967, 3.38821967, 15.89821967]],
                            [[3.37410769, 4.40410769, 13.67410769],
                             [2.44311797, 3.65311797, 14.54311797],
                             [2.23134152, 3.62134152, 16.13134152]]])
    lt = atmosphere.kasten96_lt(*np.meshgrid(amp, pwat, aod_bb))
    assert np.allclose(lt, lt_expected, 1e-3)
    return lt
예제 #2
0
def test_kasten96_lt():
    """Test Linke turbidity factor calculated from AOD, Pwat and AM"""
    amp = np.array([1, 3, 5])
    pwat = np.array([0, 2.5, 5])
    aod_bb = np.array([0, 0.1, 1])
    lt_expected = np.array(
        [[[1.3802, 2.4102, 11.6802],
          [1.16303976, 2.37303976, 13.26303976],
          [1.12101907, 2.51101907, 15.02101907]],

         [[2.95546945, 3.98546945, 13.25546945],
          [2.17435443, 3.38435443, 14.27435443],
          [1.99821967, 3.38821967, 15.89821967]],

         [[3.37410769, 4.40410769, 13.67410769],
          [2.44311797, 3.65311797, 14.54311797],
          [2.23134152, 3.62134152, 16.13134152]]]
    )
    lt = atmosphere.kasten96_lt(*np.meshgrid(amp, pwat, aod_bb))
    assert np.allclose(lt, lt_expected, 1e-3)
    return lt