Details
-
Type:
Improvement
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: astshim
-
Labels:
-
Story Points:1
-
Epic Link:
-
Sprint:Alert Production S17 - 3
-
Team:Alert Production
Description
PolyTran's constructor that takes only forward coefficients provides an iterative inverse by default (as does its other constructor if the forward coefficient array is empty). This seems like a bad idea for several reasons:
- Most polynomials do not have unique inverses. That said, the iterative inverse will do sensible things in that situation (nan if no value exists, else a valid value if multiple choices exist).
- The iterative inverse is much less efficient to compute than the fit inverse provided by `PolyMap.polyTran`.
I propose to disable the iterative inverse by default, using the philosophy of "when in doubt, refuse to guess".
Implemented. I also greatly expanded the explanation of how to obtain an inverse in the class documentation for PolyMap and expanded the associated unit test to test inverses for a polynomial whose inverse is not single-valued.