def testInversePoly9(self): precision = 1e-6 inverse = inversePolyTransform(self.poly9, self.frame, precision, maxOrder=11, nSteps=100) self.checkInverse(self.poly9, inverse, 4e-5)
def testInversePoly3(self): # Different bbox for this one, because it is a focal plane to tangent plane transform. minX = 14.6927 maxX = 42.38 minY = -62.5486 maxY = -0.323848 self._makePoints(minX, maxX, minY, maxY, 200) precision = 1e-7 inverse = inversePolyTransform(self.poly3, self.frame, precision, maxOrder=5) self.checkInverse(self.poly3, inverse, 3e-8)
def testInversePoly3(self): # Different bbox for this one, because it is a focal plane to tangent plane transform. minX = 14.6927 maxX = 42.38 minY = -62.5486 maxY = -0.323848 self._makePoints(minX, maxX, minY, maxY, 200) precision = 1e-7 inverse = inversePolyTransform(self.poly3, self.frame, precision, maxOrder=5) self.checkInverse(self.poly3, inverse, 3e-8)
def testInversePoly2(self): precision = 1e-6 inverse = inversePolyTransform(self.poly2, self.frame, precision) self.checkInverse(self.poly2, inverse, 1e-7)
def testInversePolyIdentity(self): precision = 1e-8 inverse = inversePolyTransform(self.polyIdentity, self.frame, precision) self.checkInverse(self.polyIdentity, inverse, precision)
def testNotEnoughPoints(self): with self.assertRaises(RuntimeError): inversePolyTransform(self.poly2, self.frame, 1e-4, nSteps=2)
def testInversePoly9(self): precision = 1e-6 inverse = inversePolyTransform(self.poly9, self.frame, precision, maxOrder=11, nSteps=100) self.checkInverse(self.poly9, inverse, 4e-5)
def testInversePoly2(self): precision = 1e-6 inverse = inversePolyTransform(self.poly2, self.frame, precision) self.checkInverse(self.poly2, inverse, 1e-7)
def testInversePolyIdentity(self): precision = 1e-8 inverse = inversePolyTransform(self.polyIdentity, self.frame, precision) self.checkInverse(self.polyIdentity, inverse, precision)
def testNotEnoughPoints(self): with self.assertRaises(RuntimeError): inversePolyTransform(self.poly2, self.frame, 1e-4, nSteps=2)