C+ C NAME: C ThomsonPDistance C PURPOSE: C Find the distance to the plane of the sky where a single electron C would have a given polarization. C CALLING SEQUENCE: function ThomsonPDistance(ElSun,U,P) C INPUTS: C ElSun real distance Sun-Electron (in solar radii) C U real limb darkening coefficient C P real polarization (-1<=P<=1) C OUTPUTS: C ThomsonPDistance C real distance to the plane of the sky (solar radii) (>=0) C (ElSun*cos(Chi)) C CALLS: C ThomsonSoup, BadR4 C PROCEDURE: C > The distance to the plane of the sky is given as a positive number. C There are two locations on either side of the plane of the sky C which match the polarization. C > An electron can only produce a positive polarization. If a negative C polarization is specified, then D=BadR4() is returned C > An electron can only produce a polarization below a certain maximum C (less than one). If a polarization above the maximum value is specified C the D=-1. is returned. C MODIFICATION HISTORY: C JUL-1996, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- real ElSun real U real P call ThomsonSoup(ElSun,U,rIt,rItr) Q = P*(2*rIt/rItr-1) if (0 .lt. P .and. Q .le. 1) then ThomsonPDistance = ElSun*sqrt((1-Q)/(1+P)) else ThomsonPDistance = BadR4() end if return end