<p>The usual equation for the deflection of light (or a massless particle), used for example for calculations of strong lensing through a cluster is derived in  Post-Newtonian theory, which is  appropriate for regions in a weak field, i.e., gravity is not too strong.  The criteria for a spherical source to be only weakly gravitating is that <span class="math-container">$\frac{M(r)}{r} &lt;&lt; \frac{c^2}{G}$</span>.  We know that the event horizon for a solar mass <span class="math-container">$\frac{2GM_\odot}{c^2}$</span> = 3 km and the radius of the Sun is <span class="math-container">$7 \times 10^{5}$</span> km, so M/R<span class="math-container">$_\odot$</span> at the surface of the Sun is <span class="math-container">$1.5/(7 \times 10^5)$</span> of <span class="math-container">$\frac{c^2}{G}$</span>.  That means the surface of the sun is well into the weak field limit.</p>
<p>What about the interior of the Sun? The Wikipedia page on  Stellar Structure shows the mass distribution for the Sun.  The interior values of <span class="math-container">$\frac{M(r)/M_\odot}{r/R_\odot}$</span> never rises above about 2 times its value at the surface.  We therefore know that the whole interior of the Sun is in the weak limit.</p>
<p>Another issue might be deciding what to integrate to determine the full GR relevant mass.  In GR, the total gravitating mass is the sum of the rest mass + internal energy + gravitational potential energy (<a href="https://www.cco.caltech.edu/%7Ekip/scripts/PubScans/II-12.pdf" rel="nofollow noreferrer">see The General-Relativistic Theory of Stellar Structure by K. S Thorne </a>).
But, since we are far in the weak limit, the two energy terms, which both depend on M/R (internal energy is set by Virial Theorem), can be ignored.  And we again have M(r) depends on rest mass.</p>
<p>The Post-Newtonian calculated gravitational deflection angle is given by:
<span class="math-container">$$
\alpha = \frac{D_{LS}}{D_S}\frac{4GM}{c^2b^2}
$$</span></p>
<ul>
<li><span class="math-container">$D_{LS}$</span> = Distance from lens to source</li>
<li><span class="math-container">$D_{S}$</span> = Distance to source</li>
<li>b = impact parameter = <span class="math-container">$D_L(\beta+\alpha) \sim D_L\beta$</span></li>
<li><span class="math-container">$D_L$</span> = Distance to lens</li>
<li><span class="math-container">$\beta$</span> = angle to source</li>
<li><span class="math-container">$M$</span> is mass in cylinder of radius b
You can scale things by knowing that the deflection angle at the limb of the sun is 1.752 arcsec.</li>
</ul>
<p>There may be multiple solutions, so one may need to search a large area in the lens plane to find all of the solutions where the rays go from the source to viewer.</p>

