pystortion provides support for distortion measurements in astronomical imagers. It includes classes to support fitting of bivariate polynomials of arbitrary degree and helper functions for crossmatching catalogs. The crossmatching uses an iterative approach in which a two-dimensional distortion model is fit at every iteration and used to continuously refine the position of extracted sources.
https://doi.org/10.5281/zenodo.3516267. Please see additional citation information here: https://github.com/spacetelescope/pystortion/blob/master/CITATION