# How to get material data from material database

This post describes how to get material data from the Material database or from a material fit.

The following plots show the raw sampled data (green dots) of the complex refractive indices of Silicon as well as their fitted curves (blue lines) that are actually used in the FDTD simulation.

To get the raw sampled data, you can use getindex or getmaterial script command
To get the fitted data, use the getfdtdindex script command.

Here’s an example script that retrieves both data, plots them and save them to text files.
31906_1.fsp (289.9 KB)
31906_1.lsf (1.3 KB)

You might have noticed that the plots of the retrieved sampled data using the getindex look slightly different from those visualized in the material explorer. This is because the sampling frequency (wavelength) points used in the above script file is different from those in the material database. The refractive index at the specified frequency is then linearly interpolated from the neighboring frequencies where the data is available.

2 Likes

You can also extract the permittivity data from the material database with corresponding wavelengths using:
mdata = getmaterial(material,"sampled data");

And then plot both real and imaginary parts:
plot(c/mdata(:,1)*1e6,real(sqrt(mdata(:,2))),"wavelength [um]","n",material,"plot points");
plot(c/mdata(:,1)*1e6,imag(sqrt(mdata(:,2))),"wavelength [um]","k",material,"plot points");

In this case you have the same results as in the material explorer. This approach may be useful when trying to obtain proper fit to sparse data points.

1 Like