Skip to content
X-ray Optical Constants Daemon - serving the index of refraction of elements and compounds via HTTP
C C++
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


X-ray Optical Constants Daemon (xocd) serves the index of refraction
for various elements and compounds via HTTP to your applications.

The data is read from the *.nk-files of the IMD suite, located
in a folder './data', or given by the option -f <folder>.
The IMD software can be obtained from David Windt [1] or the ESRF [2].
Example files for silicon (Si), tungsten (W) and boron carbide (B4C),
as well as vacuum (vac) are provided.
The http server part is taken from the mongoose project [3].

xocd can is written by Markus Osterhoff and can be optain from [4,5].

	usage: ./xocd [-d] [-f <folder>] [-p port] [-h]

	-d: daemonize, fork into background; default: don't
	-f: use *.nk-files in <folder>; default: ./data
	-p: listen on <port> for HTTP connections; default: 42001
	-h: help; this is me.

How to get the data:
browse to http://localhost:42001/ -- with the following URIs:
	/Si        -- ask for whole Si.nk-file
	/Si/17keV  -- ask for index of refraction at 17 keV. 
	/Si/8048eV -- ask for index of refraction at 8048 eV.
	/Si/0.1nm  -- ask for index of refraction at 0.1 nm. 

The output for specific energies / wavelengths will be of the form
	1 -(delta) +(beta)i


Something went wrong with that request. Please try again.