Refractive index calculator¶
In this section, we provide a description of the online and offline tools for calculations of the refractive index of ices. Details that are common to both cases are presented below.
The online version of this tool is available at: https://icedb.strw.leidenuniv.nl/Kramers_Kronig.
Absorbance spectrum file¶
Both online and offline tools uses the absorbance spectrum of ices as input data to calculate the real and imaginary refractive index. This file is required to be in ASCII format with two columns. The first column contains the wavenumber and the second column contains the absorbance data. An example is shown in Figure 1.
Note
The wavenumber column must be sorted in decreasing order.
Input parameters¶
A few input parameters are required before starting the calculations of the real and imaginary refractive index. A description of these parameters are given below:
- Ice thickness in microns
The methodology requires the ice thickness of the ice sample in units of micrometers.
- Refractive index at 670 nm
The real refractive index of the ice at 670 nm. This value is highly dependent of the composition and structure of the ice. For example, see UV_vis_refractive_index_ for values suitable for pure H2O ice at different temperatures.
- Refractive index of the substrate
The real refractive index of the substrate (superficie where the gases condense to form ice) is needed in this methodology. The values for typical substrates are 1.73 for CsI, 1.54 for KBr and 2.54 for ZnSe.
- MAPE
This stands for Mean Average Percentage Error. This value is used as a convergency criteria to stop the code after several iterations. See Calculations for more details.
Calculations¶
The calculations are performed by using mostly Lambert-Beer equation and Kramers-Kronig relations. More details about these two equations can be found in Rocha & Pilling (2014) and Rocha et al. (in prep.).
Figure 2 shows an illustrations of the steps performed in the calculations of the real and imaginary refractive index of ices.
Note
The calculations in the online version takes around 1 minute for 5000 datapoints. For larger files, we recommend to use the offline version of the code (See Offline code ).
Refractive index viewer¶
Once the calculations are performed, the online tools enables the plot visualization automatically. The viewer also used Bokeh to plot the results. An example of outputs are shown in Figure 3.
Downloading results¶
The plots can be downloaded by using the save tool in the Bokeh toolbar. To download the files with the data, please use the green button labeled Download the refractive index.
Offline code¶
The offline code can be downloaded from the Leiden Ice Database GitHub page. Versions for Windows and Linux/Mac are available.
Note
In both versions, the absorbance file must be inside the folder that contains the Python script.
Windows¶
To run the code in Windows is as simple as double clicking on the .exe files. Next, the input parameters are required before proceeding with the calculation.
Linux¶
In Linux, the user can open the .py file to run the offline calculations. The welcome interface is shown in Figure 4.