Studying Second Harmonic Generation (SHG) of Europium Oxide Potassium Tantalate (EuO/KTO) compound as a part of "CP2 Spring 2024" project work.
There are several data types involved in the Python annotations which I will be using in the upcoming project. Some of them are listed below:
- int: This data type represents integers or whole numbers such as 1, 2, 3, etc. For example, the variables in the code
px_trig_pin
,ln_trig_pin
,fr_trig_pin
, andvolt_threshold
are all integers. - float: This data type represents floating-point numbers, or numbers with a decimal point, such as 1.5, 3.14, 0.01, etc. For example, in the code, the variables such as
self.volt_max
,self.volt_min
, andself.volt_offs
are all floats. - bool: This data type represents Boolean values, or logical values, that can be either True or False. For example in the code, the variable
self.vthreshold
is a bool. - str: This data type represents strings, or sequences of characters, such as “Hello”, “Python”, etc. For example in the code, the variables
port
andcmd
are both strings. - list: This data type represents lists, or ordered collections of values, that can be of any type. For example in the code, the variable
self.channel
is a list of integers. - dict: This data type represents dictionaries or unordered collections of key-value pairs, that can be of any type. For example in the code, the variables
self.volt_max
,self.volt_min
, andself.volt_offs
are all dictionaries of floats. - NoneType: This data type represents the absence of a value, and is denoted by the keyword None. For example in the code, the methods
set_pos
,set_channel
, etc do not return any value. - Exception: This data type represents an error or abnormal condition that occurs during the execution of a program. For example, the
raise Exception
. - ValueError: This data type represents an error that occurs when a function or operation receives an argument that has the right type but an inappropriate value. For example, the
raise ValueError
.
For any hypothetical sample:
- random SHG intensities are created using
np.random.rand(len(positions))np.random.rand(len(positions))
based on distance when piezo stage moves along the x and z axes. - random SHG intensities
shg_intensities = electric_fields**2 * d_effs**2
are made based on random photon energiesnp.random.uniform(1.5, 3.0, 100)
. The electric fields are also generated randomlynp.random.normal(1.0, 0.1, 100)
and randomly chosen effective non-linear coefficientsd_effs = np.random.normal(1.0, 0.1, 100)
.
For more details, the outputs have been generated in the file simulated_SHG.ipynb
.
We can examine a sample with precise and consistent motion with the use of the Piezo stage. We place a sample EuO/KTO attached to the holder of the stage and move the sample pixel-by-pixel and study the SHG intensity of the substrate KTO and film EuO grown on the substrate. So we will be studying the change in the SHG intensity at the substrate and interface region by automating Piezo stage.
Second Harmonic Generation (SHG) is a fascinating nonlinear optical process where two photons of the same frequency interact within a nonlinear material to create a new photon with twice the energy, and therefore, twice the frequency and half the wavelength of the original photons.
An experimental work (by T. Santhanakrishnan et al. 2019) performing SHG on a sample LAO/STO interfaces and its results are shown below:
More details can be obtained from SHG.ipynb
file.
Tensorflow is used in the code helping to move StagePi. The code and the output of the code is shown in the file stage_pi.ipynb
. The use of tensorflow would be more effective in machine learning and deep learning by feeding some data to extrapolate. The code I used in moving the StagePi using tensorflow simply replace the similar work of the numpy. Hence I do not see it is being used as its true potential in the code.
The code helps to estimate the position of the stage from the input voltage. It asks for axis (x, y, z) you want to estimate the position and voltage you desire. The code returns the position with uncertiainty. This code is provided in calibrated_stagepi.py
file.