#importing modules
import math
from __future__ import division
#Variable declaration
lamda=590*10**-9; #wavelength of sodium D line(m)
h=6.626*10**-34; #planck's constant
c=3*10**8; #velocity of light(m/s)
e=1.602*10**-19; #charge of electron(eV)
#Calculation
E=h*c/lamda; #energy of 1st excited state(J)
E=E/e; #energy of 1st excited state(eV)
#Result
print "energy of 1st excited state is",round(E,1),"eV"
#importing modules
import math
from __future__ import division
#Variable declaration
T=250+273; #temperature(K)
lamda=590*10**-9; #wavelength of sodium D line(m)
h=6.626*10**-34; #planck's constant
c=3*10**8; #velocity of light(m/s)
k=1.38*10**-23; #boltzmann constant
#Calculation
a=h*c/(k*T*lamda);
N2byN1=math.exp(-a); #ratio between atoms in 1st excited state and ground state
#Result
print "ratio between atoms in 1st excited state and ground state is",round(N2byN1*10**21,2),"*10**-21"
#importing modules
import math
from __future__ import division
#Variable declaration
T=250+273; #temperature(K)
lamda=590*10**-9; #wavelength of sodium D line(m)
h=6.626*10**-34; #planck's constant
c=3*10**8; #velocity of light(m/s)
k=1.38*10**-23; #boltzmann constant
#Calculation
a=h*c/(k*T*lamda);
N2byN1=1/(math.exp(a)-1); #ratio between stimulated emission and spontaneous emission
#Result
print "ratio between stimulated emission and spontaneous emission is",round(N2byN1*10**21,4),"*10**-21"
#importing modules
import math
from __future__ import division
#Variable declaration
n0=1.76; #refractive index of ruby rod
new0=4.3*10**14; #frequency(Hz)
deltav0=1.5*10**11; #doppler broadening(Hz)
c=3*10**8; #velocity of light(m/s)
tow21=4.3*10**-3; #lifetime of spontaneous emission(s)
tow_photon=6*10**-9; #lifetime of photon(s)
#Calculation
a=4*math.pi**2*new0**2*n0**3/(c**3);
N2_N1=a*tow21*deltav0/tow_photon; #difference between excited state and ground state population(per m**3)
#Result
print "difference between excited state and ground state population is",round(N2_N1*10**-23,3),"*10**23 per m**3"
#importing modules
import math
from __future__ import division
#Variable declaration
T=300; #temperature(K)
lamda=5000*10**-10; #wavelength of light(m)
h=6.626*10**-34; #planck's constant
c=3*10**8; #velocity of light(m/s)
k=1.38*10**-23; #boltzmann constant
#Calculation
a=h*c/(k*T*lamda);
N2byN1=1/(math.exp(a)-1); #ratio between stimulated emission and spontaneous emission
#Result
print "ratio between stimulated emission and spontaneous emission is",round(N2byN1*10**42),"*10**-42"
print "answer varies due to rounding off errors"
print "spontaneous emission is more predominant than that of stimulated emission. for stimulating emission, N2>>N1. therefore there is no amplification possibility"
#importing modules
import math
from __future__ import division
#Variable declaration
lamda=632.8*10**-9; #wavelength of laser beam(m)
h=6.626*10**-34; #planck's constant
c=3*10**8; #velocity of light(m/s)
P=2.3*10**-3; #output power(W)
#Calculation
new=c/lamda; #frequency of photon(Hz)
E=h*new; #energy of photon(J)
El=P*60; #energy emitted by laser(J/min)
n=El/E; #number of photons emitted(photons/min)
#Result
print "number of photons emitted is",round(n*10**-17,3),"*10**17 photons/min"
print "answer varies due to rounding off errors"