Skip to content

xraysoftmat/kkcalc

 
 

Repository files navigation

KKCalc2

kkcalc2 is a comprehensive toolkit for calculating Kramers Kronig transforms of X-ray absorption/dispersion data, and is built to the feature-rich standards of xraysoftmat.

pypi zenodo Documentation Coverage Status pre-commit.ci status

PyTest Linting Documentation

Python SemVer Code style: black Ruff Code doc: numpydoc

Introduction

kkcalc2 is an open-source python package to calculate the Kramers-Kronig (inverse) transform of X-ray absorption (dispersion) data:

$$f_2(E) = \frac{2}{\pi} P \int_{0}^{\infty}\frac{x f_1(x)}{x^2 - E^2} dx + \mathcal{Z}^\star$$

where $f_1$ and $f_2$ are the real and imaginary parts of the complex index of refraction, respectively, $\mathcal{Z}^\star$ is the relativistic correction, and $P$ denotes the Cauchy principal value at ($x=E$).

kkcalc2 uses a polynomial representation algorithm developed by Watts [1].

This package provides an object oriented API, to evaluate optical constants (index of refraction, absorption and dispersion, etc.), extend measurement spectra with databases, or can be accessed through a PyQT6 GUI interface. Documentation can be found at readthedocs, and releases (including documentation and executable builds) can be found at github.

References

[1]Benjamin Watts, "Calculation of the Kramers-Kronig transform of X-ray spectra by a piecewise Laurent polynomial method", Opt. Express 22, (2014) 23628-23639. DOI:10.1364/OE.22.023628

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%