Load an existing random_stack object from file. It was created with 60 layers, with length variation of 10 micron +/- 60%. Create an incident_wp instance which is our pump pulse. The add_packet() function conveniently adds a Gaussian shaped spectrum in the 1350-1450nm wavelength range, consisting of 200 eigenmodes.
In [1]:
from stack import *
my_stack = load('io_files/saved_stack.txt')
my_pump = incident_wp(my_stack); my_pump.add_packet(200,[1350,1450])
We can initialize the pump pulse to be outside the stack, by focusing all positive-wave components of eigenmodes in layer 0
In [2]:
my_pump = pulse_shape(my_pump,focus_mask(0,0,my_pump))
my_pump.plot_field(1,1000)
We can also intialize the pump such that the positive-wave components are focused in an arbitrary layer (e.g.40)
In [3]:
example_pump = pulse_shape(my_pump,focus_mask(40,0,my_pump))
example_pump.plot_field(1,500)
"Advancing" the wavepacket with a negative value would propagate it backward in time. Time-propagation is equivalent to linear phase shaping, hence does not change 1- and 2-photon power spectra, but changes the spectral phases
In [4]:
example_pump.advance(-2000)
example_pump.plot_field(1,500)
.
.
.
.
.
The following shows some data of the population inversion, calculated as the total 2-photon power across all frequencies in each layer.
Each title of the plot shows the type of shaping done for the pump pulse, and the power ratio between layers 1 to 20, to layers 30-50.
Shaping types:
In [7]:
files = ['io_files/dataframe-TPS-focus0.txt',
'io_files/dataframe-TPS-focus40.txt',
'io_files/dataframe-TPS-focus40-2.txt',
'io_files/dataframe-TPS-focus40+rand.txt',
'io_files/dataframe-TPS-rand.txt']
titles = ['no shaping: ',
'positive-wave focusing: ',
'total field focusing: ',
'positive-wave + minimization:',
'minimization only: ']
data = map(lambda filename: pandas.read_csv(filename,index_col=0),files)
inv = map(lambda df: map(lambda j: sum(df.loc[j+1]),range(59)),data)
for j in range(len(inv)):
map(lambda k:my_stack.add_inversion(k+1,inv[j][k]),range(59))
title(titles[j]+"{:7.4f}".format(sum(inv[j][1:20])/sum(inv[j][30:50])),fontsize=18)
my_stack.plot(show_inversion=True,inv_max=2.5)
my_stack.clear_inversion()
In [8]:
for j in range(len(inv)):
pyplot.plot(inv[j],'o-')
pyplot.legend(titles,fontsize=12)
pyplot.show()
In [ ]: