### SLA_UNPCD

ACTION:
Remove pincushion/barrel distortion from a distorted $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$ to give tangent-plane $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$.
CALL:
CALL sla_UNPCD (DISCO,X,Y)
##### GIVEN:
 DISCO D pincushion/barrel distortion coefficient X,Y D distorted $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$

##### RETURNED:
 X,Y D tangent-plane $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$

NOTES:
(1)
The distortion is of the form $\rho =r\left(1+c{r}^{2}\right)$, where $r$ is the radial distance from the tangent point, $c$ is the DISCO argument, and $\rho$ is the radial distance in the presence of the distortion.
(2)
For pincushion distortion, C is +ve; for barrel distortion, C is $-$ve.
(3)
For X,Y in units of one projection radius (in the case of a photographic plate, the focal length), the following DISCO values apply:

 Geometry DISCO astrograph 0.0 Schmidt $-$0.3333 AAT PF doublet +147.069 AAT PF triplet +178.585 AAT f/8 +21.20 JKT f/8 +14.6
(4)
The present routine is a rigorous inverse of the companion routine sla_PCD. The expression for $\rho$ in Note 1 is rewritten in the form ${x}^{3}+ax+b=0$ and solved by standard techniques.
(5)
Cases where the cubic has multiple real roots can sometimes occur, corresponding to extreme instances of barrel distortion where up to three different undistorted $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$s all produce the same distorted $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$. However, only one solution is returned, the one that produces the smallest change in $\left[\phantom{\rule{0.3em}{0ex}}x,y\phantom{\rule{0.3em}{0ex}}\right]$.