Make an astshim.PolyMap suitable for testing
The forward transform is as follows:
fj(x) = C0j x0^2 + C1j x1^2 + C2j x2^2 + ... + CNj xN^2 where Cij = 0.001 (i+j+1)
The reverse transform is the same equation with i and j reversed
thus it is NOT the inverse of the forward direction,
but is something that can be easily evaluated.
The equation is chosen for the following reasons:
- It is well defined for any positive value of nIn, nOut
- It stays small for small x, to avoid wraparound of angles for SpherePoint endpoints
Definition at line 283 of file test.py.
284 """Make an astshim.PolyMap suitable for testing 286 The forward transform is as follows: 287 fj(x) = C0j x0^2 + C1j x1^2 + C2j x2^2 + ... + CNj xN^2 where Cij = 0.001 (i+j+1) 289 The reverse transform is the same equation with i and j reversed 290 thus it is NOT the inverse of the forward direction, 291 but is something that can be easily evaluated. 293 The equation is chosen for the following reasons: 294 - It is well defined for any positive value of nIn, nOut 295 - It stays small for small x, to avoid wraparound of angles for SpherePoint endpoints 299 polyMap = PolyMap(forwardCoeffs, reverseCoeffs)
300 assert polyMap.nIn == nIn
301 assert polyMap.nOut == nOut
302 assert polyMap.hasForward
303 assert polyMap.hasInverse
def makeTwoWayPolyMap(nIn, nOut)
def makePolyMapCoeffs(nIn, nOut)