
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/misc/plot_SimpleTest2Traj_BaF.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_auto_examples_misc_plot_SimpleTest2Traj_BaF.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_auto_examples_misc_plot_SimpleTest2Traj_BaF.py:


Simple Test 2 - BaF
===================

.. GENERATED FROM PYTHON SOURCE LINES 6-27

.. code-block:: Python


    from MoleCool import System, np
    system = System(description='SimpleTest2Traj_BaF',load_constants='138BaF')

    # specify initial velocity and position of the molecule
    system.v0 = np.array([200,0,0])   #in m/s
    system.r0 = np.array([-2e-3,0,0]) #in m

    # set up the cooling laser and first repumper with their wave vectors k and positions r_k
    FWHM,P = 1e-3,5e-3 # 1mm and 5mW
    for lamb in np.array([859.830, 895.699])*1e-9:
        for rx in [0, 4e-3]:
            system.lasers.add_sidebands(lamb=lamb,P=P,FWHM=FWHM,pol='lin',
                                        r_k=[rx,0,0], k=[0,1,0],
                                        offset_freq=19e6,mod_freq=39.33e6,
                                        sidebands=[-2,-1,1,2],ratios=[0.8,1,1,0.8])
    
    # include first two vibrational levels of electronic ground state and the
    # first vibrational level of the excited state
    system.levels.add_all_levels(v_max=1)





.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    System is created with description: SimpleTest2Traj_BaF
    /home/docs/checkouts/readthedocs.org/user_builds/molecool-py/checkouts/latest/MoleCool/Levelsystem.py:1229: UserWarning: No pre-defined states found for electronic state X with: v=1
    ...instead the same states as for v=0 were imported!
      warnings.warn(text+'\n...instead the same states as for v=0 were imported!')




.. GENERATED FROM PYTHON SOURCE LINES 28-33

.. code-block:: Python

    system.calc_rateeqs(t_int=40e-6,magn_remixing=False,
                        trajectory=True,position_dep=True)

    # plot scattering rate, scattered photons, velocity and position, ...
    system.plot_all()



.. rst-class:: sphx-glr-horizontal


    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_001.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_001.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_002.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_002.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_003.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_003.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_004.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_004.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_005.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_005.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_006.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_006.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_007.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_007.png
         :class: sphx-glr-multi-img

    *

      .. image-sg:: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_008.png
         :alt: plot SimpleTest2Traj BaF
         :srcset: /auto_examples/misc/images/sphx_glr_plot_SimpleTest2Traj_BaF_008.png
         :class: sphx-glr-multi-img


.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    Solving ode with rate equations... Execution time: 6.7050 seconds
    Scattered Photons (A): 6.914848
    Scattered Photons (B): 0.000000
    /home/docs/checkouts/readthedocs.org/user_builds/molecool-py/checkouts/latest/MoleCool/System.py:574: UserWarning: For calculation of hbar * k * Gamma/2, Gamma of the first ElSt is used
      warnings.warn("For calculation of hbar * k * Gamma/2, Gamma of the first ElSt is used")
    /home/docs/checkouts/readthedocs.org/user_builds/molecool-py/checkouts/latest/MoleCool/System.py:576: UserWarning: For calculation of hbar * k * Gamma/2, the wavelengths of the lasers' wavelengths differ by 2.04 % (which is more than 0.10 %). The returned unit might thus me inappropriate.
      warnings.warn(





.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 7.708 seconds)


.. _sphx_glr_download_auto_examples_misc_plot_SimpleTest2Traj_BaF.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: plot_SimpleTest2Traj_BaF.ipynb <plot_SimpleTest2Traj_BaF.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: plot_SimpleTest2Traj_BaF.py <plot_SimpleTest2Traj_BaF.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: plot_SimpleTest2Traj_BaF.zip <plot_SimpleTest2Traj_BaF.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
