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 287 of file test.py.
288 """Make an astshim.PolyMap suitable for testing
290 The forward transform is as follows:
291 fj(x) = C0j x0^2 + C1j x1^2 + C2j x2^2 + ...
292 + CNj xN^2 where Cij = 0.001 (i+j+1)
294 The reverse transform is the same equation with i and j reversed
295 thus it is NOT the inverse of the forward direction,
296 but is something that can be easily evaluated.
298 The equation is chosen for the following reasons:
299 - It is well defined for any positive value of nIn, nOut.
300 - It stays small for small x, to avoid wraparound of angles for
301 SpherePoint endpoints.
305 polyMap = PolyMap(forwardCoeffs, reverseCoeffs)
306 assert polyMap.nIn == nIn
307 assert polyMap.nOut == nOut
308 assert polyMap.hasForward
309 assert polyMap.hasInverse