This section describes the data format for importing n and k (anisotropy possible, 2D and 3D) as a function of volume into the import primitive. It also provides example data files and example script files that generate the data files. There are two ways to import the nk data, 1) from data stored in a text file, 2) from matrices created by script commands. The imported nk data is only for a single frequency.
File formats (isotropic and anisotropic)
The file formats are shown in the following tables. Spaces, commas or tabs can be used as separators in the files. The columns do not have to be aligned. For 2D data, it will need at least 2 data points in the z direction, ie, p=2.
Description |
File format (isotropic) |
File format (anisotropic) |
---|---|---|
type 1: Only the real part of the index is included in the file. The values of x range from X1 to Xn, y from Y1 to Ym and z from Z1 to Zp. X1 must be the minimum X value and Xn is the maximum value. Also, the values of x, y, and z must be uniformly spaced - see above note. |
||
type 2: The imaginary part of the index (k) is included in the second column of the file after the header. An example file is usr_importnk_3d.txt. A script file that generates this example is usr_importnk_3d.lsf |
n and single frequency k import GUI
To import n,k data, click on the (n,k) Material option of the Import button in the main toolbar, which will open up the import wizard.
The different fields are
- SELECT FILE: let the user specify the data file to be imported.
- X, Y, Z: the data origin in the global coordinates of the Graphical Layout Editor. If you defined your volume with respect to a particular point in space, for example (0,0,-5) microns, then you should set z0 to -5 microns.
- X SPAN, YSPAN, ZSPAN: This defines the size of volume that you are importing. These fields are inactive and help to determine that the file units have been properly chosen.
- FILE UNITS: Select units for the data in your file.
- IMPORT AS Mji INSTEAD OF Mij: 2D simulation only. It is often easy to cycle through the array indices in the wrong order when exporting the file, and this check button allows you to reverse the order easily. Typically, it is very easy to see in the figure window when you have the order incorrect.
- IMPORT AS Mkji INSTEAD OF Mijk: It is often easy to cycle through the array indices in the wrong order when exporting the file, and this check button allows you to reverse the order easily. Typically, it is very easy to see in the figure window when you have the order incorrect.
- PLOT PLANE: You can image the data in either the x-y plane, the x-z plane or the y-z plane to be sure that it is correctly imported. Use this menu chooser to switch between planes.
- Z (or X or Y): Depending on the PLOT PLANE chosen, you can view cross sections at any depth into the structure. Use this slider or the value input field to choose the depth of cross section.
- IMAGE N, IMAGE K: Choose to view n or k in the figure window.
Importing n and k data using script commands
The following script commands are described in detail in the Scripting chapter. Examples script files are provided here.
Command |
Example files |
Description |
---|---|---|
importnk |
usr_importnk_3d.fsp usr_importnk_3d.lsf usr_importnk_3d.txt |
Import n and k data from a file. |
importnk2 |
usr_importnk_3d.fsp usr_importnk2_3d.lsf |
Import n and k data from script variables |
Visualizing the anisotropy
By default, only the xx-index is shown in the CAD and the import wizard. Use an index monitor to see indices in other direction.