Waveguides & Waveguide Templates

Waveguide Template

Waveguide template objects are used to define a standard set of parameters (width, cladding, layers, etc.) that is passed to waveguide routes and PICwriter components.

class picwriter.components.WaveguideTemplate(wg_type=u'strip', bend_radius=50.0, waveguide_stack=None, wg_width=2.0, clad_width=10.0, grid=0.001, resist=u'+', fab=u'ETCH', slot=0.1, period=0.1, duty_cycle=0.5, wg_layer=1, wg_datatype=0, clad_layer=2, clad_datatype=0, euler_bend=False)

Template for waveguides that contains standard information about the geometry and fabrication. Supported waveguide types are strip (also known as ‘channel’ waveguides), slot, and SWG (‘sub-wavelength grating’, or 1D photonic crystal waveguides).

Keyword Args:
  • wg_type (string): Type of waveguide used. Options are ‘strip’, ‘slot’, and ‘swg’. Defaults to ‘strip’.
  • bend_radius (float): Radius of curvature for waveguide bends (circular). Defaults to 50.
  • waveguide_stack (list): List of layers and path widths to be drawn when waveguides are routed & placed. Format is ‘[[width1, (layer1, datatype1)], [width2, (layer2, datatype2)], …]’. The first element defines the main waveguide width & layer for slot and subwavelength gratings. If using waveguide_stack, the following keyword arguments are ignored: wg_width, clad_width, wg_layer, wg_datatype, clad_layer, clad_datatype. Defaults to [[2.0, (1,0)], [10.0, (2,0)]].
  • wg_width (float): Width of the waveguide as shown on the mask. Defaults to 2.
  • euler_bend (boolean): If True, uses Euler bends to route waveguides. Defaults to False. Currently only works with slot and strip waveguides. The given bend_radius value determines the smallest bend radius along the entire Euler curve.
  • slot (float): Size of the waveguide slot region. This is only used if wg_type`=’slot’`. Defaults to 0.1.
  • period (float): Period of the SWG. This is only used if wg_type`=’swg’`. Defaults to 0.1.
  • duty_cycle (float): Duty cycle of the SWG. This is only used if wg_type`=’swg’`. Defaults to 0.5.
  • clad_width (float): Width of the cladding (region next to waveguide, mainly used for positive-type photoresists + etching, or negative-type and liftoff). Defaults to 10.
  • grid (float): Defines the grid spacing in units of microns, so that the number of points per bend can be automatically calculated. Defaults to 0.001 (1 nm).
  • resist (string): Must be either ‘+’ or ‘-‘. Specifies the type of photoresist used. Defaults to ‘+’
  • fab (string): If ‘ETCH’, then keeps resist as is, otherwise changes it from ‘+’ to ‘-‘ (or vice versa). This is mainly used to reverse the type of mask used if the fabrication type is ‘LIFTOFF’. Defaults to ‘ETCH’.
  • wg_layer (int): Layer type used for waveguides. Defaults to 1.
  • wg_datatype (int): Data type used for waveguides. Defaults to 0.
  • clad_layer (int): Layer type used for cladding. Defaults to 2.
  • clad_datatype (int): Data type used for cladding. Defaults to 0.
../_images/waveguides.png ../_images/waveguide_zoom.png

Example usage:

To generate a strip waveguide template with 1.0um width and 25.0um bending radius:

wgt= WaveguideTemplate(wg_type='strip', wg_width=1.0, bend_radius=25)

To generate a slot waveguide with 1.0um width, 25.0um bending radius, and a 0.3um slot in the center:

wgt = WaveguideTemplate(wg_type='slot', wg_width=1.0, bend_radius=25.0, slot=0.3)

To generate a sub-wavelength grating waveguide with 1.0um width, 25.0um bending radius, 50% duty-cycle, and a 1um period:

wgt= WaveguideTemplate(wg_type='swg', wg_width=1.0, bend_radius=25, duty_cycle=0.50, period=1.0)

Waveguides

Waveguide objects are fully defined by a WaveguideTemplate object as well as a list of (x,y) points that determine where the waveguide is routed.

class picwriter.components.Waveguide(trace, wgt)

Waveguide Cell class.

Args:
  • trace (list): List of coordinates used to generate the waveguide (such as ‘[(x1,y1), (x2,y2), …]’).
  • wgt (WaveguideTemplate): WaveguideTemplate object
Members:
  • portlist (dict): Dictionary with the relevant port information
Portlist format:
  • portlist[‘input’] = {‘port’: (x1,y1), ‘direction’: ‘dir1’}
  • portlist[‘output’] = {‘port’: (x2, y2), ‘direction’: ‘dir2’}

Where in the above (x1,y1) are the first elements of ‘trace’, (x2, y2) are the last elements of ‘trace’, and ‘dir1’, ‘dir2’ are of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, or an angle in radians. ‘Direction’ points towards the component that the waveguide will connect to.

Example usage to generate a waveguide with waypoints:

top = gdspy.Cell('top')
wgt= WaveguideTemplate(wg_type='strip', wg_width=1.0, bend_radius=25)
waypoints = [(0, 0), (200, 0), (250, 100), (400, 100)]
wg = Waveguide(waypoints, wgt)
tk.add(top, wg)
gdspy.LayoutViewer()

Bends

Euler Bends

class picwriter.components.EBend(wgt, turnby, start_width=None, end_width=None, port=(0, 0), direction=u'EAST', vertex=None)

Euler shaped Bend Cell class. Creates a generic Euler waveguide bend that can be used in waveguide routing. The number of points is computed based on the waveguide template grid resolution to automatically minimize grid errors. This class can be automatically called and implemented during waveguide routing by passing euler_bend=True to a WaveguideTemplate object. The smallest radius of curvature on the Euler bend is set to be the bend_radius value given by the WaveguideTemplate object passed to this class.

