MoleCool.Levelsystem.ElectronicGrState#
- class MoleCool.Levelsystem.ElectronicGrState(*args, **kwargs)[source]#
Bases:
ElectronicStateMethods
Return two arrays containing the labels of all levels without the hyperfine magnetic sublevels quantum numbers mF.
__init__(*args, **kwargs)add(**QuNrs)Add an instance of
Stateto this electronic state.add_lossstate([v])Add a
Lossstateobject to the self.entries list of this class only when no loss state is already included.Delete a loss state if one is existing in the defined level system.
draw_levels([fig, QuNrs_sep, level_length, ...])Draw all levels of the Electronic state sorted by certain Quantum numbers.
get_freq()Return a list of matrices for nicely displaying the wavelengths between the vibrational transitions and the frequencies between hyperfine transitions to conveniently specifying or modifying all participating transitions.
get_gfac()Return a list of matrices for nicely displaying the g-factors of the ground states and the excited states respectively to conveniently specifying or modifying them.
load_states(**QuNrs)Load all states from the corresponding
.jsonfile that match the givenQuNrsas keyword arguments.Print all relevant constants and properties of the composed levelsystem in a convenient way to modify them if needed afterwards.
Print out the magnetic remixing matrix of the ground states by the usage of function
magn_remix().set_init_pops(QuNrpops)Set initial population of the levels as a starting point for the simulations.
state_exists(state)Check if a state exists in this electronic state.
Attributes
Return integer as number of defined
Stateinstances.Return a list of matrices for nicely displaying the wavelengths between the vibrational transitions and the frequencies between hyperfine transitions to conveniently specifying or modifying all participating transitions.
Return a list of matrices for nicely displaying the g-factors of the ground states and the excited states respectively to conveniently specifying or modifying them.
Return True or False depending if a loss state is included in the ground levels.
Return the maximum quantum number
vavailable in all state.list for storing the pure states which can be added after class initialization
- add_lossstate(v=None)[source]#
Add a
Lossstateobject to the self.entries list of this class only when no loss state is already included.- Parameters:
v (int, optional) – all ground state levels with the vibrational quantum number v and higher vibrational numbers are represented by a single loss state. Provided the default value None a loss state is added which is lying in the next higher vibrational manifold than the existing one in the already included ground levels.
- print_remix_matrix()[source]#
Print out the magnetic remixing matrix of the ground states by the usage of function
magn_remix().
- property has_lossstate#
Return True or False depending if a loss state is included in the ground levels.
- DFzeros_without_mF()#
Return two arrays containing the labels of all levels without the hyperfine magnetic sublevels quantum numbers mF.
- Returns:
numpy.ndarray – Quantum numbers of all ground levels without the magnetic sublevels mF.
numpy.ndarray – Quantum numbers of all excited levels without the magnetic sublevels mF.
- add(**QuNrs)#
Add an instance of
Stateto this electronic state.Using this method arbitrary quantum states with their respective quantum numbers can be added to construct a certain levelsystem. Calculating all properties of the Levelsystem class does only work if all levels are added first, and then the calculations are done afterwards.
- Parameters:
**QuNrs (kwargs of int or float) – Quantum numbers of the state, e.g. J=1/2, F=2. Providing the quantum number F is mandatory however.
Note
The Quantum numbers can be arbitrarily provided (e.g. J,S,N,I,p,..). However, there are requirements for the following quantum numbers:
- Ffloat or iterable
Total angular momentum typically including the nuclear spin. This quantum number F must be given.
- vint, optional
vibrational state manifold quantum number. This quantum number is mandatory if one want to simulate branchings without selection rules, like for the vibrational states in molecules.
- mFfloat, optional
magnetic sublevel quantum number. If it is not provided, then all possible magnetic sublevels (mF=-F,-F+1,…,F) will be added automatically. The absolute value of mF must fulfill the relation \(|m_F| \le F\).
- draw_levels(fig=None, QuNrs_sep=[], level_length=0.8, xlabel_pos='bottom', ylabel=True, yaxis_unit='MHz')#
Draw all levels of the Electronic state sorted by certain Quantum numbers.
- Parameters:
fig (Matplotlib.figure object, optional) – Figure object into which the axes are drawn. The default is None which corresponds to a default figure.
QuNrs_sep (list of str, optional) – Quantum numbers for separating all levels into subplots. For example the levels can be grouped into subplots by the vibrational Quantum number, i.e. [‘v’].
level_length (float, optional) – The length of each level line. 1.0 corresponds to no space between neighboring level lines. The default is 0.8.
xlabel_pos (str, optional) – Position of the xticks and their labels. Can be ‘top’ or ‘bottom’. The default is ‘bottom’.
ylabel (bool, optional) – Wheter the ylabel should be drawn onto the y-axis.
yaxis_unit (str or float, optional) – Unit of the y-axis. Can be either ‘MHz’,’1/cm’, or ‘Gamma’ for the natural linewidth. Alternatively, an arbitrary unit (in MHz) can be given as float. Default is ‘MHz’.
- Returns:
coords – Dictionary with the coordinates of the single levels in the respective subplots. Two keys: ‘axes’ objects for every level index, and ‘xy’ np.array of size 2 for the level coordinates within each subplot.
- Return type:
- property freq#
Return a list of matrices for nicely displaying the wavelengths between the vibrational transitions and the frequencies between hyperfine transitions to conveniently specifying or modifying all participating transitions. These wavelengths and frequencies are loaded from the .json file if available. Otherwise all wavelengths are set to 860e-9 and all other hyperfine frequencies to zero to be adjusted.
- Returns:
list of matrices specifying the frequencies of the participating transitions.
- Return type:
list of pandas.DataFrame and pandas.Series entries.
- get_freq()#
Return a list of matrices for nicely displaying the wavelengths between the vibrational transitions and the frequencies between hyperfine transitions to conveniently specifying or modifying all participating transitions. These wavelengths and frequencies are loaded from the .json file if available. Otherwise all wavelengths are set to 860e-9 and all other hyperfine frequencies to zero to be adjusted.
- Returns:
list of matrices specifying the frequencies of the participating transitions.
- Return type:
list of pandas.DataFrame and pandas.Series entries.
- get_gfac()#
Return a list of matrices for nicely displaying the g-factors of the ground states and the excited states respectively to conveniently specifying or modifying them. These g-factors are loaded from the .json file if available. Otherwise g-factors are set to 0 to be adjusted.
- Returns:
list of two matrices for the g-factors of the ground and excited states.
- Return type:
list of pandas.Series entries.
- property gfac#
Return a list of matrices for nicely displaying the g-factors of the ground states and the excited states respectively to conveniently specifying or modifying them. These g-factors are loaded from the .json file if available. Otherwise g-factors are set to 0 to be adjusted.
- Returns:
list of two matrices for the g-factors of the ground and excited states.
- Return type:
list of pandas.Series entries.
- load_states(**QuNrs)#
Load all states from the corresponding
.jsonfile that match the givenQuNrsas keyword arguments.
- print_properties()#
Print all relevant constants and properties of the composed levelsystem in a convenient way to modify them if needed afterwards.
- set_init_pops(QuNrpops)#
Set initial population of the levels as a starting point for the simulations.
- Parameters:
QuNrpops (dict) – Specifies the population of the levels with certain Quantum numbers. E.g. QuNrpos={‘v=0’:0.8, ‘v=1,J=0.5’:0.1} implies that all levels that have the Quantum number v=0 share a total population of 0.80 and the levels with v=1 and J=0.5 share 0.10 whereas the populations of the remaining levels are set to zero. So, the sum of all populations specified can’t be larger than 1.0.
- state_exists(state)#
Check if a state exists in this electronic state.
- property v_max#
Return the maximum quantum number
vavailable in all state.
- states#
list for storing the pure states which can be added after class initialization