Replies: 1 comment
-
@zrzyyds Are you using this example as a starting point? Or are you using a pixelated medium? If it's the first case, you can use the optimized parameters to create a gds polygon the same way it's done in import gdstk
def export_gdsii(ys, layer=0, datatype=0, filename = "taper.gds"):
"""Export a gdsii file with the taper based on the supplied y values."""
# Not using Jax here, so it's fine to simply concatenate the vertices
vertices = list(zip(xs, ys)) + list(zip(xs, -ys))[::-1]
# Create a polygon from the vertices
taper = gdstk.Polygon(vertices, layer=layer, datatype=datatype)
# Create a gdsii library with a cell for the taper
lib = gdstk.Library("Taper")
cell = lib.new_cell("TAPER")
# Add the taper ti the cell
cell.add(taper)
# Write the library to a gds file
lib.write_gds(filename)
...
export_gdsii(params_best) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am a beginner. I'm trying to run a program for the inverse design of a taper. The generated device profile is non-linear, but the device performs well.
Excuse me, how can I convert the device picture into a gds file. Because I want to build it and test its performance. I am currently using klayout. I need to write a program or is there any other software that can achieve it, thank you!
Beta Was this translation helpful? Give feedback.
All reactions