.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/relativity/special_relativity/plot_michelson_morley_null_result.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_relativity_special_relativity_plot_michelson_morley_null_result.py: Michelson and Morley, 1887: the ether wind that was not there ============================================================= If light were a wave in a stationary ether, the Earth's orbital motion at :math:`v \approx 30` km/s would blow an ether wind through every laboratory. In a Michelson interferometer with arms of length :math:`L`, light along the wind and back takes :math:`(2L/c)\gamma^2`, and light across it takes :math:`(2L/c)\gamma`. Turning the instrument through 90 degrees swaps the arms, so the fringes should move by .. math:: N = \frac{4L}{\lambda}\,\gamma(\gamma - 1) \approx \frac{2 L v^2}{\lambda c^2}. Michelson and Morley folded the light path with mirrors to an effective :math:`L \approx 11` m, floated the stone slab on mercury, and turned it slowly while watching the fringes. They expected about 0.4 fringe and found that the shift was "certainly less than the twentieth part of this". The arm along the wind would have to shrink by :math:`1/\gamma` to explain the null result (FitzGerald 1889, Lorentz 1892), and in special relativity that contraction is not a property of the ether but of measurement in a moving frame. .. GENERATED FROM PYTHON SOURCE LINES 25-36 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.relativity.chapters.special import ( length_contraction, lorentz_factor, michelson_morley_fringe_shift, ) from physicskit.relativity.utils.constants import C_SI .. GENERATED FROM PYTHON SOURCE LINES 37-42 The expected shift ------------------ The instrument rotates through an angle :math:`\phi`, and the path difference follows :math:`\cos 2\phi`, so the fringes should swing by :math:`N` peak to peak twice per turn. .. GENERATED FROM PYTHON SOURCE LINES 42-68 .. code-block:: Python L, wavelength, v = 11.0, 500e-9, 3.0e4 N = michelson_morley_fringe_shift(L, wavelength, v) N_sodium = michelson_morley_fringe_shift(L, 589e-9, v) observed_bound = 0.4 / 20.0 print(f"expected shift, 500 nm light: {N:.3f} fringe") print(f"expected shift, sodium 589 nm: {N_sodium:.3f} fringe") print(f"1887 upper bound: about {observed_bound:.2f} fringe") phi = np.linspace(0.0, 2.0 * np.pi, 400) fig, ax = plt.subplots(figsize=(7, 4)) ax.plot(np.degrees(phi), 0.5 * N * np.cos(2.0 * phi), label="ether prediction") ax.fill_between( np.degrees(phi), -observed_bound / 2, observed_bound / 2, color="gray", alpha=0.4, label="1887 bound on the observed swing", ) ax.axhline(0.0, color="k", linewidth=0.8, label="special relativity") ax.set_xlabel("rotation of the interferometer [degrees]") ax.set_ylabel("fringe displacement") ax.set_title("Michelson-Morley: predicted and observed fringe shift") ax.legend(loc="upper right", fontsize=8) plt.tight_layout() .. image-sg:: /api/gallery/relativity/special_relativity/images/sphx_glr_plot_michelson_morley_null_result_001.png :alt: Michelson-Morley: predicted and observed fringe shift :srcset: /api/gallery/relativity/special_relativity/images/sphx_glr_plot_michelson_morley_null_result_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none expected shift, 500 nm light: 0.441 fringe expected shift, sodium 589 nm: 0.374 fringe 1887 upper bound: about 0.02 fringe .. GENERATED FROM PYTHON SOURCE LINES 69-71 The shift grows as the square of the ether wind ----------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 71-82 .. code-block:: Python speeds = np.linspace(0.0, 6.0e4, 200) shifts = [michelson_morley_fringe_shift(L, wavelength, s) for s in speeds] fig, ax = plt.subplots(figsize=(7, 4)) ax.plot(speeds / 1e3, shifts) ax.axhline(observed_bound, color="gray", linestyle="--", label="1887 bound") ax.axvline(v / 1e3, color="k", linestyle=":", label="Earth's orbital speed") ax.set_xlabel("ether wind speed [km/s]") ax.set_ylabel("expected shift [fringes]") ax.legend() plt.tight_layout() .. image-sg:: /api/gallery/relativity/special_relativity/images/sphx_glr_plot_michelson_morley_null_result_002.png :alt: plot michelson morley null result :srcset: /api/gallery/relativity/special_relativity/images/sphx_glr_plot_michelson_morley_null_result_002.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 83-85 Contracting the arm along the wind cancels the shift ---------------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 85-93 .. code-block:: Python gamma = float(lorentz_factor(v / C_SI)) t_along = 2.0 * L / C_SI * gamma**2 t_across = 2.0 * L / C_SI * gamma t_along_contracted = 2.0 * float(length_contraction(L, v / C_SI)) / C_SI * gamma**2 print(f"time difference, rigid arms: {(t_along - t_across) * 1e18:.3f} attoseconds") print(f"time difference, contracted arm: {(t_along_contracted - t_across) * 1e18:.3f} attoseconds") plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none time difference, rigid arms: 367.429 attoseconds time difference, contracted arm: -0.000 attoseconds .. GENERATED FROM PYTHON SOURCE LINES 94-99 Check ----- :math:`2 L v^2/(\lambda c^2)` is 0.44 fringe for 11 m arms, 500 nm light and 30 km/s, more than twenty times the 1887 bound, and a contracted arm makes the two light times equal. .. GENERATED FROM PYTHON SOURCE LINES 99-103 .. code-block:: Python assert abs(N - 0.44) < 0.005 assert abs(N - 2 * L * v**2 / (wavelength * C_SI**2)) < 1e-7 * N assert N > 20 * observed_bound assert abs(t_along_contracted - t_across) < 1e-15 * t_across .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.087 seconds) .. _sphx_glr_download_api_gallery_relativity_special_relativity_plot_michelson_morley_null_result.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_michelson_morley_null_result.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_michelson_morley_null_result.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_michelson_morley_null_result.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_