Пример #1
0
def strip(
    wg_width: float = 0.5,
    layer: Layer = (1, 0),
    layer_cladding: Layer = (111, 0),
    radius: float = 10.0,
    cladding_offset: float = 3.0,
    euler_bend: bool = True,
    wg_type: str = "strip",
) -> WaveguideTemplate:
    """
    wg_type: strip, slot, and swg (subwavelength)
    resist: Specifies the type of photoresist used (+ or -)
    """

    return pc.WaveguideTemplate(
        bend_radius=radius,
        wg_width=wg_width,
        wg_layer=layer[0],
        wg_datatype=layer[1],
        clad_layer=layer_cladding[0],
        clad_datatype=layer_cladding[1],
        clad_width=cladding_offset,
        wg_type=wg_type,
        euler_bend=euler_bend,
    )
Пример #2
0
def wg_strip(
    wg_width=0.5,
    wg_layer=1,
    wg_datatype=0,
    clad_layer=2,
    clad_datatype=0,
    bend_radius=50,
):
    return pc.WaveguideTemplate(
        bend_radius=50.0,
        wg_width=wg_width,
        wg_layer=wg_layer,
        wg_datatype=wg_datatype,
        clad_layer=clad_layer,
        clad_datatype=clad_datatype,
    )
Пример #3
0
def wg_strip(
    wg_width: float = 0.5,
    wg_layer: int = LAYER.WG[0],
    wg_datatype: int = LAYER.WG[1],
    clad_layer: int = LAYER.WGCLAD[0],
    clad_datatype: int = LAYER.WGCLAD[1],
    bend_radius: int = 10,
    clad_offset: int = 3,
) -> WaveguideTemplate:
    return pc.WaveguideTemplate(
        bend_radius=bend_radius,
        wg_width=wg_width,
        wg_layer=wg_layer,
        wg_datatype=wg_datatype,
        clad_layer=clad_layer,
        clad_datatype=clad_datatype,
        clad_width=clad_offset,
        wg_type="strip",
    )
Пример #4
0
def cross_section_to_waveguide_template(cross_section: CrossSectionFactory,
                                        euler_bend: bool = True,
                                        wg_type: str = "strip",
                                        **kwargs) -> WaveguideTemplate:
    x = cross_section(**kwargs)

    layer = x.info["layer"]
    layer_cladding = x.info["layers_cladding"][0]

    return pc.WaveguideTemplate(
        bend_radius=x.info["radius"],
        wg_width=x.info["width"],
        wg_layer=layer[0],
        wg_datatype=layer[1],
        clad_layer=layer_cladding[0],
        clad_datatype=layer_cladding[1],
        clad_width=x.info["cladding_offset"],
        wg_type=wg_type,
        euler_bend=euler_bend,
    )
Пример #5
0
import gdspy
from picwriter import toolkit as tk
import picwriter.components as pc

top = gdspy.Cell("top")

top.add(gdspy.Rectangle((0, 0), (1000, 1000), layer=100, datatype=0))

wgt = pc.WaveguideTemplate(
    wg_width=0.45,
    clad_width=10.0,
    bend_radius=100,
    resist="+",
    fab="ETCH",
    wg_layer=1,
    wg_datatype=0,
    clad_layer=2,
    clad_datatype=0,
)
wg = pc.Waveguide([(25, 25), (975, 25), (975, 500), (25, 500), (25, 975),
                   (975, 975)], wgt)

tk.add(top, wg)

tk.build_mask(top, wgt, final_layer=3, final_datatype=0)

gdspy.LayoutViewer()
gdspy.write_gds("tutorial.gds", unit=1.0e-6, precision=1.0e-9)
Пример #6
0
    for port in po.portlist.keys():
        port_loc = po.portlist[port]["port"]
        direction = direction_to_degree(po.portlist[port]["direction"])

        c.add_port(
            name=port,
            midpoint=[port_loc[0], port_loc[1]],
            width=po.wgt.wg_width,
            orientation=direction,
        )

    return c


if __name__ == "__main__":

    wgt = pc.WaveguideTemplate(
        bend_radius=50.0,
        wg_width=1.0,
        wg_layer=1,
        wg_datatype=0,
        clad_layer=2,
        clad_datatype=0,
    )

    # gc = pc.GratingCoupler(wgt, port=(10, 20), direction=np.pi * 7 / 8)
    gc = pc.GratingCoupler(wgt, port=(10, 20), direction=0.0)
    gcc = picwriter2component(gc)

    pp.show(gcc)
Пример #7
0
 self.Nmax = Nmax
 self.pas = pas
 self.Nmax_ch = Nmax_ch
 self.Taper_out = Taper_out
 self.bend_radius = bend_radius
 self.spiral_width = spiral_width
 self.spiral_length = spiral_length
 self.spiral_spacing = spiral_spacing
 self.grating_focusing_distance = grating_focusing_distance
 self.grating_length = grating_length
 self.grating_width = grating_width
 self.Taper_wg_Template = pc.WaveguideTemplate(
     wg_width=self.Taper_out,
     clad_width=1.0,
     bend_radius=self.bend_radius,
     resist='-',
     fab='ETCH',
     wg_layer=1,
     wg_datatype=0,
     clad_layer=2,
     clad_datatype=0)  #Waveguide template for the Taper extention
 ch_width = []
 spral_width = []
 for i in range(self.Nmax):
     # pas=self.pas if W_min+pas*i >=3 or W_min+pas*i <= 1.8 else 0.1
     spral_width.append(np.around(W_min + pas * i, decimals=1))
     self.wgt.append( \
             pc.WaveguideTemplate(wg_width=np.around(W_min+pas*i,decimals=1), clad_width=1.0,
             bend_radius=self.bend_radius,resist='-', fab='ETCH', wg_layer=1, wg_datatype=0, clad_layer=2,
             clad_datatype=0))
 for i in range(self.Nmax_ch):
     ch_width.append(np.around(W_min_ch + pas_ch * i, decimals=1))
Пример #8
0
        self.portlist["output_top"] = {
            "port": self.output_port_top,
            "direction": "EAST",
        }
        self.portlist["output_bot"] = {
            "port": self.output_port_bot,
            "direction": "EAST",
        }


if __name__ == "__main__":
    #    from . import *
    import picwriter.components as pc

    top = gdspy.Cell("top")
    wgt = pc.WaveguideTemplate(bend_radius=50, wg_width=0.5, resist="+")

    # Values from Publication
    spline_widths = [
        0.5, 0.5, 0.6, 0.7, 0.9, 1.26, 1.4, 1.4, 1.4, 1.4, 1.31, 1.2, 1.2
    ]
    ysplitter = SplineYSplitter(
        wgt,
        length=2,
        widths=spline_widths,
        taper_width=None,
        taper_length=None,
        output_length=10,
        output_wg_sep=5,
        output_width=0.5,
        port=(0, 0),