In [12]:
from stack import *
my_stack = load('io_files/saved_stack_200.txt')
my_pump = incident_wp(my_stack)
my_pump.add_packet(200,[1200,1299.5])
my_pump.add_packet(200,[1100,1199.5],type='uniform',height=0.001)
my_pump.add_packet(200,[1000,1099.5])
In [28]:
pyplot.figure(figsize=(10,4))
pyplot.title('1-photon power spectrum before entering the stack',fontsize=16)
my_pump.plot_1PIS('i')
pyplot.figure(figsize=(10,4))
pyplot.xlabel('wavelength (nm)',fontsize=16)
pyplot.ylabel('resulting 2-photon power spectrum',fontsize=16)
pyplot.plot(np.arange(1000,1300,0.5)/2.0,my_pump.get_2PS(1))
pyplot.show()
In [29]:
def axes_setting():
pyplot.xlabel('layer number',fontsize=20)
pyplot.ylabel('population inversion',fontsize=20)
files = map(lambda f:'io_files/200@125-2pulse/'+f,[
'inv-focus0.npy',
'inv-focus.npy',
'inv-focus-min.npy',
'inv-focus-field.npy',
'inv-focus-field+min.npy'])
legends = ['focus a0 before entrance, ratio=',
'focus a0 inside, ratio=',
'focus a0 inside + min, ratio=',
'focus field inside, ratio=',
'focus field inside + min, ratio=']
pyplot.figure(figsize=(18, 6))
axes_setting()
data = map(np.load,files)
for j in range(len(data)):
pyplot.plot(data[j][:,0],data[j][:,1],'o-')
legends[j] += str("{:7.4f}".format(sum(data[j][1:50])/sum(data[j][100:150])))
pyplot.legend(legends,fontsize=22)
pyplot.show()
Shaping types:
In [34]:
# the particularly best one among the above
n = 1
xout = data[n][:,0]
yout = data[n][:,1]
pyplot.figure(figsize=(18, 4)); axes_setting();
pyplot.plot(xout[0::2],yout[0::2],'o-')
pyplot.plot(xout[1::2],yout[1::2],'o-')
pyplot.legend(['even layers','odd layers'],fontsize=22)
pyplot.show()