TAGGED: Import-and-export-gds, lumerical-script, script
-
-
August 28, 2023 at 5:23 pm
Balasubramanian Malayappan
SubscriberHi,I have a query regarding the gdsopen command in Lumerical scripting.I wish to customize the database units for the gds file being created and exported. I don't understand what "userUnit" is, and am not able to find any relevant resources about initializing it.Can you please share an example script of gdsopen command using "userUnit" and "dataBaseUnit" parameters?thanks in advance -
August 28, 2023 at 10:03 pm
Guilin Sun
Ansys EmployeeIt seems no direct example. But the website mentions:
The default database units are in 0.1nm and the user units are microns
https://optics.ansys.com/hc/en-us/articles/360034927093-gdsopen-Script-command
"userUnit" should be the unit you use, and "dataBaseUnit" should be the unit when the GDS is created. You can create a rectangle of 1um and see the result.
-
August 29, 2023 at 7:06 am
Balasubramanian Malayappan
SubscriberHi Guilin Sun,
I tried it. It is throwing up the following error message.
: in gdsopen: argument 2 must be one of scalar matrix
How should I resolve this?
-
-
August 29, 2023 at 4:47 pm
Guilin Sun
Ansys EmployeeThe error message suggests to assign a number, not quoted.Â
Since the website does not give an example using them, I would suggest to use the online example script to assign the unit to each parameter individually. " gdsopen" is only used to open a gds file handle.
Â
Â
-
August 30, 2023 at 7:16 am
Balasubramanian Malayappan
SubscriberI understand that gdsopen is used to create a gds file and also its handle. Following is the command I gave as the input as I want the user unit to be micron and the gds database unit as 5 nm. The resultant error message is ": in gdsopen: argument 2 must be one of scalar matrix"
f = gdsopen('test.gds','1e-6','0.005e-6');
How to assign the unit to each parameter individually?
I do not see any command (other than gdsopen) in the Lumerical script by which the properties for the entire gds file can be modified.
-
-
August 30, 2023 at 2:49 pm
Guilin Sun
Ansys Employeethe correct usage is:
f = gdsopen('test.gds',1e-6,0.005e-6);
Please check if it can work as expected.
I would strongly suggest to define a unit such as
um=1e-6;
then when you assian size to a variable, such as xspan to be 5um, you can use
5*um.
Â
Â
-
August 31, 2023 at 7:48 am
Balasubramanian Malayappan
SubscriberYes, the above command works correctly. Thanks for the help.
Further, the advise on using variables is duly noted.
Cheers
-
-
- The topic ‘gdsopen command using ‘userUnit’’ is closed to new replies.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.