.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gen_examples/form_factors/plot_ffl_beryllium.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_gen_examples_form_factors_plot_ffl_beryllium.py: Plot form factor lowering effect for Beryllium ============================================== .. GENERATED FROM PYTHON SOURCE LINES 6-43 .. image-sg:: /gen_examples/form_factors/images/sphx_glr_plot_ffl_beryllium_001.svg :alt: $f_{1s}$ for beryllium ${3.5+}$ :srcset: /gen_examples/form_factors/images/sphx_glr_plot_ffl_beryllium_001.svg :class: sphx-glr-single-img .. code-block:: Python import jax.numpy as jnp import matplotlib.pyplot as plt import scienceplots # noqa:F401 import jaxrts ureg = jaxrts.ureg plt.style.use("science") Z_A = 4 Z_C = 0.5 k = jnp.linspace(0, 17, 100) / (1 * ureg.angstrom) fig, ax = plt.subplots() for IPD in jnp.array([0, 50, 100, 150]) * ureg.electron_volt: binding_E = jaxrts.Element(Z_A).ionization.energies[::-1][:2] - IPD f_ffl = jaxrts.form_factors.form_factor_lowering_10( k, binding_E, Z_C, Z_A, Z_squared_correction=True ) ax.plot( k.m_as(1 / ureg.angstrom), f_ffl.m_as(ureg.dimensionless), label=f"IPD = {IPD.m_as(ureg.electron_volt)}eV", ) ax.set_ylabel("$f_{1s}$") ax.set_xlabel("$k$ [1/angstrom]") ax.legend() plt.tight_layout() plt.title("$f_{1s}$ for beryllium ${3.5+}$") plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.469 seconds) .. _sphx_glr_download_gen_examples_form_factors_plot_ffl_beryllium.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ffl_beryllium.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ffl_beryllium.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_