luceda ipkiss教程 55:画螺旋型布拉格光栅

发布时间:2024年01月13日

案例分享, 画螺旋型布拉格光栅:
在这里插入图片描述
所有代码如下:

from si_fab import all as pdk
import ipkiss3.all as i3
from picazzo3.wg.spirals import FixedLengthSpiralRounded

grating_size = 0.7
grating_wg_width = 1.2
wg_width = 0.5
pitch = 1.4
reference = i3.LayoutCell().Layout(elements=[i3.Rectangle(layer=i3.TECH.PPLAYER.SI,
                                                          box_size=(grating_size, grating_wg_width))])
windows = [
    i3.PathTraceWindow(layer=i3.TECH.PPLAYER.SI, start_offset=-0.5 * wg_width, end_offset=0.5 * wg_width),
    i3.PeriodicArrayReferenceTraceWindow(reference=reference, offset=0, pitch=pitch)
]
wg_t = i3.WindowWaveguideTemplate()
wg_t.Layout(windows=windows)

spiral = FixedLengthSpiralRounded(total_length=1000, n_o_loops=2, trace_template=wg_t)
lay = spiral.Layout(
    incoupling_length=10.0,
    bend_radius=10,
    spacing=5,
    stub_direction="V",  # either H or V
    growth_direction="V",  # either H or V
    rounding_algorithm=i3.EulerRoundingAlgorithm(p=0.7),
)

class Merge_bg(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_elements(self, elems):
            generated_elements = i3.get_layer_elements(lay)
            layers = [i3.TECH.PPLAYER.SI]
            return i3.merge_elements(generated_elements, layers)

if __name__ == '__main__':
    Merge_bg().Layout().visualize(legacy=True)
    Merge_bg().Layout().write_gdsii("Merge_bg.gds")

文章来源:https://blog.csdn.net/qq_34316088/article/details/135572081
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。