
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "auto_examples/misc/plot_Simple3+1.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_Simple3+1.py>`
        to download the full example code.

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

.. _sphx_glr_auto_examples_misc_plot_Simple3+1.py:


Simplest type-II levelsystem
============================

creating 3+1 level system and observing time-dependent populatios.

.. GENERATED FROM PYTHON SOURCE LINES 8-30



.. image-sg:: /auto_examples/misc/images/sphx_glr_plot_Simple3+1_001.png
   :alt: plot Simple3+1
   :srcset: /auto_examples/misc/images/sphx_glr_plot_Simple3+1_001.png
   :class: sphx-glr-single-img


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

 .. code-block:: none

    System is created with description: Simple3+1
    ****************************************
    ************* Levelsystem **************
    ****************************************

    mass (in u): 0.0

    ++++++++++++ level-specific ++++++++++++

    -------------------X--------------------

    g-factors:
    gs  F
    X   1    0.0
    dtype: float64

    frequencies (in MHz):
    gs  F
    X   1    0.0
    dtype: float64

    -------------------A--------------------

    g-factors:
    exs  F
    A    0    0.0
    dtype: float64

    frequencies (in MHz):
    exs  F
    A    0    0.0
    dtype: float64

    Gamma (in MHz):
    exs A 1.0

    +++++++++ transition-specific ++++++++++

    transition dipole moments:
         A
    X  1.0

    -----------------X <- A-----------------
    /home/docs/checkouts/readthedocs.org/user_builds/molecool-py/checkouts/latest/MoleCool/Levelsystem.py:293: UserWarning: There is no dipole matrix or reduced dipole matrix available!So a reduced matrix has been created only with ones:
    exs     A
    F       0
    gs F     
    X  1  1.0
      warnings.warn(warn_txt)

    dipole matrix:
    exs            A
    F              0
    mF             0
    gs F mF         
    X  1 -1  0.57735
          0 -0.57735
          1  0.57735

    vibrational branching:
    exs    A
    gs      
    X    1.0

    wavelengths (in nm):
    exs       A
    F         0
    gs F       
    X  1  860.0
    Solving ode with OBEs...Execution time: 1.8870 seconds
    Scattered Photons (A): 1.569080






|

.. code-block:: Python


    from MoleCool import System

    system = System(description='Simple3+1') # create empty system instance first

    # construct level system:
    # - create empty instances for a ground and excited electronic state
    system.levels.add_electronicstate(label='X', gs_exs='gs')
    system.levels.add_electronicstate(label='A', gs_exs='exs', Gamma=1.0)
    # - add the levels with the respective quantum numbers to the electronic states
    system.levels.X.add(F=1)
    system.levels.A.add(F=0)
    # - next all default level properties can be displayed and simply changed
    system.levels.print_properties()
    system.levels.X.gfac.iloc[0] = 1.0 # set ground state g factor to 1.0

    # set up lasers and magnetic field
    system.lasers.add(lamb=860e-9, P=5e-3, pol='lin') #wavelength, power, and polarization
    system.Bfield.turnon(strength=5e-4, direction=[0,1,1]) #magnetic field

    # simulate dynamics with OBEs and plot population
    system.calc_OBEs(t_int=5e-6, dt=10e-9, magn_remixing=True, verbose=True)
    system.plot_N()

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

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


.. _sphx_glr_download_auto_examples_misc_plot_Simple3+1.py:

.. only:: html

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

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

      :download:`Download Jupyter notebook: plot_Simple3+1.ipynb <plot_Simple3+1.ipynb>`

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

      :download:`Download Python source code: plot_Simple3+1.py <plot_Simple3+1.py>`

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

      :download:`Download zipped: plot_Simple3+1.zip <plot_Simple3+1.zip>`


.. only:: html

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

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