Ejemplo n.º 1
0
    def _test_lonsincos(self, *args, **kwargs):
        degree = 6
        longitudes = [float(v) for v in range(-180, 180, 30)]

        for longitude in longitudes:
            self._assert_allclose(
                lonsincos(longitude, degree, *args, **kwargs),
                self.reference(longitude, degree))
Ejemplo n.º 2
0
 def test_lonsincos_zero_degree(self):
     self._assert_allclose(lonsincos(0, 0), ([0.0], [1.0]))
     self._assert_allclose(lonsincos(90, 0, False), ([0.0], [1.0]))
     self._assert_allclose(lonsincos(-90, 0, True), ([0.0], [1.0]))
Ejemplo n.º 3
0
 def get_series(cls, degree, latitude, longitude, radius):
     rad_series = relradpow(radius, degree, is_internal=cls.is_internal)
     sin_series, cos_series = lonsincos(longitude, degree)
     p_series, dp_series = legendre(latitude, degree)
     return rad_series, sin_series, cos_series, p_series, dp_series