Project: datamanagement
Issue DM-4045: integrate Gtransfo functionality with XYTransform
{{meas_simastrom}} includes a {{Gtransfo}} class hierarchy that is similar to {{afw.geom.XYTransform}}, but with more functionality and some intentional differences, including: - {{XYTransform}} objects are immutable; {{Gtransfo}} objects are not. - {{Gtransfo}} objects expose their parametrization, and can compute various derivatives with respect to those parameters. {{XYTransforms}} are essentially black-box functions, and expose no parameterization. Unifying these classes is not entirely straightforward, and should include an RFC for the design prior to implementation. Overall, I think {{XYTransform}}'s simpler, lower-functionality interface and immutability is worth mostly preserving somehow; I think it's a more fundamental interface than {{Gtransfo}} that can be used in more places. But obviously we need to provide the more extensive {{Gtransfo}} interface somehow as well. My initial thought is that we should have two parallel class hierarchies (with a concrete class for each type of transform, such as polynomial distortion, in both), and an ultimate base class shared by both hierarchies. That ultimate base class would contain most of the current {{XYTransform}} interface but not require immutability, and one side of the tree would contain simple immutable objects while the other would contain the more extensive parameterized interface of {{Gtransfo}}.
Story points: 8