Kramers Kronig en Matlab
Kramers Kronig en Matlab
In this appendix, we present some basic programs written for the MAT-
LAB environment for the analysis of the data. These programs can be
easily customized by the expert user, but they nevertheless constitute useful
data analysis tools also in the present form.
The first two programs deal with the computation of K-K relations. The
third program can be used to obtain self-consistent (in terms of K-K relations)
estimates of the real and the imaginary parts of susceptibility when first-
guess estimates are used as input. It is particularly suitable when the first-
guess estimates of the real and imaginary parts of susceptibility have been
independently obtained, e.g. by direct measurements. The fourth and the
fifth program deal with the computation of SSKK relations.
In order to take advantage of this set of programs, and considering that
the first two programs are called by the last three programs, it is strongly
advised to save them in the same directory with the following names:
– Program 1: kkimbook.m;
– Program 2: kkrebook.m;
– Program 3: selfconsbook.m;
– Program 4: sskkimbook.m;
– Program 5: sskkrebook.m.
These programs require that the spectral data given as input have con-
stant frequency spacing. Simple interpolation schemes can in most cases ef-
ficiently rearrange diversely spaced data to this form. These programs have
been tested on the MATLAB versions 6.x both for Linux/Unix and Mi-
crosoft Windows environments.
function imchi=kkimbook(omega,rechi,alpha)
%The program inputs are 1) omega, vector of the frequency
%(or energy) components, 2) rechi, vector of the real part
%of the susceptibility under examination, 3) alpha, value
138 A MATLAB Programs for Data Analysis
if size(omega,1)>size(omega,2);
omega=omega’;
end; if size(rechi,1)>size(rechi,2);
rechi=rechi’;
end;
%Here the program rearranges the two vectors so that,
%whichever their initial shape, they become row vectors.
g=size(omega,2);
%Size of the vectors.%
imchi=zeros(size(rechi));
%The output is initialized.
a=zeros(size(rechi));
b=zeros(size(rechi));
%Two vectors for intermediate calculations are initialized
deltaomega=omega(2)-omega(1);
%Here we compute the frequency (or energy) interval
j=1;
beta1=0;
for k=2:g;
b(1)=beta1+rechi(k)*omega(k)ˆ(2*alpha)/(omega(k)ˆ2-omega(1)ˆ2);
beta1=b(1);
end;
imchi(1)=-2/pi*deltaomega*b(1)*omega(1)ˆ(1-2*alpha);
%First element of the output: the principal part integration
%is computed by excluding the first element of the input
j=g;
alpha1=0;
for k=1:g-1;
a(g)=alpha1+rechi(k)*omega(k)ˆ(2*alpha)/(omega(k)ˆ2-omega(g)ˆ2);
alpha1=a(g);
end;
imchi(g)=-2/pi*deltaomega*a(g)*omega(g)ˆ(1-2*alpha);
%Last element of the output: the principal part integration
%is computed by excluding the last element of the input.
for j=2:g-1; ;
A.2 Program 2: Estimation of the Real via Kramers-Kronig Relations 139
if size(omega,1)>size(omega,2);
omega=omega’;
end; if size(imchi,1)>size(imchi,2);
imchi=imchi’;
end;
%Here the program rearranges the two vectors so that,
%whichever their initial shape, they become row vectors.
g=size(omega,2);
%Size of the vectors.%
rechi=zeros(size(imchi));
%The output is initialized.
a=zeros(size(imchi));
140 A MATLAB Programs for Data Analysis
b=zeros(size(imchi));
%Two vectors for intermediate calculations are initialized
deltaomega=omega(2)-omega(1);
%Here we compute the frequency (or energy) interval
j=1;
beta1=0;
for k=2:g;
b(1)=beta1+imchi(k)*omega(k)ˆ(2*alpha+1)/...
(omega(k)ˆ2-omega(1)ˆ2);
beta1=b(1);
end;
rechi(1)=2/pi*deltaomega*b(1)*omega(1)ˆ(-2*alpha);
%First element of the output: the principal part integration
%is computed by excluding the first element of the input
j=g;
alpha1=0;
for k=1:g-1;
a(g)=alpha1+imchi(k)*omega(k)ˆ(2*alpha+1)/...
(omega(k)ˆ2-omega(g)ˆ2);
alpha1=a(g);
end;
rechi(g)=2/pi*deltaomega*a(g)*omega(g)ˆ(-2*alpha);
%Last element of the output: the principal part integration
%is computed by excluding the last element of the input
for j=2:g-1; ;
%Loop on the inner components of the output vector.
alpha1=0;
beta1=0;
for k=1:j-1;
a(j)=alpha1+imchi(k)*omega(k)ˆ(2*alpha+1)/...
(omega(k)ˆ2-omega(j)ˆ2);
alpha1=a(j);
end;
for k=j+1:g;
b(j)=beta1+imchi(k)*omega(k)ˆ(2*alpha+1)/...
(omega(k)ˆ2-omega(j)ˆ2);
beta1=b(j);
end;
rechi(j)=2/pi*deltaomega*(a(j)+b(j))*omega(j)ˆ(-2*alpha);
end;
%Last element of the output: the principal part integration
%is computed by excluding the last element of the input
A.3 Program 3: Self-Consistent Estimate of the Real and Imaginary Parts 141
function [refin,imfin]=selfconsbook(omega,rechi,imchi,N,mu)
%The program inputs are 1) omega, vector of the frequency (or
%energy) vector, 2) rechi, vector of the first-guess real part
%of the susceptibility under examination 3) imchi, vector of
%the first-guess imaginary part of the susceptibility under
%examination, 4) N, number of iterations, and 5) mu, weight factor,
%which must be between 0 and 1 (0.5 is usually a good choice).
%mu determines the weight we want to give to the first-guess
%estimates in the self-consistent procedure. The three vectors
%1), 2) and 3) must have the same length.
%The output consists of the self-consistent estimates of
%the real and of the imaginary part as obtained by
%combining recursively first-guess estimates and outputs
%of K-K relations.
%In order to use this program, save the whole text contained
%in this section in a file and name it selfconsbook.m
if size(omega,1)>size(omega,2);
omega=omega’;
end;
if size(rechi,1)>size(rechi,2);
rechi=rechi’;
end;
if size(imchi,1)>size(imchi,2);
imchi=imchi’;
end;
%Here the program rearranges the three vectors so that,
%whichever their initial shape, they become row vectors.
comodo1=rechi;
comodo2=imchi;
%Here the program defines two intermediate variables.
for j=1:N;
comodo1=kkrebook(omega,comodo2,0);
comodo1=(mu*rechi+(1-mu)*comodo1);
comodo2=kkimbook(omega,comodo1,0);
comodo2=(mu*imchi+(1-mu)*comodo2);
end;
%At each step the program computes the best estimate
%of the real and imaginary part by combining application
%of K-K relations with actual measurements.
refin=comodo1;
imfin=comodo2;
142 A MATLAB Programs for Data Analysis
function imchi=sskkimbook(omega,rechi,omega1,imchi1,alpha)
%The program inputs are 1) omega, vector of the frequency
%(or energy) components, 2) rechi, vector of the real
%part of the susceptibility under examination, 3) omega1,
%anchor point, 4) imchi1, value of the imaginary part at
%the anchor point, 5) alpha, value of the moment considered.
%The two vectors 1) and 2) must have the same length.
%The output is the estimate of the
%imaginary part as obtained by using SSKK relations.
%In order to use this program, save the whole text contained
%in this section in a file and name it sskkimbook.m
if size(omega,1)>size(omega,2);
omega=omega’;
end; if size(rechi,1)>size(rechi,2);
rechi=rechi’;
end;
%Here the program rearranges the two vectors so that,
%whichever their initial shape, they become row vectors.
g=size(omega,2);
%Size of the vectors.%
k=0;
for j=1:g;
if omega(j)==omega1;
k=j;
end;
end;
%Determination of the anchor point.
imchi=kkimbook(omega,rechi,alpha);
%Application of K-K relations
imchi=imchi+omega1ˆ(2*alpha-1)*omega.ˆ(1-2*alpha)*(imchi1-imchi(k));
%The subtracted relation upgrades the estimate obtained
%with K-K relations.
A.5 Program 5: Estimation of the Real Part 143
function rechi=sskkrebook(omega,imchi,omega1,rechi1,alpha)
%The program inputs are 1) omega, vector of the
% frequency (or energy) components, 2) imchi, vector of
%the imaginary part of the susceptibility
%under examination, 3) omega1, anchor point, 4) rechi1,
%value of the real part at the anchor point, 5) alpha,
%value of the moment considered.
%The two vectors 1) and 2) must have the same length.
%The output is the estimate of the
%real part as obtained by using SSKK relations.
%In order to use this program, save the whole text contained
%in this section in a file and name it sskkrebook.m
if size(omega,1)>size(omega,2);
omega=omega’;
end; if size(imchi,1)>size(imchi,2);
rechi=rechi’;
end;
%Here the program rearranges the two vectors so that,
%whichever their initial shape, they become row vectors.
g=size(omega,2);
%Size of the vectors.%
rechi=kkrebook(omega,imchi,alpha);
%Application of K-K relations
rechi=rechi+omega1ˆ(2*alpha)*omega.ˆ(-2*alpha)*(rechi1-rechi(k));
%The subtracted relation upgrades the estimate obtained
%with K-K relations.
References
181. V. Chernyak and S. Mukamel, “Generalized sum rules for optical nonlinearities
of many electron system,” J. Chem. Phys. 103, 7640–7644 (1995).
182. J. P. Burg, Maximum Entropy Spectral Analysis, Ph.D. thesis (Stanford
University, Department of Geophysics, 1975).
183. E. M. Vartiainen, T. Asakura, and K.-E. Peiponen, “Generalized nonitera-
tive maximum entropy procedure for phase retrieval problems in optical spec-
troscopy,” Opt. Commun. 104, 149–156 (1993).
184. E. M. Vartiainen, K.-E. Peiponen, and T. Asakura, “Sum rules in testing non-
linear susceptibility obtained using the maximum entropy model,” J. Phys.:
Condens. Matter 5, L113–L116 (1993).
185. E. M. Vartiainen and K.-E. Peiponen, “Meromorphic degenerate nonlinear
susceptibility: Phase retrieval from the amplitude spectrum,” Phys. Rev. B
50, 1941–1944 (1994).
186. E. M. Vartiainen, K.-E. Peiponen, and T. Asakura, “Dispersion theory and
phase retrieval of meromorphic total susceptibility,” J. Phys.: Condens. Mat.
9, 8937–8943 (1997).
187. S. E. Harris, “Electromagnetically induced transparency,” Phys. Today 50,
36–42 (1997).
188. J. J. Saarinen, “Sum rules for arbitrary-order harmonic generation suscepti-
bilities,” Eur. Phys. J. B 30, 551–557 (2002).
189. F. Bassani and V. Lucarini, “Asymptotic behaviour and general properties of
harmonic generation susceptibilities,” Eur. Phys. J. B 17, 567–573 (2000).
190. N. P. Rapapa and S. Scandolo, “Universal constraints for the third-harmonic
generation susceptibility,” J. Phys.: Condens. Matter 8, 6997–7004 (1996).
191. F. W. King, “Efficient numerical approach to the evaluation of Kramers-
Kronig transforms,” J. Opt. Soc. Am. B 19, 2427–2436 (2002).
192. C. Y. Fong and Y. R. Shen, “Theoretical studies on the dispersion of the
nonlinear optical susceptibilities in GaAs, InAs, and InSb,” Phys. Rev. B 12,
2325–2328 (1975).
193. D. J. Moss, J. E. Sipe, and H. M. Van Driel, “Empirical tight-binding calcula-
tion of dispersion in the second-order nonlinear optical constant for zinc-blende
crystals,” Phys. Rev. B 36, 9708–9721 (1987).
194. C. G. B. Garrett and F. N. G. Robinson, “Miller’s phenomenological rule for
computing nonlinear susceptibilities,” IEEE J. Quantum Electron. 2, 328–329
(1966).
195. E. Tokunaga, A. Terasaki, and T. Kobayashi, “Femtosecond time-resolved
dispersion relations studied with a frequency-domain interferometer,” Phys.
Rev. A 47, 4581–4584 (1993).
196. K.-E. Peiponen, J. J. Saarinen, and Y. Svirko, “Derivation of general disper-
sion relations and sum rules for meromorphic nonlinear optical spectroscopy,”
Phys. Rev. A 69, 043818 (2004).
197. R. Nevanlinna and V. Paatero, Introduction to Complex Analysis (Chelsea,
New York, 1964).
198. F. W. King, “Sum rules for the optical constants,” J. Math. Phys. 17, 1509–
1514 (1976).
199. E. M. Vartiainen, K.-E. Peiponen, and T. Asakura, “Maximum entropy model
in reflection spectra analysis,” Opt. Commun. 89, 37–40 (1992).
200. J. K. Kauppinen, D. J. Moffatt, M. R. Hollberg, and H. H. Mantsch, “A
new line-narrowing procedure based on Fourier self-deconvolution, maximum
entropy, and linear prediction,,” Appl. Spectrosc. 45, 411 (1991).
References 155
linear susceptibility 12, 16–18, 20, 25, polythiophene 93, 95–98, 100, 101
29–35, 46, 48, 78, 86, 106, 107 prism 24, 117, 119, 122–124
effective 25 pump-and-probe 72–77, 79–81, 89,
104, 109, 133
MATLAB 3, 137 susceptibility 72, 74–77, 79, 80
Maximum Entropy Method see MEM
Maxwell Garnett system see MG reflectance 2, 15, 23, 39–44, 47, 48,
MEM 115–117, 119–121, 124–126, 115–119, 121–124, 127–129, 131,
128–131, 134 133, 134
MG 21–26, 30, 34, 124, 125, 128 reflectivity 2, 24, 34, 35, 39–42, 46, 48,
MSKK 47, 48, 72, 83, 90, 91, 104 109, 115–117, 128, 131
refractive index 1, 25, 28, 35, 36, 39,
nanocomposite 23, 128
41–44, 47, 48, 117–121, 123–126
nanostructure 3, 21–27, 30, 31, 33, 46,
negative 39
135
residue 110–114
layered 22, 24–26, 30, 46
resonance 23, 79, 92, 103, 106, 111,
nonlinear susceptibility 71–75, 77–79,
120, 122–124, 128
92, 96, 101, 102, 104, 106, 109, 110,
115, 117, 128–130, 133, 134
spectroscopy
degenerate 115, 129
reflectance 39
effective 129, 130
reflection 2, 42, 47, 115, 117
holomorphic 109, 128
terahertz 3, 126
meromorphic 109, 134
transmission 1, 2
optics 2, 19, 23, 27, 33, 71–73, 79, 83, SPR 122–125
89, 90, 92, 109, 110, 112, 114, 133, squeezing procedure 120
134 SSKK 47, 90, 92, 101–104, 137
linear 2, 19, 23, 27, 33, 79, 89, 90, sum rule 101
109, 114, 133 sum rules 1–3, 27, 31, 33–35, 39, 45,
nonlinear 71–73, 83, 90, 92, 109, 46, 71, 72, 78–80, 83, 84, 87–90, 93,
110, 112, 134 98–101, 106, 109, 110, 112–114,
oscillator 117, 133, 134
anharmonic 87, 105, 107 surface plasmon resonance see SPR
Drude-Lorentz 33, 120
TE-polarized light 14, 24, 25, 41, 119
paper 119, 120 tensor 11, 12, 18, 30, 74, 77, 83, 89
phase retrieval 2, 3, 39–42, 47, theorem
115–117, 124, 128, 134, 135 Scandolo 73–76, 83, 84, 110, 133
polarization 5, 6, 9–13, 16, 19, 20, 29, superconvergence 31–34, 36, 45, 78,
30, 41, 77, 84, 85, 117, 122 80, 88, 90, 133, 134
linear 11, 12, 16 Titchmarsch 28, 29, 72, 74, 133
macroscopic 19, 20 TM-polarized light 14, 15, 25, 26, 41,
microscopic 19 42, 117, 122
nonlinear 77, 84, 85, 117 Toeplitz system 116
pole 28–30, 76, 77, 89, 90, 109–111, transform
114, 134 Fourier 5, 11, 12, 16–18, 28, 39, 85,
polysilane 94, 96, 97, 99, 101, 102, 115, 116, 126
128 Hilbert 2, 28–30, 74, 110, 111
Springer Series in
optical sciences
Volume 1
1 Solid-State Laser Engineering
By W. Koechner, 5th revised and updated ed. 1999, 472 figs., 55 tabs., XII, 746 pages