Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/w/h/WHIPS-1.2.3/process_sat/function_unittests.py   WHIPS(Download)
    def test_proj2Geo_vs_matlab(self):
        for ((x, y), (lat, lon)) in izip(self.knownProjCoords, self.knownGeoCoords):
            (latCalc, lonCalc) = self.instance.projectedToGeo(y, x)
            # wrap to 0-360 standard for comparison
            lonCalc = utils.wrap_lon_0_360(lonCalc)
            lon = utils.wrap_lon_0_360(lon)
    def test_griddedToGeo_vs_matlab(self):
        for ((row, col), (lat, lon)) in izip(self.knownGridCoords, self.knownGeoCoords):
            (latCalc, lonCalc) = self.instance.griddedToGeo(row, col)
            # wrap to 0-360 standard for comparison
            lonCalc = utils.wrap_lon_0_360(lonCalc)
            lon = utils.wrap_lon_0_360(lon)
    def test_wrap_lon_0_360_known_inputs(self):
        knownIn = [0, 360, 180, 47.5, -47.5, -80, -180, -365, -725, 410]
        knownOut = [0, 0, 180, 47.5, 312.5, 280, 180, 355, 355, 50]
        compOut = [utils.wrap_lon_0_360(lon) for lon in knownIn]
        self.assertListEqual(knownOut, compOut)