- #1
snickersnee
- 34
- 0
Homework Statement
I'm trying to write Mathematica code to use Kramers-Kronig on a csv file with 2 columns. Column 1 is h(eV). It goes from 0 to 6, in increments of 0.1. Column 2 is alpha (cm^-1).
In the equation below, I'm guessing column 1 is Ω. But what should I put in for ω?
Homework Equations
(Source: http://www.rp-photonics.com/kramers_kronig_relations.html)
The Attempt at a Solution
Code:
c = 300000000;
data = Import[
"kk.csv", "CSV"];
column1 = data[[All, 1]];
column2 = data[[All, 2]];output :=
1 + (c )/(pi) NIntegrate[
column2/(column1^2 - omega^2), {column1, 0.1, 0, infinity},
Method -> "PrincipalValue", Exclusions -> Automatic]
Plot[output, {column1, 0, 6}, AxesOrigin -> {0, 0}]