CC BY-SA 4.0
2023-06-07T21:30:21.297Z
Are you certain that this approximation is valid when $b$ is smaller than the diameter of the Sun? Can you support that with authoritative sources? This looks like it's just the first order approximation valid only for paths which remain *outside* the object of mass $M$.
uhoh
CC BY-SA 4.0
2023-06-07T22:25:33.500Z
As uhoh said, that looks like the standard deflection equation, combined with the small angle approximation, $\theta\approx\sin\theta\approx\tan\theta$. Strictly, it's only valid outside the body, but ProfRob says we can ignore the pressure inside the Sun. Also, that deflection approximation is only valid when $b$ is much larger than $r_s$, as my graphs [here](https://astronomy.stackexchange.com/a/49874/16685) show. OTOH, that's probably a safe assumption, even for most paths inside the Sun.
PM 2Ring
CC BY-SA 4.0
2023-06-07T22:31:43.903Z
FWIW, I have a Sage / Python script [here](https://physics.stackexchange.com/a/766180/123208) which calculates the deflection from the impact parameter using an elliptic integral.
PM 2Ring
CC BY-SA 4.0
2023-06-08T01:22:49.790Z
uhoh - This is the equation used for strong lensing by galaxy clusters, so it is OK for interiors.  It comes from the linearized field equations (P446 of Misnor, Thorne, and Wheeler), which (as PM 2Ring) points out is fine here away from any event horizon.
eshaya
CC BY-SA 4.0
2023-06-08T05:07:36.170Z
This is just plain way wrong; at $\beta=0$ (i.e. $b=0$ i.e. straight through the center of the Sun) it diverges to infinity rather than decreasing to zero.
uhoh
CC BY-SA 4.0
2023-06-08T15:12:52.207Z
@uhoh No, because $M$ is the mass within a cylinder of radius $b$, so the $b^2$ in the numerator & denominator cancel. However, I don't understand why eshaya is using a cylinder instead of a sphere. (Of course, with a sphere, we get $b^3$ in the numerator, once again avoiding divergence).
PM 2Ring
CC BY-SA 4.0
2023-06-08T15:31:48.893Z
@PM2Ring yes of course one can do something like that (I *started* but didn't follow through on something similar [here](https://astronomy.stackexchange.com/questions/51200/light-or-neutrinos-graze-or-pass-through-the-sun-and-arrive-at-earth-need-an-e/53910?noredirect=1#comment120592_51200)) but that's not what's written in this answer post. 13 + 24 hours left; tick-tock tick-tock :-)
uhoh
CC BY-SA 4.0
2023-06-08T18:13:20.137Z
The mass within a cylinder contributes to the lensing.  For a ray moving parallel to the z axis, mass near the poles always contributes.
eshaya
CC BY-SA 4.0
2023-06-08T18:29:42.640Z
Right near b=0, the lensing is still quite strong.  That is why with cluster lenses and sources most centrally positioned one get the largest arcs (nearly Einstein Rings) and the central radial arcs.  Don't worry about b=0 because the chances of a source being at exactly b=0 is vanishingly small.
eshaya
CC BY-SA 4.0
2023-06-07T20:56:41.327Z
2023-06-12T17:33:28.690Z
2023-06-12T17:33:28.690Z
eshaya
<p>Skyfield's Github has discussion <a href="https://github.com/skyfielders/python-skyfield/discussions/815" rel="noreferrer">Jupiter hiccup #815</a> which then links back to to <a href="https://github.com/skyfielders/python-skyfield/issues/734" rel="noreferrer">Non-physical gravitational deflection corrections for Solar System bodies #734</a>.</p>
<p>The script and plot from #815 are shown below. The half amplitude of the 'hiccup' or wiggle in Jupiter's RA is about 0.0001 radians or 1.7 arcminutes, which is quite a sizable gravitational deflection if it were true.</p>
<p>My understanding of space and time is <a href="https://photo.stackexchange.com/a/129512/50110">about like this (search for answer by &quot;uhoh&quot;)</a> so I can't do any of this myself, but it looks like during this event (<strong>between 05:00 and 10:00 on January 1st, 2032</strong>) Jupiter passes <em>directly behind</em> the Sun as seen from Earth, and the Skyfield calculation is grappling with a path that passes directly through the Sun. JPL Horizons shows the Sun-Observer-Target (SOT) angle drops to 0.077 degrees during the middle of this pass!</p>
<p>Because of how <a href="https://rhodesmill.org/skyfield/" rel="noreferrer">Skyfield</a> works (simple, easy to use Python interface) and is regularly used to find events through minimizing routines, any observation calculation needs to always return reasonable and continuous position values with respect to time, so no NaNs or sudden jumps.</p>
<p>What I'd like to ask in this question is for an expression for the gravitational deflection (and ideally a light-time) for a ray of light that grazes or even passes through the Sun.</p>
<p>Yes, EM radiation <s>above the Sun's plasma frequency</s> can't go through the Sun,</p>
<ul>
<li><a href="https://space.stackexchange.com/q/4740/12102">Is there any wavelength at which the Sun is both transparent to and quiet of electromagnetic radiation?</a></li>
</ul>
<p>but since Skyfield will still need something continuous, there still may be an expression that properly handles the mass distribution of the finite-sized Sun rather than lumping it to a single point.</p>
<p>Could one just use the Sun's density profile and integrate a &quot;gravitational tugging&quot; of the trajectory from this mass distribution a bit like models from gravitational lensing by a galaxy do?</p>
<ul>
<li><a href="https://astronomy.stackexchange.com/q/32729/7982">At what depth below the Sun&#39;s surface does the density reach that of water?</a></li>
<li><a href="https://astronomy.stackexchange.com/q/50029/7982">If I can&#39;t unscramble an egg, how do Astronomers unscramble views gravitationally lensed by complex mass distributions?</a></li>
</ul>
<p>Is there a better way, or preexisting, peer-reviewed and vetted method?</p>
<p><strong>Question:</strong> Light or (<strong>massless</strong>) neutrinos graze or pass through the Sun and arrive at Earth - need an expression for Sun's gravitational effect on observation direction/time.</p>
<hr />
<p><a href="https://i.sstatic.net/M7xWv.png" rel="noreferrer"><img src="https://i.sstatic.net/M7xWv.png" alt="Skyfield calculation RA of Jupiter between 05:00 and 10:00 January 1, 2032 showing a big deflection by the Sun's gravity as it passes directly behind it" /></a></p>
<pre><code>from skyfield.api import load
import matplotlib.pyplot as plt

ts = load.timescale()
planets = load('de421.bsp')

earth  = planets['earth']
jupiter = planets['jupiter barycenter']

t0 = ts.ut1(2032, 1, 1, 5, 0, 0)
t1 = ts.ut1(2032, 1, 1, 10, 0, 0)
t = ts.linspace(t0, t1, 301)

ra =  earth.at(t).observe(jupiter).apparent().radec('date')[0]
plt.plot(t.ut1, ra.radians, '-')
plt.show()
</code></pre>

CC BY-SA 4.0
2022-12-09T21:47:14.910Z
@ScienceAJ excellent, thank you very much! I may try to install it this weekend and I'll definitely read up on it. If you've had some experience with it please feel free to post a partial answer.
uhoh
CC BY-SA 4.0
2022-12-10T13:45:51.773Z
@ScienceAJ yes you are of course totally right! I wasn't thinking nor remembering (what I wrote in the linked answer) correctly. I've made an edit, thanks!
uhoh
CC BY-SA 4.0
2023-06-02T06:28:00.753Z
Wouldn't know what metric to use *inside* the Sun. However, it will certainly rely on knowing the density profile of the Sun, so there will be no simple analytic expression like for the Schwarzschild metric.
ProfRob
CC BY-SA 4.0
2023-06-02T07:16:41.440Z
@ProfRob hmm... ya, I tried to write the bonus message ("1st or 2nd order approximation") to let folks know it doesn't need to be rigorous. So for example if linear superposition isn't too far off, could one use a simply polytrope for $\rho(r)$ and apply $$\frac{\text{d}\alpha}{\text{d}r} = \frac{4G\rho(r) r^2dr}{c^2R^2}$$ to each shell of the Sun as a first approximation, then just add them up? Then maybe apply Newton's shell theorem somehow?
uhoh
CC BY-SA 4.0
2023-06-02T15:16:28.393Z
@uhoh I used a basic shell approximation with the BP20004 [Standard Solar Model](https://en.wikipedia.org/wiki/Standard_solar_model) to do the plot [here](https://chat.stackexchange.com/transcript/71?m=62522675#62522675), when this question was fresh. But that totally ignores the pressure term in the stress-energy tensor.
PM 2Ring
CC BY-SA 4.0
2023-06-02T15:22:28.267Z
@ProfRob https://physics.stackexchange.com/a/174990/123208 has the general static spherically symmetric metric. But I'm not quite sure how to use that equation to numerically compute deflection from the BP2004 data. (But I *do* know how to accurately compute deflection in the Schwarzschild metric, using an elliptic integral of the 2nd kind).
PM 2Ring
CC BY-SA 4.0
2023-06-02T15:34:14.357Z
@PM2Ring well that will do for massless neutrinos, since the pressure term inside the Sun will be quite negligible. Now all you need to do is compute the Shapiro delay and generalise the deflection and lag for neutrinos with mass.
ProfRob
CC BY-SA 4.0
2023-06-03T02:09:46.157Z
@Uhoh, really sorry but I dont think I cant help on this one XD, this one seems far above what I can research and provide an answer on.
DialFrost
CC BY-SA 4.0
2023-06-08T14:16:26.403Z
@PM2Ring there's 14 hours plus 24 hour invisible grace period for the bounty, I think you can consider posting something?
uhoh
CC BY-SA 4.0
2023-06-08T15:04:08.087Z
@uhoh Sorry, I'm not confident that I correctly understand how to do these calculations. But I assume that the deflection for neutrinos with mass is virtually identical to https://i.sstatic.net/pbUOR.png
PM 2Ring
CC BY-SA 4.0
2023-06-08T15:27:53.037Z
@PM2Ring ya it's gotta be zero at zero, rise roughly quadratically($r^3/r$), reach some maximum, and fall off as 1/r at large distance. Best way to vet a tentative answer is to post it labeled as such.
uhoh
CC BY-SA 4.0
2022-12-04T08:50:58.323Z
The stars close to the solar limb were deflected 1.75 arcseconds by the sun's gravity in the Eddington experiment.
James K
CC BY-SA 4.0
2022-12-04T08:57:24.670Z
@JamesK *non sequitur* By far most of the Sun's mass is in a sphere much smaller than it's photosphere, and during the plotted interval the S-O-T is never greater than 0.1° actually there's a typo in my question which I'm fixing, the minimum S-O-T is only 0.0077° not 0.077° So for answers to this question we need something that works for both grazing and passing through.
uhoh
CC BY-SA 4.0
2022-12-04T09:10:25.010Z
Yes, I know.  Actual GR calculations are above my pay scale.  I'm just providing context.
James K
<observational-astronomy><general-relativity><space-time><time><skyfield>
Light or neutrinos graze or pass through the Sun and arrive at Earth - need an expression for Sun's gravitational effect on observation direction/time
uhoh
# Light or neutrinos graze or pass through the Sun and arrive at Earth - need an expression for Sun's gravitational effect on observation direction/time

(Asked by: username_0 on 2022-12-04)

Skyfield's Github has discussion Jupiter hiccup #815 which then links back to to Non-physical gravitational deflection corrections for Solar System bodies #734.
The script and plot from #815 are shown below. The half amplitude of the 'hiccup' or wiggle in Jupiter's RA is about 0.0001 radians or 1.7 arcminutes, which is quite a sizable gravitational deflection if it were true.
My understanding of space and time is about like this (search for answer by "uhoh") so I can't do any of this myself, but it looks like during this event (between 05:00 and 10:00 on January 1st, 2032) Jupiter passes directly behind the Sun as seen from Earth, and the Skyfield calculation is grappling with a path that passes directly through the Sun. JPL Horizons shows the Sun-Observer-Target (SOT) angle drops to 0.077 degrees during the middle of this pass!
Because of how Skyfield works (simple, easy to use Python interface) and is regularly used to find events through minimizing routines, any observation calculation needs to always return reasonable and continuous position values with respect to time, so no NaNs or sudden jumps.
What I'd like to ask in this question is for an expression for the gravitational deflection (and ideally a light-time) for a ray of light that grazes or even passes through the Sun.
Yes, EM radiation above the Sun's plasma frequency can't go through the Sun,

Is there any wavelength at which the Sun is both transparent to and quiet of electromagnetic radiation?

but since Skyfield will still need something continuous, there still may be an expression that properly handles the mass distribution of the finite-sized Sun rather than lumping it to a single point.
Could one just use the Sun's density profile and integrate a "gravitational tugging" of the trajectory from this mass distribution a bit like models from gravitational lensing by a galaxy do?

At what depth below the Sun's surface does the density reach that of water?
If I can't unscramble an egg, how do Astronomers unscramble views gravitationally lensed by complex mass distributions?

Is there a better way, or preexisting, peer-reviewed and vetted method?
Question: Light or (massless) neutrinos graze or pass through the Sun and arrive at Earth - need an expression for Sun's gravitational effect on observation direction/time.


from skyfield.api import load
import matplotlib.pyplot as plt

ts = load.timescale()
planets = load('de421.bsp')

earth  = planets['earth']
jupiter = planets['jupiter barycenter']

t0 = ts.ut1(2032, 1, 1, 5, 0, 0)
t1 = ts.ut1(2032, 1, 1, 10, 0, 0)
t = ts.linspace(t0, t1, 301)

ra =  earth.at(t).observe(jupiter).apparent().radec('date')[0]
plt.plot(t.ut1, ra.radians, '-')
plt.show()

**Tags:** observational-astronomy, general-relativity, space-time, time, skyfield
> **Comments:**
> **username_4**: The stars close to the solar limb were deflected 1.75 arcseconds by the sun's gravity in the Eddington experiment.  
> **username_0**: @JamesK *non sequitur* By far most of the Sun's mass is in a sphere much smaller than it's photosphere, and during the plotted interval the S-O-T is never greater than 0.1° actually there's a typo in my question which I'm fixing, the minimum S-O-T is only 0.0077° not 0.077° So for answers to this question we need something that works for both grazing and passing through.  
> **username_4**: Yes, I know.  Actual GR calculations are above my pay scale.  I'm just providing context.  
> **username_0**: @ScienceAJ excellent, thank you very much! I may try to install it this weekend and I'll definitely read up on it. If you've had some experience with it please feel free to post a partial answer.  
> **username_0**: @ScienceAJ yes you are of course totally right! I wasn't thinking nor remembering (what I wrote in the linked answer) correctly. I've made an edit, thanks!  
> **username_1**: Wouldn't know what metric to use *inside* the Sun. However, it will certainly rely on knowing the density profile of the Sun, so there will be no simple analytic expression like for the Schwarzschild metric.  
> **username_0**: @ProfRob hmm... ya, I tried to write the bonus message ("1st or 2nd order approximation") to let folks know it doesn't need to be rigorous. So for example if linear superposition isn't too far off, could one use a simply polytrope for $\rho(r)$ and apply $$\frac{\text{d}\alpha}{\text{d}r} = \frac{4G\rho(r) r^2dr}{c^2R^2}$$ to each shell of the Sun as a first approximation, then just add them up? Then maybe apply Newton's shell theorem somehow?  
> **username_2**: @uhoh I used a basic shell approximation with the BP20004 [Standard Solar Model](https://en.wikipedia.org/wiki/Standard_solar_model) to do the plot [here](https://chat.stackexchange.com/transcript/71?m=62522675#62522675), when this question was fresh. But that totally ignores the pressure term in the stress-energy tensor.  
> **username_2**: @ProfRob https://physics.stackexchange.com/a/174990/123208 has the general static spherically symmetric metric. But I'm not quite sure how to use that equation to numerically compute deflection from the BP2004 data. (But I *do* know how to accurately compute deflection in the Schwarzschild metric, using an elliptic integral of the 2nd kind).  
> **username_1**: @PM2Ring well that will do for massless neutrinos, since the pressure term inside the Sun will be quite negligible. Now all you need to do is compute the Shapiro delay and generalise the deflection and lag for neutrinos with mass.  
> **username_3**: @Uhoh, really sorry but I dont think I cant help on this one XD, this one seems far above what I can research and provide an answer on.  
> **username_0**: @PM2Ring there's 14 hours plus 24 hour invisible grace period for the bounty, I think you can consider posting something?  
> **username_2**: @uhoh Sorry, I'm not confident that I correctly understand how to do these calculations. But I assume that the deflection for neutrinos with mass is virtually identical to https://i.sstatic.net/pbUOR.png  
> **username_0**: @PM2Ring ya it's gotta be zero at zero, rise roughly quadratically($r^3/r$), reach some maximum, and fall off as 1/r at large distance. Best way to vet a tentative answer is to post it labeled as such.  

---

## 1 answers

### Answer by username_5 on 2023-06-07. Score: 0

The usual equation for the deflection of light (or a massless particle), used for example for calculations of strong lensing through a cluster is derived in Post-Newtonian theory, which is appropriate for regions in a weak field, i.e., gravity is not too strong. The criteria for a spherical source to be only weakly gravitating is that $\frac{M(r)}{r} << \frac{c^2}{G}$. We know that the event horizon for a solar mass $\frac{2GM\_\odot}{c^2}$ = 3 km and the radius of the Sun is $7 \times 10^{5}$ km, so M/R$\_\odot$ at the surface of the Sun is $1.5/(7 \times 10^5)$ of $\frac{c^2}{G}$. That means the surface of the sun is well into the weak field limit.

What about the interior of the Sun? The Wikipedia page on Stellar Structure shows the mass distribution for the Sun. The interior values of $\frac{M(r)/M\_\odot}{r/R\_\odot}$ never rises above about 2 times its value at the surface. We therefore know that the whole interior of the Sun is in the weak limit.

Another issue might be deciding what to integrate to determine the full GR relevant mass. In GR, the total gravitating mass is the sum of the rest mass + internal energy + gravitational potential energy ([see The General-Relativistic Theory of Stellar Structure by K. S Thorne](https://www.cco.caltech.edu/%7Ekip/scripts/PubScans/II-12.pdf) ).
But, since we are far in the weak limit, the two energy terms, which both depend on M/R (internal energy is set by Virial Theorem), can be ignored. And we again have M(r) depends on rest mass.

The Post-Newtonian calculated gravitational deflection angle is given by:
$$
\alpha = \frac{D\_{LS}}{D\_S}\frac{4GM}{c^2b^2}
$$

* $D\_{LS}$ = Distance from lens to source
* $D\_{S}$ = Distance to source
* b = impact parameter = $D\_L(\beta+\alpha) \sim D\_L\beta$
* $D\_L$ = Distance to lens
* $\beta$ = angle to source
* $M$ is mass in cylinder of radius b
  You can scale things by knowing that the deflection angle at the limb of the sun is 1.752 arcsec.

There may be multiple solutions, so one may need to search a large area in the lens plane to find all of the solutions where the rays go from the source to viewer.

> **Comments:**
> **username_0**: Are you certain that this approximation is valid when $b$ is smaller than the diameter of the Sun? Can you support that with authoritative sources? This looks like it's just the first order approximation valid only for paths which remain *outside* the object of mass $M$.  
> **username_2**: As uhoh said, that looks like the standard deflection equation, combined with the small angle approximation, $\theta\approx\sin\theta\approx\tan\theta$. Strictly, it's only valid outside the body, but ProfRob says we can ignore the pressure inside the Sun. Also, that deflection approximation is only valid when $b$ is much larger than $r_s$, as my graphs [here](https://astronomy.stackexchange.com/a/49874/16685) show. OTOH, that's probably a safe assumption, even for most paths inside the Sun.  
> **username_2**: FWIW, I have a Sage / Python script [here](https://physics.stackexchange.com/a/766180/123208) which calculates the deflection from the impact parameter using an elliptic integral.  
> **username_5**: uhoh - This is the equation used for strong lensing by galaxy clusters, so it is OK for interiors.  It comes from the linearized field equations (P446 of Misnor, Thorne, and Wheeler), which (as PM 2Ring) points out is fine here away from any event horizon.  
> **username_0**: This is just plain way wrong; at $\beta=0$ (i.e. $b=0$ i.e. straight through the center of the Sun) it diverges to infinity rather than decreasing to zero.  
> **username_2**: @uhoh No, because $M$ is the mass within a cylinder of radius $b$, so the $b^2$ in the numerator & denominator cancel. However, I don't understand why eshaya is using a cylinder instead of a sphere. (Of course, with a sphere, we get $b^3$ in the numerator, once again avoiding divergence).  
> **username_0**: @PM2Ring yes of course one can do something like that (I *started* but didn't follow through on something similar [here](https://astronomy.stackexchange.com/questions/51200/light-or-neutrinos-graze-or-pass-through-the-sun-and-arrive-at-earth-need-an-e/53910?noredirect=1#comment120592_51200)) but that's not what's written in this answer post. 13 + 24 hours left; tick-tock tick-tock :-)  
> **username_5**: The mass within a cylinder contributes to the lensing.  For a ray moving parallel to the z axis, mass near the poles always contributes.  
> **username_5**: Right near b=0, the lensing is still quite strong.  That is why with cluster lenses and sources most centrally positioned one get the largest arcs (nearly Einstein Rings) and the central radial arcs.  Don't worry about b=0 because the chances of a source being at exactly b=0 is vanishingly small.  

---

