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

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

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")

  • 10
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值