Possible Duplicate:
Kramers-Kronig in Mathematica
I am trying to get epsilon2
(imaginary part) from known epsilon1
(real part) data with the respective energy values (w
), using the Kramers-Kronig relations. My code is:
{epsilon1, w} = ToExpression@Import["http://pastebin.com/raw.php?i=Z08GwMa8"];
epsilon2[w_]:= 2/Pi NIntegrate[a epsilon1[a]/(a^2-w^2), {a, 0, 5.5793},
Method-> "PrincipalValue", MaxRecursion->20, Exclusions->{(a^2-w^2)==0}]//Quiet
Plot[epsilon2[w],{w,0,5.57932},AxesOrigin->{0,0},PlotPoints->400]
However, by using the code above, I managed only to get a list of irrelevant numbers. The graph of epsilon1
looks like a sine curve, while that of epsilon2
looks like an "M" shape.
Any help is greatly appreciated! =)
P.S. If pastebin is down, you can get the original data from revision 1.