.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/calculate_partition_functions_from_constants.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Run this example online : - Click :ref:`here ` to download the full example code - Then start `Radis-Lab `__, upload the Jupyter notebook, and run it from there. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_calculate_partition_functions_from_constants.py: ================================================ Partition Functions from spectroscopic constants ================================================ RADIS can calculate equilibrium and non-LTE Partition Functions from a given set of spectroscopic constants using a Dunham expansion. Calculations use the the :py:class:`~radis.levels.partfunc.PartFunc_Dunham` class Default spectroscopic constants and spectroscopic models used are given in :ref:`default spectroscopic constants `. You can also use your own set of spectroscopic constants. See Also -------- :py:class:`~radis.levels.partfunc.PartFuncHAPI` .. GENERATED FROM PYTHON SOURCE LINES 21-35 .. code-block:: default from radis.db.molecules import Molecules from radis.levels.partfunc import PartFunc_Dunham isotope = 1 electronic_state = "X" S = Molecules["CO"][isotope][electronic_state] # Equilibrium partition functions : Qf = PartFunc_Dunham(S) print(Qf.at(T=3000)) # K # Nonequilibrium partition functions : print(Qf.at_noneq(Tvib=2000, Trot=1000)) # K .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_calculate_partition_functions_from_constants.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: calculate_partition_functions_from_constants.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: calculate_partition_functions_from_constants.ipynb `