Args:
  • wgt (WaveguideTemplate): WaveguideTemplate object. Bend radius is extracted from this object.
  • turnby (float): Angle in radians, must be between +np.pi and -np.pi. It’s not recommended that you give a value of np.pi (for 180 bends) as this will result in divergent trig identities. Instead, use two bends with turnby=Pi/2.
Keyword Args:
  • start_width (float): If a value is provided, overrides the initial waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • end_width (float): If a value is provided, overrides the final waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • port (tuple): Cartesian coordinate of the input port. Defaults to (0,0).
  • direction (string): Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)
  • vertex (tuple): If a value for vertex is given (Cartesian x,y coordinate), then the Euler bend is placed at this location, bypassing the normal port value. This is used in waypoint routing.
Members:
  • portlist (dict): Dictionary with the relevant port information
Portlist format:
  • portlist[‘input’] = {‘port’: (x1,y1), ‘direction’: ‘dir1’}
  • portlist[‘output’] = {‘port’: (x2, y2), ‘direction’: ‘dir2’}

Where in the above (x1,y1) is the same as the ‘port’ input, (x2, y2) is the end of the taper, and ‘dir1’, ‘dir2’ are of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, or an angle in radians. ‘Direction’ points towards the waveguide that will connect to it.

get_bend_length()

Returns the length of the Euler curve

../_images/ebend.png

Euler S-Bends

class picwriter.components.EulerSBend(wgt, length, height, start_width=None, end_width=None, port=(0, 0), direction=u'EAST')

Euler shaped S-Bend Cell class. Creates an S-shaped Euler waveguide bend that can be used in waveguide routing (in place of the sinusoidal S-Bend). The number of points is computed based on the waveguide template grid resolution to automatically minimize grid errors.

Args:
  • wgt (WaveguideTemplate): WaveguideTemplate object. Bend radius is extracted from this object.
  • height (float): Height of the Euler S-Bend
  • length (float): Length of the Euler S-Bend
Keyword Args:
  • start_width (float): If a value is provided, overrides the initial waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • end_width (float): If a value is provided, overrides the final waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • port (tuple): Cartesian coordinate of the input port. Defaults to (0,0).
  • direction (string): Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)
Members:
  • portlist (dict): Dictionary with the relevant port information
Portlist format:
  • portlist[‘input’] = {‘port’: (x1,y1), ‘direction’: ‘dir1’}
  • portlist[‘output’] = {‘port’: (x2, y2), ‘direction’: ‘dir2’}

Where in the above (x1,y1) is the same as the ‘port’ input, (x2, y2) is the end of the taper, and ‘dir1’, ‘dir2’ are of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, or an angle in radians. ‘Direction’ points towards the waveguide that will connect to it.

get_bend_length()

Returns the length of the Euler S-Bend

get_radius_of_curvature()

Returns the minimum radius of curvature used to construct the Euler S-Bend

../_images/esbend.png

Sinusoidal S-bends

class picwriter.components.SBend(wgt, length, height, port=(0, 0), direction=u'EAST')

Sinusoidal S-shaped Bend Cell class. Creates a sinusoidal waveguide bend that can be used in waveguide routing. The number of points is computed based on the waveguide template grid resolution to automatically minimize grid errors.

Args:
  • wgt (WaveguideTemplate): WaveguideTemplate object
  • length (float): Length of the S-bend
  • height (float): Height of the S-bend
Keyword Args:
  • port (tuple): Cartesian coordinate of the input port. Defaults to (0,0).
  • direction (string): Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)
Members:
  • portlist (dict): Dictionary with the relevant port information
Portlist format:
  • portlist[‘input’] = {‘port’: (x1,y1), ‘direction’: ‘dir1’}
  • portlist[‘output’] = {‘port’: (x2, y2), ‘direction’: ‘dir2’}

Where in the above (x1,y1) is the same as the ‘port’ input, (x2, y2) is the end of the taper, and ‘dir1’, ‘dir2’ are of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, or an angle in radians. ‘Direction’ points towards the waveguide that will connect to it.

../_images/sbend.png

Bezier curves

class picwriter.components.BBend(wgt, poles, start_width=None, end_width=None)

Bezier Cell class. Creates a Bezier waveguide bend that can be used in waveguide routing. The number of points is computed based on the waveguide template grid resolution to automatically minimize grid errors.

See https://en.wikipedia.org/wiki/Bezier_curve for more information.

Args:
  • wgt (WaveguideTemplate): WaveguideTemplate object
  • poles (list): List of (x,y) pole coordinates used for routing the Bezier curve
Keyword Args:
  • start_width (float): If a value is provided, overrides the initial waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • end_width (float): If a value is provided, overrides the final waveguide width (otherwise the width is taken from the WaveguideTemplate object). Currently only works for strip waveguides.
  • port (tuple): Cartesian coordinate of the input port. Defaults to (0,0).
  • direction (string): Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians)
Members:
  • portlist (dict): Dictionary with the relevant port information
Portlist format:
  • portlist[‘input’] = {‘port’: (x1,y1), ‘direction’: ‘dir1’}
  • portlist[‘output’] = {‘port’: (x2, y2), ‘direction’: ‘dir2’}

Where in the above (x1,y1) is the same as the ‘port’ input, (x2, y2) is the end of the taper, and ‘dir1’, ‘dir2’ are of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, or an angle in radians. ‘Direction’ points towards the waveguide that will connect to it.

../_images/bbend.png