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

案例分享, 画螺旋型布拉格光栅:
luceda ipkiss教程 55:画螺旋型布拉格光栅_第1张图片
所有代码如下:

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

你可能感兴趣的:(光子集成线路设计,ipkiss,python,开发语言)