Commit 7fbd0d39 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

Merge branch 'master' of https://code.df.uba.ar/nnunez/pyliaf

parents 7e58c522 5fc88b39
# reference: https://www1.udel.edu/atom/CaII.html
# TODO: typing annotations. Use ARTIQ's?
from scipy.constants import c, pi, hbar
from ..common_values import nm, MHz
_all_transitions_keywds = ['SP', 'DP', 'SP32', 'D32P32', 'D52P32']
_all_decays = {'SP': 135.53*MHz, 'DP': 9.45*MHz, 'SP32': 139.23*MHz,
'DP32': 0.9834*MHz ,'D52P32': 8.752*MHz}
_all_waveln = {'SP': 396.959*nm, 'DP': 866.452*nm, 'SP32': 393.478*nm,
'DP32': 850.036*nm ,'D52P32': 854.444*nm}
_all_branchratio = {'SP': 0.93481,'DP': 0.06519,'SP32': 0.93465,
'DP32': 0.006602,'D52P32': 0.05875}
__doc__ = """Docstring for trap_value module
Transition | Keyword | Alt Keyword
S_{1/2}->P_{1/2} | SP | Doppler
D_{3/2}->P_{1/2} | DP | Repump
S_{1/2}->P_{3/2} | SP32 |
D_{3/2}->P_{3/2} | DP32 |
D_{5/2}->P_{3/2} | D52P32 | Quench
Possible extraction values:
\t decay
\t linewidth
\t wavelength
\t frequency
\t branching_ratio
Example: trap_values.frequency("DP32") returns frequency of transition D_{3/2}->P_{3/2}
"""
def help():
print(__doc__)
def _preproc_names(fun_name):
"""Decorator function to allow alt-keywords for transitions dict"""
def changename(transition):
outname = transition
if outname == 'Doppler':
outname = 'SP'
elif outname == 'Repump':
outname = 'DP'
elif outname == 'Quench':
outname = 'D52P32'
elif outname not in _all_transitions_keywds:
raise KeyError("No es una transicion valida")
return fun_name(outname)
return changename
@_preproc_names
def decay(transition):
"""Returns decay rate of transition"""
# OBS: This is the value corresponding to 2*pi*\omega_{transition}
return _all_decays[transition]
@_preproc_names
def wavelength(transition):
"""Returns wavelength of transition"""
return _all_waveln[transition]
@_preproc_names
def frequency(transition):
"""Returns frequency of transition"""
return c/_all_waveln[transition]
@_preproc_names
def branching_ratio(transition):
"""Returns branching ratio of transition"""
return _all_branchratio[transition]
def sat_from_power(powers, laser_diameter, transition):
"""Return Saturation parameter from laser power"""
# Reference: https://www.quantenbit.physik.uni-mainz.de/files/2015/11/pub_phd_Poschinger2011.pdf
# Eq. (2.22)
# And then using the formula for intensity: I = 2*Power/area
# Aparentemente hay un error en la cuenta, ejemplo:
# Transicion doppler con un haz de ancho 40um y potencia de 250uW:
#
# trap_values.sat_from_power(250e-6, 40e-6, "SP") ---> 1375864.87...
#
# deberia dar del orden de 1 o algo asi
intensity = 8*powers/(pi*(laser_diameter**2))
prefactor = (12*pi*c*c)/(hbar*(decay(transition)/(2*pi))*(frequency(transition)**3))
return prefactor*intensity
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment