Home Forums Nazca Questions and Answers Very slow Python interpreter speeds for subwavelength grating waveguides

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6314
    rosscheriton
    Member

    I’m currently using Nazca to generate my photonic masks which have a lot of scripted subwavelength structures that are generated from many tiny Nazca interconnect pieces. The amount of subwavelength grating elements is on the order of hundreds of thousands on a single mask. This results in the python interpreter taking literally days to work through the script and just fails after a while. Memory is being consumed gradually, and it just fills up and interpreting slows to a crawl.

    I’m using Visual Studio Code in Windows 10 with Nazca 0.5.12.
    Is there a way around this issue or a way to speed this up?

    #6335
    Xaveer
    Moderator

    Hi,

    There are several ways to speed this up (possibly by many orders of magnitude).

    • For repetitive structures (photonic crystals, gratings, …) you can use GDS arrays. See tutorial https://nazca-design.org/photonic-crystal-gds-array/
    • Using polygons (not cells) for mask elements, if you only need polygons. Cells act as circuit elements with pins and lots of extra info, which may not be needed. Reuse the polygon when possible:
    my_pol = nd.Polygon(points=[(),(),()...], layer=...)
    my_pol.put(...)
    my_pol.put(...)
    my_pol.put(...)
    
    • Switch off “group connect” (automated netlist connections) when not needed:
    nd.cfg.group_connect = False
    

    Xaveer (and Ronald)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.