Components

C

gdsfactory.components.C(width=1.0, size=(10.0, 20.0), layer=(49, 0))[source]

Generates a ‘C’ geometry with ports on both ends. Adapted from phidl

Parameters
  • width (float) – of the line

  • size (Tuple[float, float]) – length and height of the base

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.C(width=1.0, size=(10.0, 20.0), layer=(49, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-1.png

L

gdsfactory.components.L(width=1, size=(10, 20), layer=(49, 0))[source]

Generates an ‘L’ geometry with ports on both ends. Based on phidl.

Parameters
  • width (Union[int, float]) – of the line

  • size (Tuple[int, int]) – length and height of the base

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.L(width=1, size=(10, 20), layer=(49, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-2.png

add_frame

gdsfactory.components.add_frame(component=<function rectangle>, width=10.0, spacing=10.0, layer=(1, 0))[source]

Returns component with a frame around it.

Parameters
  • component (Component) – Component to frame

  • width (float) – of the frame

  • spacing (float) – of component to frame

Return type

Component

import gdsfactory as gf

c = gf.components.add_frame(width=10.0, spacing=10.0, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-3.png

align_wafer

gdsfactory.components.align_wafer(width=10.0, spacing=10.0, cross_length=80.0, layer=(1, 0), layer_cladding=None, square_corner='bottom_left')[source]

Returns cross inside a frame to align wafer.

Return type

Component

import gdsfactory as gf

c = gf.components.align_wafer(width=10.0, spacing=10.0, cross_length=80.0, layer=(1, 0), square_corner='bottom_left')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-4.png

array

gdsfactory.components.array(component=<function straight>, spacing=(150.0, 150.0), columns=6, rows=1)[source]

Returns an array of components.

Parameters
  • component (Union[Callable[…, Component], Component]) – to replicate

  • n – number of components

  • pitch – float

  • axis – x or y

  • rotation – in degrees

  • h_mirror – horizontal mirror

  • v_mirror – vertical mirror

Return type

Component

import gdsfactory as gf

c = gf.components.array(spacing=(150.0, 150.0), columns=6, rows=1)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-5.png

array_with_fanout

gdsfactory.components.array_with_fanout(component=<function pad>, columns=3, pitch=150.0, waveguide_pitch=10.0, start_straight=5.0, end_straight=40.0, radius=5.0, component_port_name='e4', bend=<function bend_euler>, bend_port_name1=None, bend_port_name2=None, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Returns an array of components in X axis with fanout waveguides facing west

Parameters
  • component (Union[Callable[…, Component], Component]) – to replicate

  • columns (int) – number of components

  • pitch (float) – float

  • waveguide_pitch (float) – for fanout

  • start_straight (float) – length of the start of the straight

  • end_straight (float) – lenght of the straight at the end

  • radius (float) – bend radius

  • component_port_name (str) –

  • bend (Callable[…, Component]) –

  • bend_port_name1 (Optional[str]) –

  • bend_port_name2 (Optional[str]) –

  • cross_section (Callable[…, CrossSection]) – cross_section definition

  • **kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.array_with_fanout(columns=3, pitch=150.0, waveguide_pitch=10.0, start_straight=5.0, end_straight=40.0, radius=5.0, component_port_name='e4')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-6.png

array_with_fanout_2d

gdsfactory.components.array_with_fanout_2d(pitch=150.0, pitch_x=None, pitch_y=None, columns=3, rows=2, **kwargs)[source]

Returns 2D array with fanout waveguides facing west.

Parameters
  • pitch (float) – 2D pitch

  • pitch_x (Optional[float]) – defaults to pitch

  • pitch_y (Optional[float]) – defaults to pitch

  • columns (int) –

  • rows (int) –

  • kwargs – component: to replicate pitch: float waveguide_pitch: for fanout start_straight: length of the start of the straight end_straight: lenght of the straight at the end radius: bend radius cross_section: cross_section factory component_port_name: bend_port_name1: bend_port_name2: **kwargs

Return type

Component

import gdsfactory as gf

c = gf.components.array_with_fanout_2d(pitch=150.0, columns=3, rows=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-7.png

array_with_via

gdsfactory.components.array_with_via(component=<function pad>, columns=3, spacing=150.0, via_spacing=10.0, straight_length=60.0, component_port_name='e4', cross_section=functools.partial(<cyfunction cross_section>, layer=(45, 0), width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')), via_stack=<function via_stack>, via_stack_dy=0, port_orientation=180, **kwargs)[source]

Returns an array of components in X axis with fanout waveguides facing west

Parameters
  • component (Union[Callable[…, Component], Component]) – to replicate

  • columns (int) – number of components

  • spacing (float) – float

  • via_spacing (float) – for fanout

  • straight_length (float) – lenght of the straight at the end

  • waveguide – waveguide definition

  • component_port_name (str) –

  • cross_section (Optional[Callable[…, CrossSection]]) –

  • via_stack (Callable[…, Component]) –

  • via_stack_ymin

  • port_orientation (int) – 180: facing west

  • **kwargs

Return type

Component

import gdsfactory as gf

c = gf.components.array_with_via(columns=3, spacing=150.0, via_spacing=10.0, straight_length=60.0, component_port_name='e4', via_stack_dy=0, port_orientation=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-8.png

array_with_via_2d

gdsfactory.components.array_with_via_2d(spacing=(150.0, 150.0), columns=3, rows=2, **kwargs)[source]

Returns 2D array with fanout waveguides facing west.

Parameters
  • spacing (Tuple[float, float]) – 2D spacing

  • columns (int) –

  • rows (int) –

  • kwargs – component: to replicate columns: number of components spacing: float via_spacing: for fanout straight_length: lenght of the straight at the end component_port_name: via_stack_port_name: **kwargs

Return type

Component

import gdsfactory as gf

c = gf.components.array_with_via_2d(spacing=(150.0, 150.0), columns=3, rows=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-9.png

awg

gdsfactory.components.awg(arms=10, outputs=3, free_propagation_region_input_function=<function free_propagation_region_input>, free_propagation_region_output_function=<function free_propagation_region_output>, fpr_spacing=50.0)[source]

Returns a basic Arrayed Waveguide grating.

Parameters
  • arms (int) – number of arms

  • outputs (int) – number of outputs

  • free_propagation_region_input_function – for input

  • free_propagation_region_output_function – for output

  • fpr_spacing (float) – x separation between input/output FPR

Return type

Component

import gdsfactory as gf

c = gf.components.awg(arms=10, outputs=3, fpr_spacing=50.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-10.png

bbox

gdsfactory.components.bbox(bbox=((- 1.0, - 1.0), (3.0, 4.0)), layer=(1, 0))[source]

Returns bounding box rectangle from coordinates, to allow creation of a rectangle bounding box directly from another shape.

Parameters
  • bbox (Tuple[Union[Tuple[float, float], array], Union[Tuple[float, float], array]]) – Coordinates of the box [(x1, y1), (x2, y2)].

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.bbox(bbox=((-1.0, -1.0), (3.0, 4.0)), layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-11.png

bend_circular

gdsfactory.components.bend_circular(angle=90, npoints=720, with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Returns a radial arc.

Parameters
  • angle (int) – angle of arc (degrees)

  • npoints (int) – number of points

  • with_cladding_box (bool) – square in layers_cladding to remove DRC

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.bend_circular(radius=10, angle=90, npoints=720)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-12.png
Return type

Component

import gdsfactory as gf

c = gf.components.bend_circular(angle=90, npoints=720, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-13.png

bend_circular180

gdsfactory.components.bend_circular180(angle=180, **kwargs)[source]

Returns a 180 degrees radial arc.

Parameters
  • angle (int) – angle of arc (degrees)

  • npoints – number of points

  • with_cladding_box – square in layers_cladding to remove DRC

  • waveguide – from tech.waveguide

  • kwargs – cross_section_factory settings

Return type

Component

import gdsfactory as gf

c = gf.components.bend_circular180(angle=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-14.png

bend_circular_heater

gdsfactory.components.bend_circular_heater(radius=10, angle=90, npoints=720, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater=(47, 0), cross_section=functools.partial(<cyfunction cross_section>))[source]

Creates an arc of arclength theta starting at angle start_angle

Parameters
  • radius (float) –

  • angle (int) – angle of arc (degrees)

  • npoints (int) – Number of points used per 360 degrees

  • heater_to_wg_distance (float) –

  • heater_width (float) –

  • layer_heater

  • cross_section (Callable[…, CrossSection]) –

Return type

Component

import gdsfactory as gf

c = gf.components.bend_circular_heater(radius=10, angle=90, npoints=720, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater=(47, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-15.png

bend_euler

gdsfactory.components.bend_euler(angle=90, p=1, with_arc_floorplan=True, npoints=720, direction='ccw', with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Returns an euler bend that adiabatically transitions from straight to curved. By default, radius corresponds to the minimum radius of curvature of the bend. However, if use_eff is set to True, radius corresponds to the effective radius of curvature (making the curve a drop-in replacement for an arc). If p < 1.0, will create a “partial euler” curve as described in Vogelbacher et. al. https://dx.doi.org/10.1364/oe.27.031394

Parameters
  • angle (int) – total angle of the curve

  • p (float) – Proportion of the curve that is an Euler curve

  • with_arc_floorplan (bool) – If False: radius is the minimum radius of curvature of the bend If True: The curve will be scaled such that the endpoints match a bend_circular with parameters radius and angle

  • npoints (int) – Number of points used per 360 degrees

  • direction (str) – cw (clock-wise) or ccw (counter clock-wise)

  • with_cladding_box (bool) – to avoid DRC acute angle errors in cladding

  • cross_section (Callable[…, CrossSection]) –

Return type

Component

import gdsfactory as gf

c = gf.components.bend_euler(angle=90, p=1, with_arc_floorplan=True, npoints=720, direction='ccw', with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-16.png

bend_euler180

gdsfactory.components.bend_euler180(*, angle: int = 180, p: float = 1, with_arc_floorplan: bool = True, npoints: int = 720, direction: str = 'ccw', with_cladding_box: bool = True, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>), **kwargs)gdsfactory.component.Component

Returns an euler bend that adiabatically transitions from straight to curved. By default, radius corresponds to the minimum radius of curvature of the bend. However, if use_eff is set to True, radius corresponds to the effective radius of curvature (making the curve a drop-in replacement for an arc). If p < 1.0, will create a “partial euler” curve as described in Vogelbacher et. al. https://dx.doi.org/10.1364/oe.27.031394

Parameters
  • angle – total angle of the curve

  • p – Proportion of the curve that is an Euler curve

  • with_arc_floorplan – If False: radius is the minimum radius of curvature of the bend If True: The curve will be scaled such that the endpoints match a bend_circular with parameters radius and angle

  • npoints – Number of points used per 360 degrees

  • direction – cw (clock-wise) or ccw (counter clock-wise)

  • with_cladding_box – to avoid DRC acute angle errors in cladding

  • cross_section

import gdsfactory as gf

c = gf.components.bend_euler180(angle=180, p=1, with_arc_floorplan=True, npoints=720, direction='ccw', with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-17.png

bend_euler_s

gdsfactory.components.bend_euler_s(**kwargs)[source]

Sbend made of euler bends.

Return type

Component

import gdsfactory as gf

c = gf.components.bend_euler_s()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-18.png

bend_port

gdsfactory.components.bend_port(component=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), port_name='e1', port_name2='e2', port_name1_bend=None, port_name2_bend=None, cross_section=functools.partial(<cyfunction cross_section>, layer=(49, 0), width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')), bend=<function bend_circular>, angle=180, extension_length=None, **kwargs)[source]

Returns a component that contains a component with a bend and a straight

Parameters
  • component (Union[Callable[…, Component], Component]) –

  • port_name (str) – of the component

  • port_name2 (str) – of the component, to extend to

  • port_name1_bend (Optional[str]) –

  • port_name2_bend (Optional[str]) –

  • cross_section (Callable[…, CrossSection]) – for the bend

  • bend (Callable[…, Component]) – factory for the bend

  • angle (int) – for the bend

  • extension_length (Optional[float]) – for the straight after the bend

  • **kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.bend_port(port_name='e1', port_name2='e2', angle=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-19.png

bend_s

gdsfactory.components.bend_s(size=(10.0, 2.0), nb_points=99, with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

S bend with bezier curve

stores min_bend_radius property in self.info[‘min_bend_radius’] min_bend_radius depends on height and length

Parameters
  • size (Tuple[float, float]) – in x and y direction

  • nb_points (int) – number of points

  • with_cladding_box (bool) – square bounding box to avoid DRC errors

  • cross_section (Callable[…, CrossSection]) – function

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.bend_s(size=(10.0, 2.0), nb_points=99, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-20.png

cavity

gdsfactory.components.cavity(component=<function dbr>, coupler=<function coupler>, length=0.1, gap=0.2, **kwargs)[source]

Returns cavity from a coupler and a mirror.

connects the W0 port of the mirror to E1 and W1 coupler ports creating a resonant cavity

Parameters
  • component (Component) – mirror

  • coupler (Callable[…, Component]) – coupler library

  • length (float) – coupler length

  • gap (float) – coupler gap

  • kwargs – coupler_settings

ml (mirror left)              mr (mirror right)
 |                               |
 |o1 - o2__             __o3 - o1|
 |         \           /         |
            \         /
          ---=========---
   o1  o1    length      o4    o2
import gdsfactory as gf

c = gf.components.cavity(component=gf.components.dbr())
c.plot()

(Source code, png, hires.png, pdf)

_images/components-21.png
Return type

Component

import gdsfactory as gf

c = gf.components.cavity(length=0.1, gap=0.2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-22.png

cdc

gdsfactory.components.cdc(length=30.0, gap=0.5, period=0.22, dc=0.5, angle=0.5235987755982988, width_top=2.0, width_bot=0.75, input_bot=False, dw_top=None, dw_bot=None, fins=False, fin_size=(0.2, 0.05), contradc_wgt=None, port_midpoint=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]

Grating-Assisted Contra-Directional Coupler

Parameters
  • length (float) – Length of the coupling region.

  • gap (float) – Distance between the two straights.

  • period (float) – Period of the grating.

  • dc (float) – Duty cycle of the grating. Must be between 0 and 1.

  • angle (float) – in radians at which the straight bends towards the coupling region.

  • width_top (float) – Width of the top straight in the coupling region.

  • width_bot (float) – Width of the bottom straight in the coupling region.

  • dw_top (Optional[float]) – Amplitude of the width variation on the top. Default=gap/2.0.

  • dw_bot (Optional[float]) – Amplitude of the width variation on the bottom. Default=gap/2.0.

  • input_bot (bool) – True makes the default input the bottom straight (rather than top)

  • fins (bool) – If True, adds fins to the input/output straights. In this case a different template for the component must be specified. This feature is useful when performing electron-beam lithography and using different beam currents for fine features (helps to reduce stitching errors).

  • fin_size (Tuple[float, float]) – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm

  • contradc_wgt (None) –

  • port_midpoint (Tuple[int, int]) – Cartesian coordinate of the input port (AT TOP if input_bot=False, AT BOTTOM if input_bot=True).

  • direction (str) – Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians).

  • waveguide_template (Callable[…, Component]) – Picwriter WaveguideTemplate function

Return type

Component

import gdsfactory as gf

c = gf.components.cdc(length=30.0, gap=0.5, period=0.22, dc=0.5, angle=0.5235987755982988, width_top=2.0, width_bot=0.75, input_bot=False, fins=False, fin_size=(0.2, 0.05), port_midpoint=(0, 0), direction='EAST')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-23.png

circle

gdsfactory.components.circle(radius=10.0, angle_resolution=2.5, layer=(1, 0))[source]

Generate a circle geometry.

Parameters
  • radius (float) – of the circle.

  • angle_resolution (float) – number of degrees per point.

  • layer (Tuple[int, int]) – layer.

Return type

Component

import gdsfactory as gf

c = gf.components.circle(radius=10.0, angle_resolution=2.5, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-24.png

compass

gdsfactory.components.compass(size=(4.0, 2.0), layer=(1, 0), port_type='electrical')[source]

Rectangular contact pad with centered ports on rectangle edges (north, south, east, and west)

Parameters
  • size (Tuple[float, float]) – rectangle size

  • layer (Tuple[int, int]) – tuple (int, int)

  • port_type (str) –

Return type

Component

import gdsfactory as gf

c = gf.components.compass(size=(4.0, 2.0), layer=(1, 0), port_type='electrical')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-25.png

compensation_path

gdsfactory.components.compensation_path(crossing45=<function crossing45>, direction='top')[source]

Returns Component Path with same path length as the crossing

with input and output ports having same y coordinates

Parameters
  • crossing45 (Union[Callable[…, Component], Component]) – the crossing45 component that we want to match in path length This component needs to have .info[“components”] with bends and crossing

  • direction (str) – the direction in which the bend should go “top” / “bottom”

----       ----
    \     /
     \   /
      \ /
       X
      / \
     /   \
    /     \
----       ----

Compensation path:

     --+--
   _/     \_
--/         \--
Return type

Component

import gdsfactory as gf

c = gf.components.compensation_path(direction='top')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-26.png

component_lattice

gdsfactory.components.component_lattice(lattice='\\n        C-X\\n        CXX\\n        CXX\\n        C-X\\n        ', components=None, grid_per_unit=1000, name='lattice')[source]

Returns a lattice Component of N inputs and outputs with components at given locations Columns must have components with the same x spacing between ports input/output ports Lines must have components with the same y spacing between input and output ports

Lattice example:

X-X
XCX
XCX
X-X
import gdsfactory as gf
from gdsfactory.components.crossing_waveguide import crossing45
from gdsfactory.components.crossing_waveguide import compensation_path

components =  {
      "C": gf.routing.fanout2x2(component=gf.components.coupler(), port_spacing=40.0),
      "X": crossing45(port_spacing=40.0),
      "-": compensation_path(crossing45=crossing45(port_spacing=40.0)),
}
c = gf.components.component_lattice(components=components)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-27.png
Return type

Component

component_sequence

gdsfactory.components.component_sequence(sequence, symbol_to_component, ports_map=None, port_name1='o1', port_name2='o2', start_orientation=0.0)[source]

Returns component from a ASCII sequence and a dictionary to interpret each symbol

Parameters
  • sequence (str) – a string or a list of symbols

  • symbol_to_component (Dict[str, Tuple[Component, str, str]]) – maps symbols to (component, input, output)

  • ports_map (Optional[Dict[str, Tuple[str, str]]]) – (optional) extra port mapping using the convention {port_name: (alias_name, port_name)}

  • port_name1 (str) – input port_name

  • port_name2 (str) – output port_name

  • start_orientation (float) –

Return type

Component

Returns

component containing the sequence of sub-components instantiated and connected together in the sequence order

import gdsfactory as gf

bend180 = gf.components.bend_circular180()
wg_pin = gf.components.straight_pin(length=40)
wg = gf.components.straight()

# Define a map between symbols and (component, input port, output port)
symbol_to_component = {
    "A": (bend180, 'o1', 'o2'),
    "B": (bend180, 'o2', 'o1'),
    "H": (wg_pin, 'o1', 'o2'),
    "-": (wg, 'o1', 'o2'),
}

# Each character in the sequence represents a component
sequence = "AB-H-H-H-H-BA"
c = gf.components.component_sequence(sequence=sequence, symbol_to_component=symbol_to_component)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-28.png

coupler

gdsfactory.components.coupler(gap=0.236, length=20.0, coupler_symmetric_factory=<function coupler_symmetric>, coupler_straight_factory=<function coupler_straight>, dy=5.0, dx=10.0, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Symmetric coupler.

Parameters
  • gap (float) – between straights

  • length (float) – of coupling region

  • coupler_symmetric_factory (Callable[…, Component]) –

  • coupler_straight_factory (Callable[…, Component]) –

  • dy (float) – port to port vertical spacing

  • dx (float) – length of bend in x direction

  • cross_section (Callable[…, CrossSection]) – factory

  • kwargs – cross_section settings

      dx                                 dx
   |------|                           |------|
o2 ________                           ______o3
           \                         /           |
            \        length         /            |
             ======================= gap         | dy
            /                       \            |
   ________/                         \_______    |
o1                                          o4

     coupler_straight_factory  coupler_symmetric_factory
Return type

Component

import gdsfactory as gf

c = gf.components.coupler(gap=0.236, length=20.0, dy=5.0, dx=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-29.png

coupler90

gdsfactory.components.coupler90(gap=0.2, radius=10.0, bend=<function bend_euler>, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

straight coupled to a bend.

Parameters
  • gap (float) – um

  • radius (float) – um

  • straight – for straight

  • bend (Callable[…, Component]) – for bend

  • cross_section (Callable[…, CrossSection]) –

  • kwargs – cross_section settings

     3
     |
    /
   /
2_/
1____4
Return type

Component

import gdsfactory as gf

c = gf.components.coupler90(gap=0.2, radius=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-30.png

coupler90bend

gdsfactory.components.coupler90bend(radius=10.0, gap=0.2, bend=<function bend_euler>, cross_section_inner=functools.partial(<cyfunction cross_section>), cross_section_outer=functools.partial(<cyfunction cross_section>))[source]

Returns 2 coupled bends.

Parameters
  • radius (float) – um

  • gap (float) – um

  • bend (Callable[…, Component]) – for bend

  • cross_section_inner (Callable[…, CrossSection]) –

  • cross_section_outer (Callable[…, CrossSection]) –

    r   3 4
    |   | |
    |  / /
    | / /
2____/ /
1_____/
Return type

Component

import gdsfactory as gf

c = gf.components.coupler90bend(radius=10.0, gap=0.2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-31.png

coupler90circular

gdsfactory.components.coupler90circular(bend=<function bend_circular>, **kwargs)[source]
import gdsfactory as gf

c = gf.components.coupler90circular()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-32.png

coupler_adiabatic

gdsfactory.components.coupler_adiabatic(length1=20.0, length2=50.0, length3=30.0, wg_sep=1.0, input_wg_sep=3.0, output_wg_sep=3.0, dw=0.1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]

Returns 50/50 adiabatic coupler. Design based on asymmetric adiabatic 3dB coupler designs, such as those

Has input Bezier curves, with poles set to half of the x-length of the S-bend.

I is the first half of input S-bend where input widths taper by +dw and -dw II is the second half of the S-bend straight with constant, unbalanced widths III is the region where the two asymmetric straights gradually come together IV straights taper back to the original width at a fixed distance from one another IV is the output S-bend straight.

Parameters
  • length1 (float) – region that gradually brings the two assymetric straights together. In this region the straight widths gradually change to be different by dw.

  • length2 (float) – coupling region, where asymmetric straights gradually become the same width.

  • length3 (float) – output region where the two straights separate.

  • wg_sep (float) – Distance between center-to-center in the coupling region (Region 2).

  • input_wg_sep (float) – Separation of the two straights at the input, center-to-center.

  • output_wg_sep (float) – Separation of the two straights at the output, center-to-center.

  • dw (float) – Change in straight width. In Region 1, top arm tapers to width+dw/2.0, bottom taper to width-dw/2.0.

  • port (Tuple[int, int]) – coordinate of the input port (top left).

  • direction (str) – for component NORTH, WEST, SOUTH, EAST,or angle in radians

  • waveguide_template (Callable[…, Component]) – object or function

  • wg_width – 0.5

  • wg_layer – gf.LAYER.WG[0]

  • wg_datatype – gf.LAYER.WG[1]

  • clad_layer – gf.LAYER.WGCLAD[0]

  • clad_datatype – gf.LAYER.WGCLAD[1]

  • bend_radius – 10

  • cladding_offset – 3

Return type

Component

import gdsfactory as gf

c = gf.components.coupler_adiabatic(length1=20.0, length2=50.0, length3=30.0, wg_sep=1.0, input_wg_sep=3.0, output_wg_sep=3.0, dw=0.1, port=(0, 0), direction='EAST')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-33.png

coupler_asymmetric

gdsfactory.components.coupler_asymmetric(bend=<function bend_s>, straight=<function straight>, gap=0.234, dy=5.0, dx=10.0, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

bend coupled to straight waveguide

Parameters
  • bend (Callable[…, Component]) –

  • straight (Callable[…, Component]) – straight library

  • gap (float) – um

  • dy (float) – port to port vertical spacing

  • dx (float) – bend length in x direction

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

               dx
            |-----|
             _____ o2
            /         |
      _____/          |
gap o1____________    |  dy
                   o3
Return type

Component

import gdsfactory as gf

c = gf.components.coupler_asymmetric(gap=0.234, dy=5.0, dx=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-34.png

coupler_full

gdsfactory.components.coupler_full(length=40.0, gap=0.5, dw=0.1, angle=0.5235987755982988, parity=1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]

Adiabatic Full Coupler. Design based on asymmetric adiabatic full coupler designs, such as the one reported in ‘Integrated Optic Adiabatic Devices on Silicon’ by Y. Shani, et al (IEEE Journal of Quantum Electronics, Vol. 27, No. 3 March 1991).

Region I is the first half of the input S-bend straight where the input straights widths taper by +dw and -dw, Region II is the second half of the S-bend straight with constant, unbalanced widths, Region III is the coupling region where the straights from unbalanced widths to balanced widths to reverse polarity unbalanced widths, Region IV is the fixed width straight that curves away from the coupling region, Region V is the final curve where the straights taper back to the regular width specified in the straight template.

Parameters
  • length (float) – Length of the coupling region.

  • gap (float) – Distance between the two straights.

  • dw (float) – Change in straight width. Top arm tapers to width - dw, bottom to width - dw.

  • angle (float) – Angle in radians at which the straight bends towards the coupling region.

  • parity (integer -1 or 1) – If -1, mirror-flips the structure so that the input port is actually the bottom port.

  • port (Tuple[int, int]) – Cartesian coordinate of the input port (AT TOP if parity=1, AT BOTTOM if parity=-1).

  • direction (str) – Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians).

  • waveguide_template (Callable[…, Component]) – function that returns Picwriter WaveguideTemplate object

  • wg_width – 0.5

  • wg_layer – gf.LAYER.WG[0]

  • wg_datatype – gf.LAYER.WG[1]

  • clad_layer – gf.LAYER.WGCLAD[0]

  • clad_datatype – gf.LAYER.WGCLAD[1]

  • bend_radius – 10

  • cladding_offset – 3

import gdsfactory as gf

c = gf.components.coupler_full(length=40, gap=0.2, dw=0.1)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-35.png
Return type

Component

import gdsfactory as gf

c = gf.components.coupler_full(length=40.0, gap=0.5, dw=0.1, angle=0.5235987755982988, parity=1, port=(0, 0), direction='EAST')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-36.png

coupler_ring

gdsfactory.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0, coupler90=<function coupler90>, bend=None, coupler_straight=<function coupler_straight>, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Coupler for ring.

Parameters
  • gap (float) – spacing between parallel coupled straight waveguides.

  • radius (float) – of the bends.

  • length_x (float) – length of the parallel coupled straight waveguides.

  • coupler90 (Callable[…, Component]) – straight coupled to a 90deg bend.

  • straight – library for straight waveguides.

  • bend (Optional[Callable[…, Component]]) – library for bend

  • coupler_straight (Callable[…, Component]) – two parallel coupled straight waveguides.

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

  2             3
  |             |
   \           /
    \         /
  ---=========---
1    length_x    4
Return type

Component

import gdsfactory as gf

c = gf.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-37.png

coupler_straight

gdsfactory.components.coupler_straight(length=10.0, gap=0.27, straight=<function straight>, **kwargs)[source]

Coupler_straight with two parallel straights.

Parameters
  • length (float) – of straight

  • gap (float) – between straights

  • straight (Callable[…, Component]) – straight waveguide function

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.coupler_straight(length=10.0, gap=0.27)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-38.png

coupler_symmetric

gdsfactory.components.coupler_symmetric(bend=<function bend_s>, gap=0.234, dy=5.0, dx=10.0, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Two coupled straights with bends.

Parameters
  • bend (Callable[…, Component]) – bend or library

  • gap (float) –

  • dy (float) – port to port vertical spacing

  • dx (float) – bend length in x direction

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

            dx
         |-----|
            ___ E1
           /       |
     _____/        |
gap  _____         |  dy
          \        |
           \___    |
                E0
Return type

Component

import gdsfactory as gf

c = gf.components.coupler_symmetric(gap=0.234, dy=5.0, dx=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-39.png

cross

gdsfactory.components.cross(length=10.0, width=3.0, layer=(1, 0))[source]

Generates a right-angle cross from two rectangles of specified length and width.

Parameters
  • length (float) – float Length of the cross from one end to the other

  • width (float) – float Width of the arms of the cross

  • layer (Tuple[int, int]) – int, array-like[2], or set Specific layer(s) to put polygon geometry on

Return type

Component

import gdsfactory as gf

c = gf.components.cross(length=10.0, width=3.0, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-40.png

crossing

gdsfactory.components.crossing(arm=<function crossing_arm>)[source]

Waveguide crossing

Return type

Component

import gdsfactory as gf

c = gf.components.crossing()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-41.png

crossing45

gdsfactory.components.crossing45(crossing=<function crossing>, port_spacing=40.0, dx=None, alpha=0.08, npoints=101)[source]

Returns 45deg crossing with bends.

Parameters
  • crossing (Callable[…, Component]) – 90D crossing

  • port_spacing (float) – target I/O port spacing

  • dx (Optional[float]) – target length

  • alpha (float) – optimization parameter. Try with 0.1 to start with. - If the structure has too tight bends, diminish it. - If raise assertion angle errors, increase it

  • npoints (int) – number of points.

Implementation note: The 45 Degree crossing CANNOT be kept as an SRef since we only allow for multiples of 90Deg rotations in SRef

----   ----
    \ /
     X
    / \
---    ----
Return type

Component

import gdsfactory as gf

c = gf.components.crossing45(port_spacing=40.0, alpha=0.08, npoints=101)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-42.png

crossing_arm

gdsfactory.components.crossing_arm(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4)[source]

arm of a crossing

Return type

Component

import gdsfactory as gf

c = gf.components.crossing_arm(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-43.png

crossing_etched

gdsfactory.components.crossing_etched(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4, layer_wg=(1, 0), layer_slab=(2, 0))[source]

Waveguide crossing: - The full crossing has to be on WG layer (to start with a 220nm slab) - Then we etch the ellipses down to 150nm slabs and we keep linear taper at 220nm. What we write is what we etch on this step

import gdsfactory as gf

c = gf.components.crossing_etched(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4, layer_wg=(1, 0), layer_slab=(2, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-44.png

crossing_from_taper

gdsfactory.components.crossing_from_taper(taper=<function <lambda>>)[source]

Crossing based on a taper. The default is a dummy taper

import gdsfactory as gf

c = gf.components.crossing_from_taper()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-45.png

cutback_bend

gdsfactory.components.cutback_bend(bend90=<function bend_euler>, straight_length=5.0, n_steps=6, n_stairs=5)[source]

Deprecated! use cutback_bend90 instead! this is a stair

import gdsfactory as gf

c = gf.components.cutback_bend(straight_length=5.0, n_steps=6, n_stairs=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-46.png

cutback_bend180

gdsfactory.components.cutback_bend180(bend180=functools.partial(<function bend_euler>, angle=180), straight_length=5.0, n_steps=6, cols=6, spacing=3, straight_factory=<function straight>)[source]
  _
_| |_| this is a stair

_ this is a step
Return type

Component

import gdsfactory as gf

c = gf.components.cutback_bend180(straight_length=5.0, n_steps=6, cols=6, spacing=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-47.png

cutback_bend180circular

gdsfactory.components.cutback_bend180circular(*, bend180: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function bend_circular180>, straight_length: float = 5.0, n_steps: int = 6, cols: int = 6, spacing: int = 3, straight_factory: Callable[[...], gdsfactory.component.Component] = <function straight>)gdsfactory.component.Component
  _
_| |_| this is a stair

_ this is a step
import gdsfactory as gf

c = gf.components.cutback_bend180circular(straight_length=5.0, n_steps=6, cols=6, spacing=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-48.png

cutback_bend90

gdsfactory.components.cutback_bend90(bend90=<function bend_euler>, straight_length=5.0, n_steps=6, cols=6, spacing=5, wg_loop_length=None, straight_factory=<function straight>)[source]
   _
|_| |
Return type

Component

import gdsfactory as gf

c = gf.components.cutback_bend90(straight_length=5.0, n_steps=6, cols=6, spacing=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-49.png

cutback_bend90circular

gdsfactory.components.cutback_bend90circular(*, bend90: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function bend_circular>, straight_length: float = 5.0, n_steps: int = 6, cols: int = 6, spacing: int = 5, wg_loop_length: None = None, straight_factory: Callable[[...], gdsfactory.component.Component] = <function straight>)gdsfactory.component.Component
   _
|_| |
import gdsfactory as gf

c = gf.components.cutback_bend90circular(straight_length=5.0, n_steps=6, cols=6, spacing=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-50.png

cutback_component

gdsfactory.components.cutback_component(component=<function taper_0p5_to_3_l36>, cols=4, rows=5, bend_radius=10, port1='o1', port2='o2', middle_couples=2)[source]

Flips the component, good for tapers that end in wide straights

Parameters
  • component (Callable[…, Component]) –

  • cols (int) –

  • rows (int) –

  • bend_radius (int) – for bend

Return type

Component

import gdsfactory as gf

c = gf.components.cutback_component(cols=4, rows=5, bend_radius=10, port1='o1', port2='o2', middle_couples=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-51.png

cutback_component_flipped

gdsfactory.components.cutback_component_flipped(component=<function taper_0p5_to_3_l36>, cols=4, rows=5, bend_radius=10, port1='o2', port2='o1', middle_couples=2)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.cutback_component_flipped(cols=4, rows=5, bend_radius=10, port1='o2', port2='o1', middle_couples=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-52.png

dbr

gdsfactory.components.dbr(w1=0.475, w2=0.525, l1=0.159, l2=0.159, n=10, straight=<function straight>)[source]

Distributed Bragg Reflector

Parameters
  • w1 (float) – thin width

  • l1 (float) – thin length

  • w2 (float) – thick width

  • l2 (float) – thick length

  • n (int) – number of periods

   l1      l2
<-----><-------->
        _________
_______|

  w1       w2       ...  n times
_______
       |_________
Return type

Component

import gdsfactory as gf

c = gf.components.dbr(w1=0.475, w2=0.525, l1=0.159, l2=0.159, n=10)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-53.png

dbr2

gdsfactory.components.dbr2(length=10.0, period=0.85, dc=0.5, w1=0.4, w2=1.0, taper_length=20.0, fins=False, fin_size=(0.2, 0.05), port=(0, 0), direction='EAST', waveguide_template=<function strip>, waveguide_template_dbr=None, **kwargs)[source]

Distributed Bragg Reflector Cell class. Tapers the input straight to a periodic straight structure with varying width (1-D photonic crystal).

Parameters
  • length (float) – Length of the DBR region.

  • period (float) – Period of the repeated unit.

  • dc (float) – Duty cycle of the repeated unit (must be a float between 0 and 1.0).

  • w1 (float) – Width of the thin section of the straight. w1 = 0 corresponds to disconnected periodic blocks.

  • w2 (float) – Width of the wide section of the straight

  • taper_length (float) – Length of the taper between the input/output straight and the DBR region.

  • fins (boolean) – If True, adds fins to the input/output straights. In this case a different template for the component must be specified.

  • fin_size ((x,y) Tuple) – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm

  • waveguide_template_dbr (Optional[Callable[…, Component]]) – If fins above is True, a WaveguideTemplate (dbr_wgt) must be specified. This defines the layertype / datatype of the DBR (which will be separate from the input/output straights)

  • port (tuple) – Cartesian coordinate of the input port. Defaults to (0,0).

  • direction (string) – Direction that the component will point towards,

  • be of type 'NORTH' (can) –

  • 'WEST' (float, in radians) –

  • 'SOUTH' (float, in radians) –

  • 'EAST' (float, in radians) –

  • an angle (OR) –

  • waveguide_template (Callable[…, Component]) – WaveguideTemplate object

  • waveguide_template_dbr – Picwriter WaveguideTemplate object

  • wg_width – 0.5

  • wg_layer – gf.LAYER.WG[0]

  • wg_datatype – gf.LAYER.WG[1]

  • clad_layer – gf.LAYER.WGCLAD[0]

  • clad_datatype – gf.LAYER.WGCLAD[1]

  • bend_radius – 10

  • cladding_offset – 3

         period
<-----><-------->
        _________
_______|

  w1       w2       ...  n times
_______
       |_________
import gdsfactory as gf

c = gf.components.dbr2(length=10, period=0.85, dc=0.5, w2=1, w1=0.4)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-54.png
Return type

Component

import gdsfactory as gf

c = gf.components.dbr2(length=10.0, period=0.85, dc=0.5, w1=0.4, w2=1.0, taper_length=20.0, fins=False, fin_size=(0.2, 0.05), port=(0, 0), direction='EAST')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-55.png

delay_snake

gdsfactory.components.delay_snake(wg_width=0.5, wg_width_wide=2.0, total_length=1600.0, L0=5.0, taper_length=10.0, n=2, taper=<function taper>, bend_factory=<function bend_euler>, straight_factory=<function straight>, **kwargs)[source]

Snake input facing west Snake output facing east

Parameters
  • wg_width (float) –

  • total_length (float) –

  • L0 (float) – initial offset

  • n (int) – number of loops

  • taper (Callable[…, Component]) – taper library

  • bend_factory (Callable[…, Component]) –

  • straight_factory (Callable[…, Component]) –

| L0 |    L2        |

     ->-------------|
                    | pi * radius
|-------------------|
|
|------------------->

|        DL         |
Return type

Component

import gdsfactory as gf

c = gf.components.delay_snake(wg_width=0.5, wg_width_wide=2.0, total_length=1600.0, L0=5.0, taper_length=10.0, n=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-56.png

delay_snake2

gdsfactory.components.delay_snake2(length=1600.0, length0=0.0, n=2, bend180=functools.partial(<function bend_euler>, angle=180), cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Snake input facing west Snake output facing east

Parameters
  • length (float) – total length

  • length0 (float) – initial offset

  • n (int) – number of loops

  • bend180 (Callable[…, Component]) –

  • cross_section (Callable[…, CrossSection]) – factory

  • **kwargs – cross_section settings

| length0 | length1 |

          >---------|
                    |  bend180.length
|-------------------|
|
|------------------->

|   delta_length    |
Return type

Component

import gdsfactory as gf

c = gf.components.delay_snake2(length=1600.0, length0=0.0, n=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-57.png

delay_snake3

gdsfactory.components.delay_snake3(length=1600.0, length0=0.0, n=2, bend180=functools.partial(<function bend_euler>, angle=180), cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Snake input facing west Snake output facing east

Parameters
  • length (float) –

  • length0 (float) – initial offset

  • n (int) – number of loops

  • bend180 (Callable[…, Component]) –

  • cross_section (Callable[…, CrossSection]) – factory

  • **kwargs – cross_section settings

          | length0   |

          >---------\
                     \bend180.length
                     /
|-------------------/
|
|------------------->

|   delta_length    |
Return type

Component

import gdsfactory as gf

c = gf.components.delay_snake3(length=1600.0, length0=0.0, n=2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-58.png

die

gdsfactory.components.die(size=(10000.0, 10000.0), street_width=100.0, street_length=1000.0, die_name='chip99', text_size=100.0, text_location='SW', layer=(99, 0), bbox_layer=(99, 0), draw_corners=False, draw_dicing_lane=False)[source]

Creates a basic chip/die template, with 4 right angle corners marking the boundary of the chip/die and a label with the name of the die.

adapted from phidl.geometry

Parameters
  • size (Tuple[float, float]) – x, y dimensions of the die.

  • street_width (float) – Width of the corner marks for die-sawing.

  • street_length (float) – Length of the corner marks for die-sawing.

  • die_name (Optional[str]) – Label text.

  • text_size (float) – Label text size.

  • text_location (str) – {‘NW’, ‘N’, ‘NE’, ‘SW’, ‘S’, ‘SE’} Label text compass location.

  • layer (Tuple[int, int]) – Specific layer to put polygon geometry on.

  • bbox_layer (Optional[Tuple[int, int]]) – optional bbox layer

  • draw_corners (bool) –

  • draw_dicing_lane (bool) –

Return type

Component

import gdsfactory as gf

c = gf.components.die(size=(10000.0, 10000.0), street_width=100.0, street_length=1000.0, die_name='chip99', text_size=100.0, text_location='SW', layer=(99, 0), bbox_layer=(99, 0), draw_corners=False, draw_dicing_lane=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-59.png

die_bbox

gdsfactory.components.die_bbox(component=functools.partial(<function rectangle>, size=(1300, 2600)), street_width=100.0, street_length=1000.0, die_name=None, text_size=100.0, text_location='SW', layer=(99, 0), padding=10.0)[source]

Creates a basic boundary box. Perfect for defining dicing lanes. the boundary of the chip/die it can also add a label with the name of the die. similar to die and bbox

adapted from phidl.geometry

Parameters
  • component (Union[Callable[…, Component], Component]) – to frame

  • street_width (float) – Width of the boundary box

  • die_name (Optional[str]) – Label text.

  • text_size (float) – Label text size.

  • text_location (str) – {‘NW’, ‘N’, ‘NE’, ‘SW’, ‘S’, ‘SE’} Label text compass location.

  • layer (Tuple[int, int]) – Specific layer(s) to put polygon geometry on.

  • padding (float) – adds padding

Return type

Component

import gdsfactory as gf

c = gf.components.die_bbox(street_width=100.0, street_length=1000.0, text_size=100.0, text_location='SW', layer=(99, 0), padding=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-60.png

disk

gdsfactory.components.disk(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]

Disk Resonator

Parameters
  • radius (float) – disk resonator radius

  • gap (float) – Distance between the bus straight and resonator

  • wrap_angle – Angle in degrees between 0 and 180 determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight, 180 corresponds to a bus straight wrapped around half of the resonator.

  • parity (1 or -1) – 1, resonator left from bus straight, -1 resonator to the right

  • port (tuple) – Cartesian coordinate of the input port (x1, y1)

  • direction (str) – Direction that the component will point towards, can be of type ‘NORTH’, `’WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)

  • waveguide_template (WaveguideTemplate) – Picwriter WaveguideTemplate object

  • wg_width – 0.5

  • wg_layer – gf.LAYER.WG[0]

  • wg_datatype – gf.LAYER.WG[1]

  • clad_layer – gf.LAYER.WGCLAD[0]

  • clad_datatype – gf.LAYER.WGCLAD[1]

  • bend_radius – 10

  • cladding_offset – 3

Return type

Component

import gdsfactory as gf

c = gf.components.disk(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, port=(0, 0), direction='EAST')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-61.png

ellipse

gdsfactory.components.ellipse(radii=(10.0, 5.0), angle_resolution=2.5, layer=(1, 0))[source]

Generate an ellipse geometry.

Parameters
  • radii (Tuple[float, float]) – Semimajor and semiminor axis lengths of the ellipse.

  • angle_resolution (float) – Resolution of the curve of the ring (# of degrees per point).

  • layer (Tuple[int, int]) – Specific layer(s) to put polygon geometry on.

The orientation of the ellipse is determined by the order of the radii variables; if the first element is larger, the ellipse will be horizontal and if the second element is larger, the ellipse will be vertical.

Return type

Component

import gdsfactory as gf

c = gf.components.ellipse(radii=(10.0, 5.0), angle_resolution=2.5, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-62.png

extend_port

gdsfactory.components.extend_port(port, length, layer=None)[source]

Returns a straight extension component out of a port.

Parameters
  • port (Port) – port to extend

  • length (float) – extension length

  • layer (Optional[Tuple[int, int]]) – for the straight section

Return type

Component

import gdsfactory as gf

c = gf.components.extend_port()
c.plot()

(Source code)

extend_ports

gdsfactory.components.extend_ports(component=<function mmi1x2>, port_names=None, length=5.0, extension_factory=None, port1=None, port2=None, port_type='optical', centered=False, **kwargs)[source]

Returns a new component with some ports extended it can accept an extension_factory or it defaults to the port width and layer of each extended port

Parameters
  • component (Union[Callable[…, Component], Component]) – component to extend ports

  • port_names (Optional[Tuple[str, …]]) – specify an list of ports names, if None it extends all ports

  • length (float) – extension length

  • extension_factory (Union[Callable[…, Component], Component, None]) – function to extend ports (defaults to a straight)

  • port1 (Optional[str]) – input port name

  • port2 (Optional[str]) – output port name

  • port_type (str) – type of the ports to extend

  • **kwargs

Return type

Component

import gdsfactory as gf

c = gf.components.extend_ports(length=5.0, port_type='optical', centered=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-64.png

extend_ports_list

gdsfactory.components.extend_ports_list(ports, extension_factory, extension_port_name=None)[source]

Returns a component with the extensions for a list of ports.

Parameters
  • ports (List[Port]) – list of ports

  • extension_factory (Union[Callable[…, Component], Component]) – function for extension

  • extension_port_name (Optional[str]) – to connect extension

Return type

Component

import gdsfactory as gf

c = gf.components.extend_ports_list()
c.plot()

(Source code)

fiber

gdsfactory.components.fiber(core_diameter=10, cladding_diameter=125, layer_core=(1, 0), layer_cladding=(111, 0))[source]

Returns a fiber.

Return type

Component

import gdsfactory as gf

c = gf.components.fiber(core_diameter=10, cladding_diameter=125, layer_core=(1, 0), layer_cladding=(111, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-66.png

fiber_array

gdsfactory.components.fiber_array(n=8, pitch=127.0, core_diameter=10, cladding_diameter=125, layer_core=(1, 0), layer_cladding=(111, 0))[source]

Returns a fiber array

 pitch
  <->
 _________
|         | lid
| o o o o |
|         | base
|_________|
   length
Return type

Component

import gdsfactory as gf

c = gf.components.fiber_array(n=8, pitch=127.0, core_diameter=10, cladding_diameter=125, layer_core=(1, 0), layer_cladding=(111, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-67.png

grating_coupler_array

gdsfactory.components.grating_coupler_array(grating_coupler=<function grating_coupler_elliptical2>, pitch=127.0, n=6, port_name='o1')[source]

Array of rectangular pads.

Parameters
  • grating_coupler (Union[Callable[…, Component], Component]) – ComponentOrFactory

  • spacing – x spacing

  • n (int) – number of pads

  • port_list – list of port orientations (N, S, W, E) per pad

Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_array(pitch=127.0, n=6, port_name='o1')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-68.png

grating_coupler_elliptical

gdsfactory.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=30.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), p_start=26, n_periods=30, big_last_tooth=False, layer_slab=(2, 0), fiber_marker_width=11.0, fiber_marker_layer=(203, 0), cladding_index=1.443)[source]

Grating coupler with parametrization based on Lumerical FDTD simulation.

Parameters
  • polarization (str) – te or tm

  • taper_length (float) – taper length from input

  • taper_angle (float) – grating flare angle

  • wavelength (float) – grating transmission central wavelength (um)

  • fiber_angle (float) – fibre polish angle in degrees

  • grating_line_width (float) –

  • wg_width (float) – waveguide width

  • neff (float) – tooth effective index

  • layer (Tuple[int, int]) – LAYER.WG

  • p_start (int) – period start first tooth

  • n_periods (int) – number of periods

  • big_last_tooth (bool) – adds a big_last_tooth

  • layer_slab (Tuple[int, int]) –

  • fiber_marker_width (float) –

  • fiber_marker_layer (Tuple[int, int]) –

  • cladding_index (float) –

  \  \  \  \
   \  \  \  \
 _|-|_|-|_|-|___
|_______________  W0
Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=30.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), p_start=26, n_periods=30, big_last_tooth=False, layer_slab=(2, 0), fiber_marker_width=11.0, fiber_marker_layer=(203, 0), cladding_index=1.443)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-69.png

grating_coupler_elliptical2

gdsfactory.components.grating_coupler_elliptical2(wgt=<function strip>, wg_width=0.5, cladding_offset=2.0, theta=0.7853981633974483, length=30.0, taper_length=10.0, period=1.0, dutycycle=0.7, port=(0.0, 0.0), layer_ridge=None, layer_core=(1, 0), layer_cladding=(111, 0), teeth_list=None, direction='EAST', polarization='te', wavelength=1.55, fiber_marker_width=11.0, fiber_marker_layer=(203, 0), **kwargs)[source]

Returns Grating coupler from Picwriter

Parameters
  • wgt (Callable[…, Component]) – waveguide_template object or function

  • theta (float) – Angle of the straight in rad.

  • length (float) – total grating coupler region.

  • taper_length (float) – Length of the taper before the grating coupler.

  • period (float) – Grating period.

  • dutycycle (float) – (period-gap)/period.

  • port (Tuple[float, float]) – Cartesian coordinate of the input port

  • layer_ridge (Optional[Tuple[int, int]]) – for partial etched gratings

  • layer_core (Tuple[int, int]) – Tuple specifying the layer/datatype of the ridge region.

  • layer_cladding (Tuple[int, int]) – for the straight.

  • teeth_list (Optional[Tuple[Tuple[float, float], …]]) – (gap, width) tuples to be used as the gap and teeth widths for irregularly spaced gratings. For example, [(0.6, 0.2), (0.7, 0.3), …] would be a gap of 0.6, then a tooth of width 0.2, then gap of 0.7 and tooth of 0.3, and so on. Overrides period, dutycycle, and length. Defaults to None.

  • direction (str) – Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)

  • polarization (str) – te or tm

  • wavelength (float) – wavelength um

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical2()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-70.png
              fiber

           /  /  /  /
          /  /  /  /
        _|-|_|-|_|-|___
WG->W0  ______________|
Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical2(wg_width=0.5, cladding_offset=2.0, theta=0.7853981633974483, length=30.0, taper_length=10.0, period=1.0, dutycycle=0.7, port=(0.0, 0.0), layer_core=(1, 0), layer_cladding=(111, 0), direction='EAST', polarization='te', wavelength=1.55, fiber_marker_width=11.0, fiber_marker_layer=(203, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-71.png

grating_coupler_elliptical_te

gdsfactory.components.grating_coupler_elliptical_te(taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), p_start=26, n_periods=24, fiber_marker_layer=(203, 0), **kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical_te(taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), p_start=26, n_periods=24, fiber_marker_layer=(203, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-72.png

grating_coupler_elliptical_tm

gdsfactory.components.grating_coupler_elliptical_tm(taper_length=16.6, taper_angle=30.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.707, wg_width=0.5, neff=1.8, layer=(1, 0), n_periods=16, fiber_marker_layer=(204, 0), **kwargs)[source]

Return elliptical grating_coupupler

Parameters
  • taper_length (float) – taper length from input

  • taper_angle (float) – grating flare angle

  • wavelength (float) – grating transmission central wavelength (um)

  • fiber_angle (float) – fibre polish angle in degrees

  • grating_line_width (float) –

  • wg_width (float) – waveguide width

  • neff (float) – tooth effective index

  • layer (Tuple[int, int]) – LAYER.WG

  • p_start – period start first tooth

  • n_periods (int) – number of periods

  • big_last_tooth – adds a big_last_tooth

  • layer_slab

  • fiber_marker_width

  • fiber_marker_layer (Tuple[int, int]) –

  • cladding_index

Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical_tm(taper_length=16.6, taper_angle=30.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.707, wg_width=0.5, neff=1.8, layer=(1, 0), n_periods=16, fiber_marker_layer=(204, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-73.png

grating_coupler_elliptical_trenches

gdsfactory.components.grating_coupler_elliptical_trenches(polarization='te', fiber_marker_width=11.0, fiber_marker_layer=(203, 0), taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), layer_trench=(2, 0), p_start=26, n_periods=30, straight=0.2)[source]

Returns Grating coupler with defined trenches

Parameters
  • polarization (str) – ‘te’ or ‘tm’

  • taper_length (float) – taper length from straight I/O

  • taper_angle (float) – grating flare angle

  • wavelength (float) – grating transmission central wavelength

  • fiber_angle (float) – fibre polish angle in degrees

  • grating_line_width (float) – of the 220 ridge

  • wg_width (float) – straight width

  • neff (float) – 2.638 # tooth effective index

  • layer (Tuple[int, int]) – LAYER.WG

  • layer_trench (Tuple[int, int]) – LAYER.SLAB150

  • p_start (int) – 26 # first tooth

  • n_periods (int) – 16 # number of periods

  • straight (float) – 0.2

import gdsfactory as gf
from gdsfactory.components.grating_coupler.elliptical_trenches import grating_coupler_elliptical_trenches

c = grating_coupler_elliptical_trenches()
c.plot()

(Source code)

  \  \  \  \
   \  \  \  \
 _|-|_|-|_|-|___
|_______________  W0
Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_elliptical_trenches(polarization='te', fiber_marker_width=11.0, fiber_marker_layer=(203, 0), taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), layer_trench=(2, 0), p_start=26, n_periods=30, straight=0.2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-75.png

grating_coupler_loss

gdsfactory.components.grating_coupler_loss(pitch=127.0, grating_coupler_factory=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), **kwargs)[source]
Parameters
  • pitch (float) – grating_coupler_pitch

  • grating_coupler_factory (Callable[…, Component]) – function

  • **kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_loss(pitch=127.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-76.png

grating_coupler_te

gdsfactory.components.grating_coupler_te(*, polarization: str = 'te', fiber_marker_width: float = 11.0, fiber_marker_layer: Tuple[int, int] = (203, 0), taper_length: float = 16.6, taper_angle: float = 35, trenches_extra_angle: float = 9.0, wavelength: float = 1.53, fiber_angle: float = 15.0, grating_line_width: float = 0.343, wg_width: float = 0.5, neff: float = 2.638, layer: Tuple[int, int] = (1, 0), layer_trench: Tuple[int, int] = (2, 0), p_start: int = 26, n_periods: int = 30, straight: float = 0.2)gdsfactory.component.Component

Returns Grating coupler with defined trenches

Parameters
  • polarization – ‘te’ or ‘tm’

  • taper_length – taper length from straight I/O

  • taper_angle – grating flare angle

  • wavelength – grating transmission central wavelength

  • fiber_angle – fibre polish angle in degrees

  • grating_line_width – of the 220 ridge

  • wg_width – straight width

  • neff – 2.638 # tooth effective index

  • layer – LAYER.WG

  • layer_trench – LAYER.SLAB150

  • p_start – 26 # first tooth

  • n_periods – 16 # number of periods

  • straight – 0.2

import gdsfactory as gf
from gdsfactory.components.grating_coupler.elliptical_trenches import grating_coupler_elliptical_trenches

c = grating_coupler_elliptical_trenches()
c.plot()

(Source code)

  \  \  \  \
   \  \  \  \
 _|-|_|-|_|-|___
|_______________  W0
import gdsfactory as gf

c = gf.components.grating_coupler_te(polarization='te', fiber_marker_width=11.0, fiber_marker_layer=(203, 0), taper_length=16.6, taper_angle=35, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, wg_width=0.5, neff=2.638, layer=(1, 0), layer_trench=(2, 0), p_start=26, n_periods=30, straight=0.2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-78.png

grating_coupler_tm

gdsfactory.components.grating_coupler_tm(*, polarization: str = 'tm', fiber_marker_width: float = 11.0, fiber_marker_layer: Tuple[int, int] = (203, 0), taper_length: float = 16.6, taper_angle: float = 30.0, trenches_extra_angle: float = 9.0, wavelength: float = 1.53, fiber_angle: float = 15.0, grating_line_width: float = 0.6, wg_width: float = 0.5, neff: float = 1.8, layer: Tuple[int, int] = (1, 0), layer_trench: Tuple[int, int] = (2, 0), p_start: int = 26, n_periods: int = 30, straight: float = 0.2)gdsfactory.component.Component

Returns Grating coupler with defined trenches

Parameters
  • polarization – ‘te’ or ‘tm’

  • taper_length – taper length from straight I/O

  • taper_angle – grating flare angle

  • wavelength – grating transmission central wavelength

  • fiber_angle – fibre polish angle in degrees

  • grating_line_width – of the 220 ridge

  • wg_width – straight width

  • neff – 2.638 # tooth effective index

  • layer – LAYER.WG

  • layer_trench – LAYER.SLAB150

  • p_start – 26 # first tooth

  • n_periods – 16 # number of periods

  • straight – 0.2

import gdsfactory as gf
from gdsfactory.components.grating_coupler.elliptical_trenches import grating_coupler_elliptical_trenches

c = grating_coupler_elliptical_trenches()
c.plot()

(Source code)

  \  \  \  \
   \  \  \  \
 _|-|_|-|_|-|___
|_______________  W0
import gdsfactory as gf

c = gf.components.grating_coupler_tm(polarization='tm', fiber_marker_width=11.0, fiber_marker_layer=(203, 0), taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.6, wg_width=0.5, neff=1.8, layer=(1, 0), layer_trench=(2, 0), p_start=26, n_periods=30, straight=0.2)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-80.png

grating_coupler_tree

gdsfactory.components.grating_coupler_tree(n=4, straight_spacing=4.0, grating_coupler_function=<function grating_coupler_elliptical_te>, with_loopback=False, bend_factory=<function bend_euler>, fanout_length=0.0, layer_label=(66, 0), **kwargs)[source]

Array of straights connected with grating couplers useful to align the 4 corners of the chip

Parameters

kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_tree(n=4, straight_spacing=4.0, with_loopback=False, fanout_length=0.0, layer_label=(66, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-81.png

grating_coupler_uniform

gdsfactory.components.grating_coupler_uniform(num_teeth=20, period=0.75, fill_factor=0.5, width_grating=11.0, length_taper=150.0, width=0.5, layer=(1, 0), polarization='te', wavelength=1.55)[source]

Grating coupler uniform (grating with rectangular shape not elliptical). Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.

Parameters
  • num_teeth (int) – 20

  • period (float) – 0.75

  • fill_factor (float) – 0.5

  • width_grating (float) – 11

  • length_taper (float) – 150

  • width (float) – 0.5

  • partial_etch – False

  \  \  \  \
   \  \  \  \
 _|-|_|-|_|-|___
|_______________  W0
Return type

Component

import gdsfactory as gf

c = gf.components.grating_coupler_uniform(num_teeth=20, period=0.75, fill_factor=0.5, width_grating=11.0, length_taper=150.0, width=0.5, layer=(1, 0), polarization='te', wavelength=1.55)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-82.png

hline

gdsfactory.components.hline(length=10.0, width=0.5, layer=(1, 0), port_type='optical')[source]

Horizonal line straight, with ports on east and west sides

Return type

Component

import gdsfactory as gf

c = gf.components.hline(length=10.0, width=0.5, layer=(1, 0), port_type='optical')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-83.png

litho_calipers

gdsfactory.components.litho_calipers(notch_size=(2.0, 5.0), notch_spacing=2.0, num_notches=11, offset_per_notch=0.1, row_spacing=0.0, layer1=(1, 0), layer2=(2, 0))[source]

Vernier caliper structure to test lithography alignment Only the middle finger is aligned and the rest are offset.

adapted from phidl

Parameters
  • notch_size (Tuple[float, float]) – [xwidth, yheight]

  • notch_spacing (float) – 2

  • num_notches (int) – 11

  • offset_per_notch (float) – 0.1

  • row_spacing (float) – 0

  • layer1 (Tuple[int, int]) – 1

  • layer2 (Tuple[int, int]) – 2

import gdsfactory as gf

c = gf.components.litho_calipers()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-84.png
Return type

Component

import gdsfactory as gf

c = gf.components.litho_calipers(notch_size=(2.0, 5.0), notch_spacing=2.0, num_notches=11, offset_per_notch=0.1, row_spacing=0.0, layer1=(1, 0), layer2=(2, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-85.png

litho_steps

gdsfactory.components.litho_steps(line_widths=(1.0, 2.0, 4.0, 8.0, 16.0), line_spacing=10.0, height=100.0, layer=(1, 0))[source]

Produces a positive + negative tone linewidth test, used for lithography resolution test patterning adapted from phidl

Parameters
  • line_widths (List[float]) –

  • line_spacing (float) –

  • height (float) –

  • layer (Tuple[int, int]) –

import gdsfactory as gf

c = gf.components.litho_steps()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-86.png
Return type

Component

import gdsfactory as gf

c = gf.components.litho_steps(line_widths=(1.0, 2.0, 4.0, 8.0, 16.0), line_spacing=10.0, height=100.0, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-87.png

loop_mirror

gdsfactory.components.loop_mirror(component=<function mmi1x2>, bend90=<function bend_euler>)[source]

Returns Sagnac loop_mirror.

Return type

Component

import gdsfactory as gf

c = gf.components.loop_mirror()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-89.png

loss_deembedding_ch12_34

gdsfactory.components.loss_deembedding_ch12_34(pitch=127.0, R=10.0, grating_coupler_factory=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 2), **kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.loss_deembedding_ch12_34(pitch=127.0, R=10.0, input_port_indexes=(0, 2))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-90.png

loss_deembedding_ch13_24

gdsfactory.components.loss_deembedding_ch13_24(pitch=127.0, R=10.0, grating_coupler_factory=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 1), cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.loss_deembedding_ch13_24(pitch=127.0, R=10.0, input_port_indexes=(0, 1))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-91.png

loss_deembedding_ch14_23

gdsfactory.components.loss_deembedding_ch14_23(pitch=127.0, R=10.0, grating_coupler_factory=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 1), **kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.loss_deembedding_ch14_23(pitch=127.0, R=10.0, input_port_indexes=(0, 1))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-92.png

manhattan_text

gdsfactory.components.manhattan_text(text='abcd', size=10.0, position=(0.0, 0.0), justify='left', layer=(1, 0))[source]

Pixel based font, guaranteed to be manhattan, without accute angles.

Parameters
  • text (str) –

  • size (float) – pixel size

  • position (Tuple[float, float]) – coordinate

  • justify (str) –

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.manhattan_text(text='abcd', size=10.0, position=(0.0, 0.0), justify='left', layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-93.png

mmi1x2

gdsfactory.components.mmi1x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, taper=<function taper>, with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Mmi 1x2.

Parameters
  • width (float) – input and output straight width

  • width_taper (float) – interface between input straights and mmi region

  • length_taper (float) – into the mmi region

  • length_mmi (float) – in x direction

  • width_mmi (float) – in y direction

  • gap_mmi (float) – gap between tapered wg

  • taper (Callable[…, Component]) – taper function

  • with_cladding_box (bool) – to avoid DRC acute angle errors in cladding

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

       length_mmi
        <------>
        ________
       |        |
       |         \__
       |          __  E1
    __/          /_ _ _ _
 W0 __          | _ _ _ _| gap_mmi
      \          \__
       |          __  E0
       |         /
       |________|

     <->
length_taper
Return type

Component

import gdsfactory as gf

c = gf.components.mmi1x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-94.png

mmi2x2

gdsfactory.components.mmi2x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, taper=<function taper>, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Mmi 2x2.

Parameters
  • width (float) – input and output straight width

  • width_taper (float) – interface between input straights and mmi region

  • length_taper (float) – into the mmi region

  • length_mmi (float) – in x direction

  • width_mmi (float) – in y direction

  • gap_mmi (float) – (width_taper + gap between tapered wg)/2

  • taper (Callable[…, Component]) – taper function

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

       length_mmi
        <------>
        ________
       |        |
    __/          \__
W1  __            __  E1
      \          /_ _ _ _
      |         | _ _ _ _| gap_mmi
    __/          \__
W0  __            __  E0
      \          /
       |________|

     <->
length_taper
Return type

Component

import gdsfactory as gf

c = gf.components.mmi2x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-95.png

mzi

gdsfactory.components.mzi(delta_length=10.0, length_y=0.8, length_x=0.1, bend=<function bend_euler>, straight=<function straight>, straight_y=None, straight_x_top=None, straight_x_bot=None, splitter=<function mmi1x2>, combiner=None, with_splitter=True, splitter_settings=None, combiner_settings=None, layer=None, **kwargs)[source]

Mzi.

Parameters
  • delta_length (float) – bottom arm vertical extra length

  • length_y (float) – vertical length for both and top arms

  • length_x (float) – horizontal length

  • bend (Union[Callable[…, Component], Component]) – 90 degrees bend library

  • straight (Callable[…, Component]) – straight function

  • straight_y (Optional[Callable[…, Component]]) – straight for length_y and delta_length

  • straight_x_top (Optional[Callable[…, Component]]) – top straight for length_x

  • straight_x_bot (Optional[Callable[…, Component]]) – bottom straight for length_x

  • splitter (Union[Callable[…, Component], Component]) – splitter function

  • combiner (Optional[Callable[…, Component]]) – combiner function

  • with_splitter (bool) – if False removes splitter

  • splitter_settings (Optional[Dict[str, Union[int, float]]]) –

  • combiner_settings (Optional[Dict[str, Union[int, float]]]) –

  • kwargs – cross_section settings

           __Lx__
          |      |
          Ly     Lyr (not a parameter)
          |      |
splitter==|      |==combiner
          |      |
          Ly     Lyr (not a parameter)
          |      |
          | delta_length/2
          |      |
          |__Lx__|

    ____________           __________
    |          |          |
    |          |       ___|
____|          |____
    | splitter   d1     d2  combiner
____|           ____
    |          |       ____
    |          |          |
    |__________|          |__________
Return type

Component

import gdsfactory as gf

c = gf.components.mzi(delta_length=10.0, length_y=0.8, length_x=0.1, with_splitter=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-96.png

mzi_arm

gdsfactory.components.mzi_arm(length_y_left=0.8, length_y_right=0.8, length_x=0.1, bend=<function bend_euler>, straight=<function straight>, straight_x=None, straight_y=None, **kwargs)[source]

Mzi.

Parameters
  • length_y_left (float) – vertical length

  • length_y_rigth – vertical length

  • length_x (float) – horizontal length

  • bend (Union[Callable[…, Component], Component]) – 90 degrees bend library

  • straight (Callable[…, Component]) – straight function

  • straight_x (Optional[Callable[…, Component]]) – straight for length_x

  • straight_y (Optional[Callable[…, Component]]) – straight for length_y

  • kwargs – cross_section settings

B__Lx__B
|      |
Ly     Lyr
|      |
B      B
Return type

Component

import gdsfactory as gf

c = gf.components.mzi_arm(length_y_left=0.8, length_y_right=0.8, length_x=0.1)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-97.png

mzi_lattice

gdsfactory.components.mzi_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0, ), mzi_factory=<function mzi>, splitter=<function coupler>, straight=<function straight>, **kwargs)[source]

Mzi lattice filter.

      ______             ______
     |      |           |      |
     |      |           |      |
cp1==|      |===cp2=====|      |=== .... ===cp_last===
     |      |           |      |
     |      |           |      |
    DL1     |          DL2     |
     |      |           |      |
     |______|           |      |
                        |______|
Return type

Component

import gdsfactory as gf

c = gf.components.mzi_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0,))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-98.png

mzi_phase_shifter

gdsfactory.components.mzi_phase_shifter(delta_length: float = 10.0, length_y: float = 0.8, *, length_x: float = 320.0, bend: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function bend_euler>, straight: Callable[[...], gdsfactory.component.Component] = <function straight>, straight_y: Optional[Callable[[...], gdsfactory.component.Component]] = None, straight_x_top: Optional[Callable[[...], gdsfactory.component.Component]] = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), straight_x_bot: Optional[Callable[[...], gdsfactory.component.Component]] = None, splitter: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function mmi1x2>, combiner: Optional[Callable[[...], gdsfactory.component.Component]] = None, with_splitter: bool = True, splitter_settings: Optional[Dict[str, Union[int, float]]] = None, combiner_settings: Optional[Dict[str, Union[int, float]]] = None, layer: Optional[Tuple[int, int]] = None, **kwargs)gdsfactory.component.Component

Mzi.

Parameters
  • delta_length – bottom arm vertical extra length

  • length_y – vertical length for both and top arms

  • length_x – horizontal length

  • bend – 90 degrees bend library

  • straight – straight function

  • straight_y – straight for length_y and delta_length

  • straight_x_top – top straight for length_x

  • straight_x_bot – bottom straight for length_x

  • splitter – splitter function

  • combiner – combiner function

  • with_splitter – if False removes splitter

  • splitter_settings

  • combiner_settings

  • kwargs – cross_section settings

           __Lx__
          |      |
          Ly     Lyr (not a parameter)
          |      |
splitter==|      |==combiner
          |      |
          Ly     Lyr (not a parameter)
          |      |
          | delta_length/2
          |      |
          |__Lx__|

    ____________           __________
    |          |          |
    |          |       ___|
____|          |____
    | splitter   d1     d2  combiner
____|           ____
    |          |       ____
    |          |          |
    |__________|          |__________
import gdsfactory as gf

c = gf.components.mzi_phase_shifter(delta_length=10.0, length_y=0.8, length_x=320.0, with_splitter=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-99.png

mzi_phase_shifter_90_90

gdsfactory.components.mzi_phase_shifter_90_90(delta_length: float = 10.0, length_y: float = 0.8, *, length_x: float = 320.0, bend: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function bend_euler>, straight: Callable[[...], gdsfactory.component.Component] = <function straight>, straight_y: Optional[Callable[[...], gdsfactory.component.Component]] = None, straight_x_top: Optional[Callable[[...], gdsfactory.component.Component]] = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False, port_orientation1=90, port_orientation2=90), straight_x_bot: Optional[Callable[[...], gdsfactory.component.Component]] = None, splitter: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = <function mmi1x2>, combiner: Optional[Callable[[...], gdsfactory.component.Component]] = None, with_splitter: bool = True, splitter_settings: Optional[Dict[str, Union[int, float]]] = None, combiner_settings: Optional[Dict[str, Union[int, float]]] = None, layer: Optional[Tuple[int, int]] = None, **kwargs)gdsfactory.component.Component

Mzi.

Parameters
  • delta_length – bottom arm vertical extra length

  • length_y – vertical length for both and top arms

  • length_x – horizontal length

  • bend – 90 degrees bend library

  • straight – straight function

  • straight_y – straight for length_y and delta_length

  • straight_x_top – top straight for length_x

  • straight_x_bot – bottom straight for length_x

  • splitter – splitter function

  • combiner – combiner function

  • with_splitter – if False removes splitter

  • splitter_settings

  • combiner_settings

  • kwargs – cross_section settings

           __Lx__
          |      |
          Ly     Lyr (not a parameter)
          |      |
splitter==|      |==combiner
          |      |
          Ly     Lyr (not a parameter)
          |      |
          | delta_length/2
          |      |
          |__Lx__|

    ____________           __________
    |          |          |
    |          |       ___|
____|          |____
    | splitter   d1     d2  combiner
____|           ____
    |          |       ____
    |          |          |
    |__________|          |__________
import gdsfactory as gf

c = gf.components.mzi_phase_shifter_90_90(delta_length=10.0, length_y=0.8, length_x=320.0, with_splitter=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-100.png

mzit

gdsfactory.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2.0, delta_length=10.0, Ls=1.0, coupler_length1=5.0, coupler_length2=10.0, coupler_gap1=0.2, coupler_gap2=0.3, bend_radius=10.0, taper_factory=<function taper>, taper_length=5.0, bend90=<function bend_euler>, straight_factory=<function straight>, coupler1=<function coupler>, coupler2=<function coupler>, **kwargs)[source]

Mzi tolerant to fab variations based on Yufei Xing thesis http://photonics.intec.ugent.be/publications/PhD.asp?ID=250

Parameters
  • w1 (float) – narrow wg_width

  • w2 (float) – wide wg_width

  • dy (float) – port to port vertical spacing

  • delta_length (float) – length difference between arms

  • Ls (float) – shared length for w1 and w2

  • coupler_length1 (float) – length of coupler1

  • coupler_length2 (float) – length of coupler2

  • coupler_gap1 (float) – coupler1

  • coupler_gap2 (float) – coupler2

  • bend_radius (float) – 10.0

  • taper_factory (Callable[…, Component]) – taper library

  • taper_length (float) –

  • bend90 (Callable[…, Component]) – bend_circular or library

  • straight_factory (Callable[…, Component]) – library

  • coupler1 (Optional[Callable[…, Component]]) – coupler1 or library, can be None

  • coupler2 (Callable[…, Component]) – coupler2 or library

  • kwargs – cross_section settings

               cp1
4   2 __                  __  3___w0_t2   _w2___
        \                /                      \
         \    length1   /                        |
          ============== gap1                    |
         /              \                        |
      __/                \_____w0___t1   _w1     |
3   1                        4               \   |
                                             |   |
2   2                                        |   |
      __                  __w0____t1____w1___/   |
        \                /                       |
         \    length2   /                        |
          ============== gap2                    |
         /               \                       |
      __/                 \_                     |
1   1                      \ E0_w0__t2 __w1_____/
               cp2
Return type

Component

import gdsfactory as gf

c = gf.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2.0, delta_length=10.0, Ls=1.0, coupler_length1=5.0, coupler_length2=10.0, coupler_gap1=0.2, coupler_gap2=0.3, bend_radius=10.0, taper_length=5.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-101.png

mzit_lattice

gdsfactory.components.mzit_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0, ), mzi_factory=<function mzit>)[source]

Mzi fab tolerant lattice filter.

                cp1
W3  W1 __                  __ E1___w0_t2   _w2___
         \                /                      \
          \    length1   /                        |
           ============== gap1                    |
          /              \                        |
       __/                \_____w0___t1   _w1     |
W2  W0                       E0               \   | .
                 ...                          |   | .
W1  W1                                        |   | .
       __                  __w0____t1____w1___/   |
         \                /                       |
          \    lengthN   /                        |
           ============== gapN                    |
          /               \                       |
       __/                 \_                     |
W0  W0                      \ E0_w0__t2 __w1_____/
                cpN
Return type

Component

import gdsfactory as gf

c = gf.components.mzit_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0,))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-102.png

nxn

gdsfactory.components.nxn(west=1, east=4, north=0, south=0, xsize=8.0, ysize=8.0, wg_width=0.5, layer=(1, 0), wg_margin=1.0, **kwargs)[source]

returns a nxn component with nxn ports (west, east, north, south)

Parameters
  • west (int) – number of west ports

  • east (int) – number of east ports

  • north (int) – number of north ports

  • south (int) – number of south ports

  • xsize (float) – size in X

  • ysize (float) – size in Y

  • wg_width (float) – width of the straight ports

  • wg_margin (float) – margin from straight to component edge

  • **kwargs – port_settings

    3   4
    |___|_
2 -|      |- 5
   |      |
1 -|______|- 6
    |   |
    8   7
Return type

Component

import gdsfactory as gf

c = gf.components.nxn(west=1, east=4, north=0, south=0, xsize=8.0, ysize=8.0, wg_width=0.5, layer=(1, 0), wg_margin=1.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-103.png

pad

gdsfactory.components.pad(size=(100.0, 100.0), layer=(49, 0), layers_cladding=None, cladding_offsets=None)[source]

Rectangular pad with 4 ports (1, 2, 3, 4)

Parameters
  • width – pad width

  • height – pad height

  • layer (Tuple[int, int]) – pad layer

  • layers_cladding (Optional[Tuple[Tuple[int, int], …]]) –

  • cladding_offsets (Optional[Tuple[float, …]]) –

Return type

Component

import gdsfactory as gf

c = gf.components.pad(size=(100.0, 100.0), layer=(49, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-104.png

pad_array

gdsfactory.components.pad_array(pad=<function pad>, spacing=(150.0, 150.0), columns=6, rows=1, orientation=270)[source]

Returns 2D array of pads

Parameters
  • pad (Union[Callable[…, Component], Component]) – pad element

  • spacing (Tuple[float, float]) – x, y pitch

  • columns (int) –

  • rows (int) –

  • orientation (int) – port orientation in deg

Return type

Component

import gdsfactory as gf

c = gf.components.pad_array(spacing=(150.0, 150.0), columns=6, rows=1, orientation=270)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-105.png

pads_shorted

gdsfactory.components.pads_shorted(width=100, n_pads=8, pad_spacing=150, layer=(41, 0))[source]
Return type

Component

import gdsfactory as gf

c = gf.components.pads_shorted(width=100, n_pads=8, pad_spacing=150, layer=(41, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-106.png

pcm_optical

gdsfactory.components.pcm_optical(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1.0), dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=('DL', 'DM', 'DH'), straight_factory=<function straight>, bend90_factory=<function bend_circular>, layer=(1, 0), layers_cladding=None, cross_section=functools.partial(<cyfunction cross_section>), pixel_size=1.0)[source]

column with all optical PCMs

Parameters

widths (Tuple[float, …]) – for straight

Return type

Component

import gdsfactory as gf

c = gf.components.pcm_optical(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1.0), dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=('DL', 'DM', 'DH'), layer=(1, 0), pixel_size=1.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-107.png

pixel

gdsfactory.components.pixel(size=1.0, layer=(1, 0))[source]
Return type

Component

import gdsfactory as gf

c = gf.components.pixel(size=1.0, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-108.png

qrcode

gdsfactory.components.qrcode(data='mask01', psize=1, layer=(1, 0))[source]

Returns QRCode.

Return type

Component

import gdsfactory as gf

c = gf.components.qrcode(data='mask01', psize=1, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-109.png

ramp

gdsfactory.components.ramp(length=10.0, width1=5.0, width2=8.0, layer=(1, 0))[source]

Return a ramp component. Based on phidl.

Parameters
  • length (float) – Length of the ramp section.

  • width1 (float) – Width of the start of the ramp section.

  • width2 (Optional[float]) – Width of the end of the ramp section (defaults to width1).

  • layer (Tuple[int, int]) – Specific layer to put polygon geometry on.

Return type

Component

import gdsfactory as gf

c = gf.components.ramp(length=10.0, width1=5.0, width2=8.0, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-110.png

rectangle

gdsfactory.components.rectangle(size=(4.0, 2.0), layer=(1, 0), centered=False, ports=None, **port_settings)[source]
Parameters
  • size (Tuple[float, float]) – (tuple) Width and height of rectangle.

  • layer (Tuple[int, int]) – Specific layer to put polygon geometry on.

  • centered (bool) – True sets center to (0, 0), False sets south-west to (0, 0)

  • ports (Optional[Dict[str, List[Tuple[float, float, float]]]]) – {direction: [(x, y, width), …]} direction: ‘W’, ‘E’, ‘N’ or ‘S’

Return type

Component

import gdsfactory as gf

c = gf.components.rectangle(size=(4.0, 2.0), layer=(1, 0), centered=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-111.png

resistance_meander

gdsfactory.components.resistance_meander(pad_size=(50.0, 50.0), num_squares=1000, width=1.0, res_layer=(49, 0), pad_layer=(49, 0), gnd_layer=(49, 0))[source]

meander to test resistance from phidl.geometry

Parameters
  • pad_size (Tuple[float]) – Size of the two matched impedance pads (microns)

  • num_squares (int) – Number of squares comprising the resonator wire

  • width (float) – The width of the squares (microns)

  • res_layer (Tuple[int, int]) –

  • pad_layer (Tuple[int, int]) –

  • gnd_layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.resistance_meander(pad_size=(50.0, 50.0), num_squares=1000, width=1.0, res_layer=(49, 0), pad_layer=(49, 0), gnd_layer=(49, 0))
c.plot()

(Source code)

ring

gdsfactory.components.ring(radius=10.0, width=0.5, angle_resolution=2.5, layer=(1, 0))[source]

Returns a ring.

Parameters
  • radius (float) – ring radius

  • width (float) – of the ring

  • angle_resolution (float) – number of points per degree

  • layer (Tuple[int, int]) – layer

Return type

Component

import gdsfactory as gf

c = gf.components.ring(radius=10.0, width=0.5, angle_resolution=2.5, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-113.png

ring_double

gdsfactory.components.ring_double(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, coupler_ring=<function coupler_ring>, straight=<function straight>, bend=None, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Double bus ring made of two couplers (ct: top, cb: bottom) connected with two vertical straights (sl: left, sr: right)

Parameters
  • gap (float) – gap between for coupler

  • radius (float) – for the bend and coupler

  • length_x (float) – ring coupler length

  • length_y (float) – vertical straight length

  • coupler – ring coupler function

  • straight (Callable[…, Component]) – straight function

  • bend (Optional[Callable[…, Component]]) – bend function

  • **kwargs – cross_section settings

--==ct==--
 |      |
 sl     sr length_y
 |      |
--==cb==-- gap

 length_x
Return type

Component

import gdsfactory as gf

c = gf.components.ring_double(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-114.png

ring_single

gdsfactory.components.ring_single(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, coupler_ring=<function coupler_ring>, straight=<function straight>, bend=<function bend_euler>, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Single bus ring made of a ring coupler (cb: bottom) connected with two vertical straights (sl: left, sr: right) two bends (bl, br) and horizontal straight (wg: top)

Parameters
  • gap (float) – gap between for coupler

  • radius (float) – for the bend and coupler

  • length_x (float) – ring coupler length

  • length_y (float) – vertical straight length

  • coupler_ring (Callable[…, Component]) – ring coupler function

  • straight (Callable[…, Component]) – straight function

  • bend (Callable[…, Component]) – 90 degrees bend function

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

 bl-st-br
 |      |
 sl     sr length_y
 |      |
--==cb==-- gap

 length_x
Return type

Component

import gdsfactory as gf

c = gf.components.ring_single(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-115.png

ring_single_array

gdsfactory.components.ring_single_array(ring_function=<function ring_single>, straight_function=<function straight>, spacing=5.0, list_of_dicts=({'length_x': 10.0, 'radius': 5.0}, {'length_x': 20.0, 'radius': 10.0}))[source]

Ring of single bus connected with straights.

  ______               ______
 |      |             |      |
 |      |  length_y   |      |
 |      |             |      |
--======-- spacing ----==gap==--

 length_x
Return type

Component

import gdsfactory as gf

c = gf.components.ring_single_array(spacing=5.0, list_of_dicts=({'length_x': 10.0, 'radius': 5.0}, {'length_x': 20.0, 'radius': 10.0}))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-116.png

ring_single_dut

gdsfactory.components.ring_single_dut(component=functools.partial(<function taper>, width2=3), wg_width=0.5, gap=0.2, length_x=4, radius=5, length_y=0, coupler=<function coupler_ring>, straight=<function straight>, bend=<function bend_euler>, with_component=True, **kwargs)[source]

Single bus ring made of two couplers (ct: top, cb: bottom) connected with two vertical straights (wyl: left, wyr: right) (Device Under Test) in the middle to extract loss from quality factor

Parameters

with_component – if False changes component for just a straight

 bl-wt-br
 |      | length_y
 wl     component
 |      |
--==cb==-- gap

 length_x
import gdsfactory as gf

c = gf.components.ring_single_dut(wg_width=0.5, gap=0.2, length_x=4, radius=5, length_y=0, with_component=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-117.png

spiral

gdsfactory.components.spiral(port_spacing=500.0, length=10000.0, spacing=None, parity=1, port=(0, 0), direction='WEST', waveguide_template=<function strip>, layer=(1, 0), layer_cladding=(111, 0), cladding_offset=3.0, wg_width=0.5, radius=10.0, **kwargs)[source]

Picwriter Spiral

Parameters
  • port_spacing (float) – distance between input/output ports

  • length (float) – spiral length (um)

  • spacing (Optional[float]) – distance between parallel straights

  • parity (int) – If 1 spiral on right side, if -1 spiral on left side (mirror flip)

  • port (Tuple[int, int]) – Cartesian coordinate of the input port

  • direction (str) – NORTH, WEST, SOUTH, EAST or angle in radians

  • waveguide_template (WaveguideTemplate) – Picwriter WaveguideTemplate function

  • layer (Tuple[int, int]) – core layer

  • layer_cladding (Tuple[int, int]) – cladding layer

  • cladding_offset (float) – distance from core to cladding

  • wg_width (float) – 0.5

  • radius (float) – 10

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.spiral(port_spacing=500.0, length=10000.0, parity=1, port=(0, 0), direction='WEST', layer=(1, 0), layer_cladding=(111, 0), cladding_offset=3.0, wg_width=0.5, radius=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-118.png

spiral_circular

gdsfactory.components.spiral_circular(length=1000.0, wg_width=0.5, spacing=3.0, min_bend_radius=5.0, points=1000, layer=(1, 0))[source]

Returns a circular spiral.

FIXME, has some issues

Parameters
  • length (float) – length in um

  • wg_width (float) –

  • spacing (float) – between straights

  • min_bend_radius (float) –

  • points (int) –

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.spiral_circular(length=1000.0, wg_width=0.5, spacing=3.0, min_bend_radius=5.0, points=1000, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-119.png

spiral_external_io

gdsfactory.components.spiral_external_io(N=6, x_inner_length_cutback=300.0, x_inner_offset=0.0, y_straight_inner_top=0.0, dx=3.0, dy=3.0, bend=<function bend_euler>, length=None, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]
Parameters
  • N (int) – number of loops

  • x_inner_length_cutback (float) –

  • x_inner_offset (float) –

  • y_straight_inner_top (float) –

  • dx (float) – center to center x-spacing

  • dy (float) – center to center y-spacing

  • bend (Callable[…, Component]) – function

  • length (Optional[float]) – length in um, it is the approximates total length

  • cross_section (Callable[…, CrossSection]) –

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.spiral_external_io(N=6, x_inner_length_cutback=300.0, x_inner_offset=0.0, y_straight_inner_top=0.0, dx=3.0, dy=3.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-120.png

spiral_inner_io

gdsfactory.components.spiral_inner_io(N=6, x_straight_inner_right=150.0, x_straight_inner_left=50.0, y_straight_inner_top=50.0, y_straight_inner_bottom=10.0, grating_spacing=127.0, waveguide_spacing=3.0, bend90_function=<function bend_euler>, bend180_function=functools.partial(<function bend_euler>, angle=180), straight_factory=<function straight>, length=None, cross_section=functools.partial(<cyfunction cross_section>), cross_section_bend=None, **kwargs)[source]

Spiral with ports inside the spiral loop.

Parameters
  • N (int) – number of loops

  • x_straight_inner_right (float) –

  • x_straight_inner_left (float) –

  • y_straight_inner_top (float) –

  • y_straight_inner_bottom (float) –

  • grating_spacing (float) –

  • waveguide_spacing (float) – center to center spacing

  • bend90_function (Callable[…, Component]) –

  • bend180_function (Callable[…, Component]) –

  • straight_factory (Callable[…, Component]) – straight function

  • length (Optional[float]) – computes spiral length from simple interpolation

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.spiral_inner_io(N=6, x_straight_inner_right=150.0, x_straight_inner_left=50.0, y_straight_inner_top=50.0, y_straight_inner_bottom=10.0, grating_spacing=127.0, waveguide_spacing=3.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-121.png

spiral_inner_io_fiber_single

gdsfactory.components.spiral_inner_io_fiber_single(cross_section=functools.partial(<cyfunction cross_section>), x_straight_inner_right=40.0, x_straight_inner_left=75.0, y_straight_inner_top=10.0, y_straight_inner_bottom=0.0, grating_spacing=200.0, **kwargs)[source]

Spiral with 0 and 270 degree ports.

import gdsfactory as gf

c = gf.components.spiral_inner_io_fiber_single(x_straight_inner_right=40.0, x_straight_inner_left=75.0, y_straight_inner_top=10.0, y_straight_inner_bottom=0.0, grating_spacing=200.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-122.png

splitter_chain

gdsfactory.components.splitter_chain(splitter=<function mmi1x2>, n_devices=3, bend=<function bend_s>, **kwargs)[source]

Chain of splitters

          __5
       __|
    __|  |__4
1 _|  |__3
   |__2


    __E1
1 _|
   |__E0
Return type

Component

import gdsfactory as gf

c = gf.components.splitter_chain(n_devices=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-123.png

splitter_tree

gdsfactory.components.splitter_tree(coupler=<function mmi1x2>, noutputs=4, spacing=(90.0, 50.0), bend_s=<function bend_s>, bend_s_xsize=None, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Tree of power splitters.

Parameters
  • coupler (Callable[…, Component]) – coupler factory

  • noutputs (int) – number of outputs

  • spacing (Tuple[float, float]) – x, y spacing between couplers

  • bend_s (Optional[Callable[…, Component]]) – Sbend library name or dict for termination

  • bend_s_xsize (Optional[float]) –

  • cross_section (Callable[…, CrossSection]) – cross_section

  • bend_length – dx for the sbend

  • kwargs – cross_section settings

     __|
  __|  |__
_|  |__
 |__        dy

  dx
Return type

Component

import gdsfactory as gf

c = gf.components.splitter_tree(noutputs=4, spacing=(90.0, 50.0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-124.png

staircase

gdsfactory.components.staircase(bend90=<function bend_euler>, length_v=5.0, length_h=5.0, n_steps=4, straight_factory=<function straight>)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.staircase(length_v=5.0, length_h=5.0, n_steps=4)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-125.png

straight

gdsfactory.components.straight(length=10.0, npoints=2, with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Returns a Straight waveguide.

Parameters
  • length (float) – straight length

  • npoints (int) – number of points

  • with_cladding_box (bool) – square in layers_cladding to remove DRC

  • cross_section (Callable[…, CrossSection]) –

  • **kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.straight(length=10.0, npoints=2, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-126.png

straight_array

gdsfactory.components.straight_array(n=4, spacing=4.0, straigth=<function straight>, **kwargs)[source]

Array of straights connected with grating couplers.

useful to align the 4 corners of the chip

Parameters
  • n (int) – number of straights

  • spacing (float) – edge to edge straight spacing

  • straigth (Union[Callable[…, Component], Component]) – straigth straight Component or library

  • **kwargs

Return type

Component

import gdsfactory as gf

c = gf.components.straight_array(n=4, spacing=4.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-127.png

straight_heater_doped_rib

gdsfactory.components.straight_heater_doped_rib(length=320.0, nsections=3, cross_section=functools.partial(<cyfunction cross_section>, sections=(slab_200_3_0_optical_optical, )), cross_section_heater=<cyfunction rib_heater_doped>, via_stack_contact=functools.partial(<function via_stack>, layers=((3, 0), (24, 0), (41, 0)), vias=(None, None, functools.partial(<function via>, layer=(40, 0)))), via_stack_metal=functools.partial(<function via_stack>, layers=((41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), via_stack_metal_size=(10.0, 10.0), via_stack_contact_size=(10.0, 10.0), via_stack_contact_yspacing=2.0, port_orientation_top=0, port_orientation_bot=180, taper=<function taper_cross_section>, taper_length=10.0, **kwargs)[source]

Returns a doped thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length (float) – of the waveguide

  • nsections (int) – between contacts

  • cross_section_heater (Callable[…, CrossSection]) – for the heater

  • via_stack_contact (Callable[…, Component]) – function to connect the heated strip

  • via_stack_metal (Callable[…, Component]) – function to connect the metal area

  • via_stack_metal_size (Tuple[float, float]) –

  • via_stack_contact_yspacing (float) – spacing from waveguide to contact

  • port_orientation_top (int) – for top contact

  • port_orientation_bot (int) – for bottom contact

  • kwargs – cross_section settings

  • taper (Optional[Callable[…, Component]]) – optional taper

                      length
  <-------------------------------------------->
               length_section
     <--------------------------->
   length_contact
     <------->                             taper
     ______________________________________
   /|        |____________________|        |\
__/ |viastack|                    |        | \___
__  |        |                    |        |  ___cross_section
  \ | size   |____________________|        | /
   \|________|____________________|________|/

taper         cross_section_heater



                             |<------width------>|
                              ____________________  heater_gap                slab_gap
                             |                   |<----------->|               <-->
 ___ ________________________|                   |____________________________|___
|   |            |                 undoped Si                  |              |   |
|   |layer_heater|                 intrinsic region            |layer_heater  |   |
|___|____________|_____________________________________________|______________|___|
                                                                <------------>
                                                                 heater_width
<--------------------------------------------------------------------------------->
                                 slab_width
Return type

Component

import gdsfactory as gf

c = gf.components.straight_heater_doped_rib(length=320.0, nsections=3, via_stack_metal_size=(10.0, 10.0), via_stack_contact_size=(10.0, 10.0), via_stack_contact_yspacing=2.0, port_orientation_top=0, port_orientation_bot=180, taper_length=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-128.png

straight_heater_doped_strip

gdsfactory.components.straight_heater_doped_strip(length: float = 320.0, nsections: int = 3, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_200_3_0_optical_optical,)), *, cross_section_heater: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_doped>, via_stack_contact: Callable[[...], gdsfactory.component.Component] = functools.partial(<function via_stack>, layers=((1, 0), (24, 0), (41, 0)), vias=(None, None, functools.partial(<function via>, layer=(40, 0)))), via_stack_metal: Callable[[...], gdsfactory.component.Component] = functools.partial(<function via_stack>, layers=((41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), via_stack_metal_size: Tuple[float, float] = (10.0, 10.0), via_stack_contact_size: Tuple[float, float] = (10.0, 10.0), via_stack_contact_yspacing: float = 2.0, port_orientation_top: int = 0, port_orientation_bot: int = 180, taper: Optional[Callable[[...], gdsfactory.component.Component]] = <function taper_cross_section>, taper_length: float = 10.0, **kwargs)gdsfactory.component.Component

Returns a doped thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length – of the waveguide

  • nsections – between contacts

  • cross_section_heater – for the heater

  • via_stack_contact – function to connect the heated strip

  • via_stack_metal – function to connect the metal area

  • via_stack_metal_size

  • via_stack_contact_yspacing – spacing from waveguide to contact

  • port_orientation_top – for top contact

  • port_orientation_bot – for bottom contact

  • kwargs – cross_section settings

  • taper – optional taper

                      length
  <-------------------------------------------->
               length_section
     <--------------------------->
   length_contact
     <------->                             taper
     ______________________________________
   /|        |____________________|        |\
__/ |viastack|                    |        | \___
__  |        |                    |        |  ___cross_section
  \ | size   |____________________|        | /
   \|________|____________________|________|/

taper         cross_section_heater



                             |<------width------>|
                              ____________________  heater_gap                slab_gap
                             |                   |<----------->|               <-->
 ___ ________________________|                   |____________________________|___
|   |            |                 undoped Si                  |              |   |
|   |layer_heater|                 intrinsic region            |layer_heater  |   |
|___|____________|_____________________________________________|______________|___|
                                                                <------------>
                                                                 heater_width
<--------------------------------------------------------------------------------->
                                 slab_width
import gdsfactory as gf

c = gf.components.straight_heater_doped_strip(length=320.0, nsections=3, via_stack_metal_size=(10.0, 10.0), via_stack_contact_size=(10.0, 10.0), via_stack_contact_yspacing=2.0, port_orientation_top=0, port_orientation_bot=180, taper_length=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-129.png

straight_heater_metal

gdsfactory.components.straight_heater_metal(length: float = 320.0, length_undercut_spacing: float = 6.0, length_undercut: float = 30.0, length_straight_input: float = 15.0, cross_section_heater: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal>, cross_section_heater_undercut: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal_undercut>, *, with_undercut: bool = False, via_stack: Optional[Callable[[...], gdsfactory.component.Component]] = functools.partial(<function via_stack>, layers=((47, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), port_orientation1: int = 180, port_orientation2: int = 0, **kwargs)gdsfactory.component.Component

Returns a thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length – of the waveguide

  • length_undercut_spacing – from undercut regions

  • length_straight_input – from input port to where trenches start

  • cross_section_heater – for heated sections

  • cross_section_heater_undercut – for heated sections with undercut

  • with_undercut – isolation trenches for higher efficiency

  • via_stack – via stack

  • port_orientation1 – left via stack port orientation

  • port_orientation2 – right via stack port orientation

  • kwargs – cross_section common settings

import gdsfactory as gf

c = gf.components.straight_heater_metal(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight_input=15.0, with_undercut=False, port_orientation1=180, port_orientation2=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-130.png

straight_heater_metal_90_90

gdsfactory.components.straight_heater_metal_90_90(length: float = 320.0, length_undercut_spacing: float = 6.0, length_undercut: float = 30.0, length_straight_input: float = 15.0, cross_section_heater: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal>, cross_section_heater_undercut: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal_undercut>, *, with_undercut: bool = False, via_stack: Optional[Callable[[...], gdsfactory.component.Component]] = functools.partial(<function via_stack>, layers=((47, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), port_orientation1: int = 90, port_orientation2: int = 90, **kwargs)gdsfactory.component.Component

Returns a thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length – of the waveguide

  • length_undercut_spacing – from undercut regions

  • length_straight_input – from input port to where trenches start

  • cross_section_heater – for heated sections

  • cross_section_heater_undercut – for heated sections with undercut

  • with_undercut – isolation trenches for higher efficiency

  • via_stack – via stack

  • port_orientation1 – left via stack port orientation

  • port_orientation2 – right via stack port orientation

  • kwargs – cross_section common settings

import gdsfactory as gf

c = gf.components.straight_heater_metal_90_90(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight_input=15.0, with_undercut=False, port_orientation1=90, port_orientation2=90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-131.png

straight_heater_metal_undercut

gdsfactory.components.straight_heater_metal_undercut(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight_input=15.0, cross_section_heater=<cyfunction strip_heater_metal>, cross_section_heater_undercut=<cyfunction strip_heater_metal_undercut>, with_undercut=True, via_stack=functools.partial(<function via_stack>, layers=((47, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), port_orientation1=180, port_orientation2=0, **kwargs)[source]

Returns a thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length (float) – of the waveguide

  • length_undercut_spacing (float) – from undercut regions

  • length_straight_input (float) – from input port to where trenches start

  • cross_section_heater (Callable[…, CrossSection]) – for heated sections

  • cross_section_heater_undercut (Callable[…, CrossSection]) – for heated sections with undercut

  • with_undercut (bool) – isolation trenches for higher efficiency

  • via_stack (Optional[Callable[…, Component]]) – via stack

  • port_orientation1 (int) – left via stack port orientation

  • port_orientation2 (int) – right via stack port orientation

  • kwargs – cross_section common settings

Return type

Component

import gdsfactory as gf

c = gf.components.straight_heater_metal_undercut(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight_input=15.0, with_undercut=True, port_orientation1=180, port_orientation2=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-132.png

straight_heater_metal_undercut_90_90

gdsfactory.components.straight_heater_metal_undercut_90_90(length: float = 320.0, length_undercut_spacing: float = 6.0, length_undercut: float = 30.0, length_straight_input: float = 15.0, cross_section_heater: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal>, cross_section_heater_undercut: Callable[[...], gdsfactory.cross_section.CrossSection] = <cyfunction strip_heater_metal_undercut>, *, with_undercut: bool = False, via_stack: Optional[Callable[[...], gdsfactory.component.Component]] = functools.partial(<function via_stack>, layers=((47, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), port_orientation1: int = 90, port_orientation2: int = 90, **kwargs)gdsfactory.component.Component

Returns a thermal phase shifter. dimensions from https://doi.org/10.1364/OE.27.010456

Parameters
  • length – of the waveguide

  • length_undercut_spacing – from undercut regions

  • length_straight_input – from input port to where trenches start

  • cross_section_heater – for heated sections

  • cross_section_heater_undercut – for heated sections with undercut

  • with_undercut – isolation trenches for higher efficiency

  • via_stack – via stack

  • port_orientation1 – left via stack port orientation

  • port_orientation2 – right via stack port orientation

  • kwargs – cross_section common settings

import gdsfactory as gf

c = gf.components.straight_heater_metal_undercut_90_90(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight_input=15.0, with_undercut=False, port_orientation1=90, port_orientation2=90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-133.png

straight_pin

gdsfactory.components.straight_pin(length=500.0, cross_section=<function pin>, via_stack=functools.partial(<function via_stack>, layers=((3, 0), (41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(40, 0)), functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), via_stack_width=10.0, via_stack_spacing=2, port_orientation_top=0, port_orientation_bot=180, taper=<function taper_strip_to_ridge>, **kwargs)[source]

Returns PIN with contacts

https://doi.org/10.1364/OE.26.029983

500um length from https://ieeexplore.ieee.org/document/8268112

Parameters
  • length (float) – of the waveguide

  • cross_section (Callable[…, CrossSection]) – for the waveguide

  • via_stack (Callable[…, Component]) – for the contacts

  • via_stack_size

  • via_stack_spacing (float) – spacing between contacts

  • port_orientation_top (int) – for top contact

  • port_orientation_bot (int) – for bottom contact

  • taper (Optional[Callable[…, Component]]) – optional taper

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.straight_pin(length=500.0, via_stack_width=10.0, via_stack_spacing=2, port_orientation_top=0, port_orientation_bot=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-134.png

straight_pin_slot

gdsfactory.components.straight_pin_slot(length=500.0, cross_section=<function pin>, via_stack=functools.partial(<function via_stack>, layers=((41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), via_stack_slot=functools.partial(<function via_stack_slot>, layers=((41, 0), ), via=functools.partial(<function via>, layer=(40, 0))), via_stack_width=10.0, via_stack_spacing=2, port_orientation_top=0, port_orientation_bot=180, taper=<function taper_strip_to_ridge>, **kwargs)[source]

Returns PIN doped waveguide with contacts with slotted via

https://doi.org/10.1364/OE.26.029983

500um length from https://ieeexplore.ieee.org/document/8268112

Parameters
  • length (float) – of the waveguide

  • cross_section (Callable[…, CrossSection]) – for the waveguide

  • via_stack (Callable[…, Component]) – for the contacts

  • via_stack_size

  • via_stack_spacing (float) – spacing between contacts

  • port_orientation_top (int) – for top contact

  • port_orientation_bot (int) – for bottom contact

  • taper (Optional[Callable[…, Component]]) – optional taper

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.straight_pin_slot(length=500.0, via_stack_width=10.0, via_stack_spacing=2, port_orientation_top=0, port_orientation_bot=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-135.png

straight_pn

gdsfactory.components.straight_pn(length: float = 500.0, *, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = <function pn>, via_stack: Callable[[...], gdsfactory.component.Component] = functools.partial(<function via_stack>, layers=((3, 0), (41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(40, 0)), functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0)))), via_stack_width: float = 10.0, via_stack_spacing: float = 2, port_orientation_top: int = 0, port_orientation_bot: int = 180, taper: Optional[Callable[[...], gdsfactory.component.Component]] = <function taper_strip_to_ridge>, **kwargs)gdsfactory.component.Component

Returns PIN with contacts

https://doi.org/10.1364/OE.26.029983

500um length from https://ieeexplore.ieee.org/document/8268112

Parameters
  • length – of the waveguide

  • cross_section – for the waveguide

  • via_stack – for the contacts

  • via_stack_size

  • via_stack_spacing – spacing between contacts

  • port_orientation_top – for top contact

  • port_orientation_bot – for bottom contact

  • taper – optional taper

  • kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.straight_pn(length=500.0, via_stack_width=10.0, via_stack_spacing=2, port_orientation_top=0, port_orientation_bot=180)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-136.png

straight_rib

gdsfactory.components.straight_rib(length: float = 10.0, npoints: int = 2, with_cladding_box: bool = True, *, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_6000_3_0_optical_optical,)), **kwargs)gdsfactory.component.Component

Returns a Straight waveguide.

Parameters
  • length – straight length

  • npoints – number of points

  • with_cladding_box – square in layers_cladding to remove DRC

  • cross_section

  • **kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.straight_rib(length=10.0, npoints=2, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-137.png

straight_rib_tapered

gdsfactory.components.straight_rib_tapered(*, component: Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component] = functools.partial(<function straight>, cross_section=functools.partial(<cyfunction cross_section>, sections=(slab_6000_3_0_optical_optical,))), port_names: Optional[Tuple[str, ...]] = None, length: float = 5.0, extension_factory: Optional[Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component]] = <function taper_strip_to_ridge>, port1: Optional[str] = 'o2', port2: Optional[str] = 'o1', port_type: str = 'optical', centered: bool = False, **kwargs)gdsfactory.component.Component

Returns a new component with some ports extended it can accept an extension_factory or it defaults to the port width and layer of each extended port

Parameters
  • component – component to extend ports

  • port_names – specify an list of ports names, if None it extends all ports

  • length – extension length

  • extension_factory – function to extend ports (defaults to a straight)

  • port1 – input port name

  • port2 – output port name

  • port_type – type of the ports to extend

  • **kwargs

import gdsfactory as gf

c = gf.components.straight_rib_tapered(length=5.0, port1='o2', port2='o1', port_type='optical', centered=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-138.png

switch_tree

gdsfactory.components.switch_tree(*, coupler: Callable[[...], gdsfactory.component.Component] = functools.partial(<function mzi>, straight_x_top=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), length_x=320.0, combiner=<function mmi2x2>, delta_length=0), noutputs: int = 4, spacing: Tuple[float, float] = (500, 100), bend_s: Optional[Callable[[...], gdsfactory.component.Component]] = <function bend_s>, bend_s_xsize: Optional[float] = None, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>), **kwargs)gdsfactory.component.Component

Tree of power splitters.

Parameters
  • coupler – coupler factory

  • noutputs – number of outputs

  • spacing – x, y spacing between couplers

  • bend_s – Sbend library name or dict for termination

  • bend_s_xsize

  • cross_section – cross_section

  • bend_length – dx for the sbend

  • kwargs – cross_section settings

     __|
  __|  |__
_|  |__
 |__        dy

  dx
import gdsfactory as gf

c = gf.components.switch_tree(noutputs=4, spacing=(500, 100))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-139.png

taper

gdsfactory.components.taper(length=10.0, width1=0.5, width2=None, port=None, with_cladding_box=True, cross_section=functools.partial(<cyfunction cross_section>), **kwargs)[source]

Linear taper.

Parameters
  • length (float) –

  • width1 (float) – width of the west port

  • width2 (Optional[float]) – width of the east port

  • port (Optional[Port]) – can taper from a port instead of defining width1

  • with_cladding_box (bool) – to avoid DRC acute angle errors in cladding

  • cross_section (Callable[…, CrossSection]) –

  • kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.taper(width1=0.5, width2=5, length=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-140.png
Return type

Component

import gdsfactory as gf

c = gf.components.taper(length=10.0, width1=0.5, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-141.png

taper2

gdsfactory.components.taper2(length: float = 10.0, width1: float = 0.5, *, width2: Optional[float] = 3, port: Optional[gdsfactory.port.Port] = None, with_cladding_box: bool = True, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>), **kwargs)gdsfactory.component.Component

Linear taper.

Parameters
  • length

  • width1 – width of the west port

  • width2 – width of the east port

  • port – can taper from a port instead of defining width1

  • with_cladding_box – to avoid DRC acute angle errors in cladding

  • cross_section

  • kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.taper(width1=0.5, width2=5, length=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-142.png
import gdsfactory as gf

c = gf.components.taper2(length=10.0, width1=0.5, width2=3, with_cladding_box=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-143.png

taper_0p5_to_3_l36

gdsfactory.components.taper_0p5_to_3_l36(**kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.taper_0p5_to_3_l36()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-144.png

taper_cross_section_linear

gdsfactory.components.taper_cross_section_linear(cross_section1: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_200_3_0_optical_optical,)), cross_section2: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_6000_3_0_optical_optical,)), length: float = 10, *, npoints: int = 2, linear: bool = True, **kwargs)gdsfactory.component.Component

Returns taper transition between cross_section1 and cross_section2

Parameters
  • cross_section1 – start cross_section factory

  • cross_section2 – end cross_section factory

  • length – transition length

  • npoints – number of points

  • linear – shape of the transition, sine when False

  • kwargs – cross_section settings for section2

                    _____________________
                   /
           _______/______________________
                 /
cross_section1  |        cross_section2
           ______\_______________________
                  \
                   \_____________________
import gdsfactory as gf

c = gf.components.taper_cross_section_linear(length=10, npoints=2, linear=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-145.png

taper_cross_section_sine

gdsfactory.components.taper_cross_section_sine(cross_section1: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_200_3_0_optical_optical,)), cross_section2: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, sections=(slab_6000_3_0_optical_optical,)), length: float = 10, *, npoints: int = 101, linear: bool = False, **kwargs)gdsfactory.component.Component

Returns taper transition between cross_section1 and cross_section2

Parameters
  • cross_section1 – start cross_section factory

  • cross_section2 – end cross_section factory

  • length – transition length

  • npoints – number of points

  • linear – shape of the transition, sine when False

  • kwargs – cross_section settings for section2

                    _____________________
                   /
           _______/______________________
                 /
cross_section1  |        cross_section2
           ______\_______________________
                  \
                   \_____________________
import gdsfactory as gf

c = gf.components.taper_cross_section_sine(length=10, npoints=101, linear=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-146.png

taper_from_csv

gdsfactory.components.taper_from_csv(filepath=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/gdsfactory/checkouts/latest/gdsfactory/components/csv_data/taper_strip_0p5_3_36.csv'), layer=(1, 0), layer_cladding=(111, 0), cladding_offset=3.0, **kwargs)[source]
Parameters
  • filepath (Path) – for CSV file

  • layer (Tuple[int, int]) –

  • layer_cladding (Tuple[int, int]) –

  • cladding_offset (float) –

  • **kwargs – kwargs will be ignored

Return type

Component

import gdsfactory as gf

c = gf.components.taper_from_csv(layer=(1, 0), layer_cladding=(111, 0), cladding_offset=3.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-147.png

taper_strip_to_ridge

gdsfactory.components.taper_strip_to_ridge(length=10.0, width1=0.5, width2=0.5, w_slab1=0.15, w_slab2=6.0, layer_wg=(1, 0), layer_slab=(3, 0), with_slab_port=False, layers_cladding=None, cladding_offset=3.0)[source]

Linear taper from strip to rib

Parameters
  • length (float) –

  • width1 (float) –

  • width2 (float) –

  • w_slab1 (float) –

  • w_slab2 (float) –

  • layer_wg (Tuple[int, int]) –

  • layer_slab (Tuple[int, int]) –

  • with_slab_port (bool) – adds a wide slab port

  • layers_cladding (Optional[Tuple[Tuple[int, int], …]]) –

  • cladding_offset (float) –

               __________________________
              /           |
      _______/____________|______________
            /             |
width1     |w_slab1       | w_slab2  width2
      ______\_____________|______________
             \            |
              \__________________________
Return type

Component

import gdsfactory as gf

c = gf.components.taper_strip_to_ridge(length=10.0, width1=0.5, width2=0.5, w_slab1=0.15, w_slab2=6.0, layer_wg=(1, 0), layer_slab=(3, 0), with_slab_port=False, cladding_offset=3.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-148.png

taper_strip_to_ridge_trenches

gdsfactory.components.taper_strip_to_ridge_trenches(length=10.0, width=0.5, slab_offset=3.0, trench_width=2.0, trench_layer=(3, 0), layer_wg=(1, 0), trench_offset_after_wg=0.1)[source]
import gdsfactory as gf

c = gf.components.taper_strip_to_ridge_trenches(length=10.0, width=0.5, slab_offset=3.0, trench_width=2.0, trench_layer=(3, 0), layer_wg=(1, 0), trench_offset_after_wg=0.1)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-149.png

taper_w10_l100

gdsfactory.components.taper_w10_l100(**kwargs)[source]
import gdsfactory as gf

c = gf.components.taper_w10_l100()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-150.png

taper_w10_l150

gdsfactory.components.taper_w10_l150(**kwargs)[source]
import gdsfactory as gf

c = gf.components.taper_w10_l150()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-151.png

taper_w10_l200

gdsfactory.components.taper_w10_l200(**kwargs)[source]
import gdsfactory as gf

c = gf.components.taper_w10_l200()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-152.png

taper_w11_l200

gdsfactory.components.taper_w11_l200(**kwargs)[source]
import gdsfactory as gf

c = gf.components.taper_w11_l200()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-153.png

taper_w12_l200

gdsfactory.components.taper_w12_l200(**kwargs)[source]
import gdsfactory as gf

c = gf.components.taper_w12_l200()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-154.png

text

gdsfactory.components.text(text='abcd', size=10.0, position=(0, 0), justify='left', layer=(66, 0))[source]

Text shapes.

import gdsfactory as gf

c = gf.components.text(text="abcd", size=5, position=(0, 0), justify="left", layer=1)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-155.png
Return type

Component

import gdsfactory as gf

c = gf.components.text(text='abcd', size=10.0, position=(0, 0), justify='left', layer=(66, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-156.png

triangle

gdsfactory.components.triangle(x=10, y=20, layer=(1, 0))[source]
Parameters
  • x (float) – base

  • y (float) – height

  • layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.triangle(x=10, y=20, layer=(1, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-157.png

verniers

gdsfactory.components.verniers(widths=(0.1, 0.2, 0.3, 0.4, 0.5), gap=0.1, xsize=100, layer_label=(201, 0), **kwargs)[source]
Return type

Component

import gdsfactory as gf

c = gf.components.verniers(widths=(0.1, 0.2, 0.3, 0.4, 0.5), gap=0.1, xsize=100, layer_label=(201, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-158.png

version_stamp

gdsfactory.components.version_stamp(labels=('demo_label'), with_qr_code=False, layer=(1, 0), pixel_size=1, version='3.2.9', text_size=10)[source]

Component with module version and date.

Parameters

labels (Tuple[str, …]) – Iterable of labels

Return type

Component

import gdsfactory as gf

c = gf.components.version_stamp(labels=('demo_label',), with_qr_code=False, layer=(1, 0), pixel_size=1, version='3.2.7', text_size=10)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-159.png

via

gdsfactory.components.via(size=(0.7, 0.7), spacing=(2.0, 2.0), enclosure=1.0, layer=(40, 0), layers_cladding=None, cladding_offset=0)[source]

Rectangular via. Defaults to a square via.

Parameters
  • size (Tuple[float, float]) – in x, y direction

  • spacing (Tuple[float, float]) – pitch_x, pitch_y

  • enclosure (float) – inclusion of via

  • layer (Tuple[int, int]) – via layer

  • layers_cladding (Optional[Tuple[Tuple[int, int], …]]) –

  • cladding_offset (float) –

enclosure
_________________________________________
|<--->                                  |
|                      size[0]          |
|                      <----->          |
|      ______          ______           |
|     |      |        |      |          |
|     |      |        |      |  size[1] |
|     |______|        |______|          |
|      <------------->                  |
|         spacing[0]                    |
|_______________________________________|
Return type

Component

import gdsfactory as gf

c = gf.components.via(size=(0.7, 0.7), spacing=(2.0, 2.0), enclosure=1.0, layer=(40, 0), cladding_offset=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-160.png

via1

gdsfactory.components.via1(size: Tuple[float, float] = (0.7, 0.7), spacing: Tuple[float, float] = (2.0, 2.0), *, enclosure: float = 2, layer: Tuple[int, int] = (44, 0), layers_cladding: Optional[Tuple[Tuple[int, int], ...]] = None, cladding_offset: float = 0)gdsfactory.component.Component

Rectangular via. Defaults to a square via.

Parameters
  • size – in x, y direction

  • spacing – pitch_x, pitch_y

  • enclosure – inclusion of via

  • layer – via layer

  • layers_cladding

  • cladding_offset

enclosure
_________________________________________
|<--->                                  |
|                      size[0]          |
|                      <----->          |
|      ______          ______           |
|     |      |        |      |          |
|     |      |        |      |  size[1] |
|     |______|        |______|          |
|      <------------->                  |
|         spacing[0]                    |
|_______________________________________|
import gdsfactory as gf

c = gf.components.via1(size=(0.7, 0.7), spacing=(2.0, 2.0), enclosure=2, layer=(44, 0), cladding_offset=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-161.png

via2

gdsfactory.components.via2(size: Tuple[float, float] = (0.7, 0.7), spacing: Tuple[float, float] = (2.0, 2.0), enclosure: float = 1.0, *, layer: Tuple[int, int] = (43, 0), layers_cladding: Optional[Tuple[Tuple[int, int], ...]] = None, cladding_offset: float = 0)gdsfactory.component.Component

Rectangular via. Defaults to a square via.

Parameters
  • size – in x, y direction

  • spacing – pitch_x, pitch_y

  • enclosure – inclusion of via

  • layer – via layer

  • layers_cladding

  • cladding_offset

enclosure
_________________________________________
|<--->                                  |
|                      size[0]          |
|                      <----->          |
|      ______          ______           |
|     |      |        |      |          |
|     |      |        |      |  size[1] |
|     |______|        |______|          |
|      <------------->                  |
|         spacing[0]                    |
|_______________________________________|
import gdsfactory as gf

c = gf.components.via2(size=(0.7, 0.7), spacing=(2.0, 2.0), enclosure=1.0, layer=(43, 0), cladding_offset=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-162.png

via_cutback

gdsfactory.components.via_cutback(num_vias=100, wire_width=10, via_width=15, via_spacing=40, pad_size=(300, 300), min_pad_spacing=0, pad_layer=(49, 0), wiring1_layer=(47, 0), wiring2_layer=(41, 0), via_layer=(40, 0))[source]

Via cutback to extract via resistance

adapted from phidl.geometry

Parameters
  • num_vias (Union[float, int]) – total requested vias needs to be even

  • wire_width (Union[float, int]) – width of wire

  • via_width (Union[float, int]) – width of via

  • via_spacing (Union[float, int]) – via_spacing

  • pad_size (Tuple[Union[float, int], Union[float, int]]) – (width, height)

  • min_pad_spacing (Union[float, int]) –

  • pad_layer (Tuple[int, int]) –

  • wiring1_layer (Tuple[int, int]) – top wiring

  • wiring2_layer (Tuple[int, int]) – bottom wiring

  • via_layer (Tuple[int, int]) –

Return type

Component

import gdsfactory as gf

c = gf.components.via_cutback(num_vias=100, wire_width=10, via_width=15, via_spacing=40, pad_size=(300, 300), min_pad_spacing=0, pad_layer=(49, 0), wiring1_layer=(47, 0), wiring2_layer=(41, 0), via_layer=(40, 0))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-163.png

via_stack

gdsfactory.components.via_stack(size=(11.0, 11.0), layers=((41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0))), layer_port=None)[source]

Rectangular via_stack

Parameters
  • size (Tuple[float, float]) – of the layers

  • layers (Tuple[Tuple[int, int], …]) – layers on which to draw rectangles

  • vias (Optional[Tuple[Union[Callable[…, Component], Component, None], …]]) – vias to use to fill the rectangles

  • layer_port (Optional[Tuple[int, int]]) – if None asumes port is on the last layer

Return type

Component

import gdsfactory as gf

c = gf.components.via_stack(size=(11.0, 11.0), layers=((41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via at 0x7ff2263d0310>, layer=(44, 0), enclosure=2), functools.partial(<function via at 0x7ff2263d0310>, layer=(43, 0))))
c.plot()

(Source code)

via_stack_heater

gdsfactory.components.via_stack_heater(size: Tuple[float, float] = (11.0, 11.0), *, layers: Tuple[Tuple[int, int], ...] = ((47, 0), (45, 0), (49, 0)), vias: Optional[Tuple[Optional[Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component]], ...]] = (functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0))), layer_port: Optional[Tuple[int, int]] = None)gdsfactory.component.Component

Rectangular via_stack

Parameters
  • size – of the layers

  • layers – layers on which to draw rectangles

  • vias – vias to use to fill the rectangles

  • layer_port – if None asumes port is on the last layer

import gdsfactory as gf

c = gf.components.via_stack_heater(size=(11.0, 11.0), layers=((47, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via at 0x7ff2263d0310>, layer=(44, 0), enclosure=2), functools.partial(<function via at 0x7ff2263d0310>, layer=(43, 0))))
c.plot()

(Source code)

via_stack_slab

gdsfactory.components.via_stack_slab(size: Tuple[float, float] = (11.0, 11.0), *, layers: Tuple[Tuple[int, int], ...] = ((3, 0), (41, 0), (45, 0), (49, 0)), vias: Optional[Tuple[Optional[Union[Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component]], ...]] = (functools.partial(<function via>, layer=(40, 0)), functools.partial(<function via>, layer=(44, 0), enclosure=2), functools.partial(<function via>, layer=(43, 0))), layer_port: Optional[Tuple[int, int]] = None)gdsfactory.component.Component

Rectangular via_stack

Parameters
  • size – of the layers

  • layers – layers on which to draw rectangles

  • vias – vias to use to fill the rectangles

  • layer_port – if None asumes port is on the last layer

import gdsfactory as gf

c = gf.components.via_stack_slab(size=(11.0, 11.0), layers=((3, 0), (41, 0), (45, 0), (49, 0)), vias=(functools.partial(<function via at 0x7ff2263d0310>, layer=(40, 0)), functools.partial(<function via at 0x7ff2263d0310>, layer=(44, 0), enclosure=2), functools.partial(<function via at 0x7ff2263d0310>, layer=(43, 0))))
c.plot()

(Source code)

via_stack_slot

gdsfactory.components.via_stack_slot(size=(11.0, 11.0), layers=((41, 0), (45, 0)), layer_offsets=(0, 1.0), layer_port=None, via=functools.partial(<function via>, layer=(44, 0), enclosure=2), enclosure=1.0, ysize=0.5, yspacing=2.0)[source]

Rectangular via_stack with slotted via in X direction

Parameters
  • size (Tuple[float, float]) – of the layers

  • layers (Tuple[Tuple[int, int], …]) – layers on which to draw rectangles

  • layer_offsets (Tuple[float, …]) – cladding_offset for each layer

  • layer_port (Optional[Tuple[int, int]]) – if None asumes port is on the last layer

  • via (Union[Callable[…, Component], Component]) – via to use to fill the rectangles

  • enclosure (float) – of the via by rectangle

  • ysize (float) – via height in y

  • yspacing (float) – via spacing pitch in y

enclosure
_____________________________________
|<--->                              |
|      ______________________       |
|     |                      |      |
|     |                      | ysize|
|     |______________________|      |
|  |                                |
|  | yspacing                       |
|  |                                |
|  |   ______________________       |
|  |  |                      |      |
|  |  |                      | ysize|
|  |  |______________________|      |
|                                   |
|___________________________________|
                size[0]
Return type

Component

import gdsfactory as gf

c = gf.components.via_stack_slot(size=(11.0, 11.0), layers=((41, 0), (45, 0)), layer_offsets=(0, 1.0), enclosure=1.0, ysize=0.5, yspacing=2.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-167.png

via_stack_with_offset

gdsfactory.components.via_stack_with_offset(layers=((25, 0), (41, 0)), sizes=((10, 10), (10, 10)), vias=(None, functools.partial(<function via>, layer=(40, 0))), offsets=None, port_orientation=180)[source]

Rectangular transition thru metal layers with offset between layers

Parameters
  • layers (Tuple[Tuple[int, int], …]) –

  • vias (Tuple[Union[Callable[…, Component], Component, None], …]) – factory for via or None for no via

  • sizes (Tuple[Tuple[float, float], …]) –

  • offsets (Optional[Tuple[float, …]]) – for next layer

  • port_orientation (int) – 180: W0, 0: E0, 90: N0, 270: S0

Return type

Component

import gdsfactory as gf

c = gf.components.via_stack_with_offset(layers=((25, 0), (41, 0)), sizes=((10, 10), (10, 10)), vias=(None, functools.partial(<function via at 0x7ff2263d0310>, layer=(40, 0))), port_orientation=180)
c.plot()

(Source code)

viac

gdsfactory.components.viac(size: Tuple[float, float] = (0.7, 0.7), spacing: Tuple[float, float] = (2.0, 2.0), enclosure: float = 1.0, *, layer: Tuple[int, int] = (40, 0), layers_cladding: Optional[Tuple[Tuple[int, int], ...]] = None, cladding_offset: float = 0)gdsfactory.component.Component

Rectangular via. Defaults to a square via.

Parameters
  • size – in x, y direction

  • spacing – pitch_x, pitch_y

  • enclosure – inclusion of via

  • layer – via layer

  • layers_cladding

  • cladding_offset

enclosure
_________________________________________
|<--->                                  |
|                      size[0]          |
|                      <----->          |
|      ______          ______           |
|     |      |        |      |          |
|     |      |        |      |  size[1] |
|     |______|        |______|          |
|      <------------->                  |
|         spacing[0]                    |
|_______________________________________|
import gdsfactory as gf

c = gf.components.viac(size=(0.7, 0.7), spacing=(2.0, 2.0), enclosure=1.0, layer=(40, 0), cladding_offset=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-169.png

wire_corner

gdsfactory.components.wire_corner(cross_section=functools.partial(<cyfunction cross_section>, layer=(49, 0), width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')), **kwargs)[source]

90 degrees electrical corner

Parameters
  • waveguide

  • kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.wire_corner()
c.plot()

(Source code, png, hires.png, pdf)

_images/components-170.png

wire_sbend

gdsfactory.components.wire_sbend(dx=20.0, dy=10.0, **kwargs)[source]

Sbend corner with manhattan wires

Parameters
  • dx (float) – length

  • dy (float) – height

  • **kwargs – cross_section settings

Return type

Component

import gdsfactory as gf

c = gf.components.wire_sbend(dx=20.0, dy=10.0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-171.png

wire_straight

gdsfactory.components.wire_straight(length: float = 10.0, npoints: int = 2, *, with_cladding_box: bool = False, cross_section: Callable[[...], gdsfactory.cross_section.CrossSection] = functools.partial(<cyfunction cross_section>, layer=(49, 0), width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')), **kwargs)gdsfactory.component.Component

Returns a Straight waveguide.

Parameters
  • length – straight length

  • npoints – number of points

  • with_cladding_box – square in layers_cladding to remove DRC

  • cross_section

  • **kwargs – cross_section settings

import gdsfactory as gf

c = gf.components.wire_straight(length=10.0, npoints=2, with_cladding_box=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-172.png