This section describes how to use the CSV import to directly import spatial Liquid Crystal (LC) orientation data from a CSV (comma-separated value) file. This file is typically created with TechWiz LCD from Sanayi System Co., Ltd. (http://sanayisystem.com/) and makes it easy to import spatial information on LC orientation from TechWiz LCD simulations.
Note: Other methods to define spatially-varying LC
The required CSV file format is not simple to generate yourself, so data that is not already in the required format can be imported using the addgridattribute and importdataset script commands instead. See LC rotation for more information about adding spatially-varying LC grid attributes. |
The file format for the CSV file that defines the LC orientation as a function of space can be in a 2D format or 3D format.
File format
2D format
The file should have the form:
THETA,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,…
Y=2,45,45,35,25,-,-,-,-,25,…
….
PHI,X=-50,X=-49,X=-48,X=-47,X=-46,X=-45,X=-44,X=-43,X=-42,X=-41,X=-40,X=-39,X=-38,...
Y=1,35,45,55,65,75,85,90,90,-,-,90,90,-,-,…
Y=2,11.5,15.2,20,30,-,-,-,-,30,40,…
….
Where
- The orientation of the LC is defined by THETA and PHI.
- PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation when looking down the z-axis
- THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-axis, is 90-THETA, in degrees.
- The Ux, Uy, and Uz components of the unit orientation vector of the LC is given by
- Ux = sin(90-THETA)*cos(-PHI)
- Uy=sin(90-THETA)*sin(-PHI)
- Uz=cos(90-THETA)
- When THETA or PHI are given by “-”, it indicates that there is no LC at that grid location
- The units of X and Y are always in micrometers (microns)
- There are precisely 2 sections, one for THETA and one for PHI
- The same values of X and Y are repeated in each section
- Each section has the same number of values of X and Y as columns and rows for THETA or PHI
3D format
The file should have the form:
THETA
Z=0,X=0,X=1,X=2,X=3,…
Y=1,90,90,90,90,90,90,90,90,-,-,90,90,-,-,…
Y=2,45,10,22.5,15.7,-,-,-,-,75,…
….
PHI
Z=0,X=0,X=1,X=2,X=3,…
Y=1,0,0,0,0,90,90,90,90,-,-,90,90,-,-,…
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,…
….
THETA
Z=1,X=0,X=1,X=2,X=3,…
Y=1,75,75,75,90,90,90,90,90,-,-,90,90,-,-,…
Y=2,45,10,22.5,15.7,-,-,-,-,75,…
….
PHI
Z=1, X=0,X=1,X=2,X=3,…
Y=1,10,20,30,0,90,90,90,90,-,-,90,90,-,-,…
Y=2,13.4,10.5,3.23,15.7,-,-,-,-,75,73,…
….
…………
Where
- The orientation of the LC is defined by THETA and PHI.
- PHI is the azimuthal angle in the X-Y plane with respect to the x-axis, in degrees, using a clockwise rotation when looking down the z-axis
- THETA is the angle between the x-y plane and the LC, in degrees. The polar angle, measured from the z-axis, is 90-THETA, in degrees.
- The Ux, Uy, and Uz components of the unit orientation vector of the LC is given by
- Ux = sin(90-THETA)*cos(-PHI)
- Uy=sin(90-THETA)*sin(-PHI)
- Uz=cos(90-THETA)
- When THETA or PHI are given by “-”, it indicates that there is no LC at that grid location
- The units of X and Y are always in micrometers (microns)
- There are an equal number of THETA and PHI sections. The number of values of Z is equal to the number of THETA (or PHI) sections.
- The same values of X and Y are repeated in each section
- The same value of Z is repeated in each pair of THETA and PHI sections
- Each section has the same number of values of X and Y as columns and rows for THETA or PHI
Graphical import
Opening the wizard
The CSV import feature is accessible from the import toolbar with the menu item “Import from CSV”.
This will open the CSV import wizard where you can import any CSV file described in the file format section. The import wizard has three pages.
Page 1
This page allows you to select a file. Press the browse button get a file browser for easier selection.
Page 2
The file display
This page displays the CSV file, and you can control the amount of the file viewed. For larger files, it may not be desirable to preview the entire file.
The advanced settings and rotations
- Optionally, rotations in increments of 90 degrees around the x, y, and z axes may be performed. For example, if the exported format was in the x-y plane while the user desires the structure to be in the x-z plane, a 90-degree rotation around the x-axis can be used. This rotation applies to both the spatial location and the LC orientation.
- For 2D data sets, the user can indicate that the data was originally exported from the x-z plane (even though in the CSV file, the axes are specified as 'X' and 'Y'). This is critical to obtain the correct orientation of the LC with respect to the x-y plane that will be used in FDTD. However, if 2D data is actually exported from the x-y plane then this should be unchecked.
Page 3
The color scheme
The color scheme setting can be used to make the arrows appear blue when they are oriented with a particular axis. For example, if the color scheme is set to "uz", the arrows will be blue if they are in the +z direction, green if they are at 45 degrees to the z-axis, and red if they are in the x-y plane.
The plot control
The plot allows for full zooming and rotation in 3D. Click the Show plot help link to expand the plot help and see all the possible controls.
Range of data for each axis
This displays the actual span of data for each axis and the number of data points that were imported. Note that you may see fewer cylinders displayed because some of the imported locations may have been set to "-" in the file, and a cylinder will not be drawn at that location.
Reinterpolate data for viewing
The user can interpolate the data for better viewing. This is particularly useful when the data is defined over a region with a large aspect ratio or for large files.
Scripted import
The importcsvlc script command can be used to import the LC information from the CSV file from the script without using the GUI import wizard.
Imported object
The CSV data is imported into a group object that contains Lumerical’s “grid attribute” and a rectangle. The rectangle is transparent for better viewing. The properties of the imported LC including position, scaling, resampling for viewing, and the LC material can all be set directly by the “LC” analysis group. The names of the LC material and LC attribute can be changed directly in the tree view. If desired, the grid attribute can be removed from the group for association with more complex physical geometries. Also, when scripted import is used, it is possible to import only the grid attribute for association with more complex physical geometries.
The following properties can be edited directly in the analysis group called "LC".
Please note that the corresponding properties should not be edited directly in the "LC attribute" child or the "LC material" child objects as they will immediately be overwritten by the "LC" analysis group.