Transitions

Transitions between two trace templates are derived from the base class TraceTransition. Linear, parabolic and exponential transitions are defined. The polygon discretization is uniformly performed with respect to the width of the trace, with steps along the axis of propagation taken to match these widths. So, the transitions work with the inverse of the function \(width=f(x)\) with \(x\) the axis of the transition and \(f\) linear, parabolic or exponential.

class ipkiss3.all.LinearWindowTraceTransition

Linear transition between two window trace templates

Parameters:
end_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

second window trace template

start_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

first window trace template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

Examples

import ipkiss3.all as i3
from ipkiss3.pcell.trace.window_trace import WindowTraceTemplate
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss.primitives.layer import Layer

# Windows
windows1 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.6, end_offset=1.0),
    PathTraceWindow(layer=Layer(1), start_offset=-0.6, end_offset=-1.0),
    PathTraceWindow(layer=Layer(2), start_offset=-1.5, end_offset=1.5),
]
windows2 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.2, end_offset=1.7),
    PathTraceWindow(layer=Layer(1), start_offset=-0.2, end_offset=-1.7),
    PathTraceWindow(layer=Layer(2), start_offset=-2.0, end_offset=2.0),
]

# Trace Templates
tt1 = WindowTraceTemplate(name="tt1")
tt1.Layout(windows=windows1)
tt2 = WindowTraceTemplate(name="tt2")
tt2.Layout(windows=windows2)

# linear transition
trans_lin = i3.LinearWindowTraceTransition(start_trace_template=tt1, end_trace_template=tt2)
trans_lin_lay = trans_lin.Layout(start_position=(0.0, 0.0), end_position=(10.0, 0.0))

trans_lin_lay.visualize(annotate=True)
../../../_images/transition-1.png
class ipkiss3.all.ParabolicWindowTraceTransition

Parabolic transition between two window trace templates

Parameters:
end_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

second window trace template

start_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

first window trace template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

width_step: float and number > 0

discretisation in width for the parabolic shapes

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

Examples

import ipkiss3.all as i3
from ipkiss3.pcell.trace.window_trace import WindowTraceTemplate
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss.primitives.layer import Layer

# Windows
windows1 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.6, end_offset=1.0),
    PathTraceWindow(layer=Layer(1), start_offset=-0.6, end_offset=-1.0),
    PathTraceWindow(layer=Layer(2), start_offset=-1.5, end_offset=1.5),
]
windows2 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.2, end_offset=1.7),
    PathTraceWindow(layer=Layer(1), start_offset=-0.2, end_offset=-1.7),
    PathTraceWindow(layer=Layer(2), start_offset=-2.0, end_offset=2.0),
]

# Trace Templates
tt1 = WindowTraceTemplate(name="tt1")
tt1.Layout(windows=windows1)
tt2 = WindowTraceTemplate(name="tt2")
tt2.Layout(windows=windows2)

# parabolic transition
trans_par = i3.ParabolicWindowTraceTransition(start_trace_template=tt1, end_trace_template=tt2)
trans_par_lay = trans_par.Layout(start_position=(0.0, 0.0), end_position=(5.0, 2.0))

trans_par_lay.visualize(annotate=True)
../../../_images/transition-2.png
class ipkiss3.all.ExponentialWindowTraceTransition

Exponential transition between two window trace templates

Parameters:
end_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

second window trace template

start_trace_template: PCell and _TraceTemplate and WindowTraceTemplate

first window trace template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

g: float and Real, number and number >= 0

Exponential growth constant. Defaults to ln(max_width/min_width)

width_step: float and number > 0

discretisation in width for the parabolic shapes

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

Examples

import ipkiss3.all as i3
from ipkiss3.pcell.trace.window_trace import WindowTraceTemplate
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss.primitives.layer import Layer

# Windows
windows1 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.6, end_offset=1.0),
    PathTraceWindow(layer=Layer(1), start_offset=-0.6, end_offset=-1.0),
    PathTraceWindow(layer=Layer(2), start_offset=-1.5, end_offset=1.5),
]
windows2 = [
    PathTraceWindow(layer=Layer(0), start_offset=0.2, end_offset=1.7),
    PathTraceWindow(layer=Layer(1), start_offset=-0.2, end_offset=-1.7),
    PathTraceWindow(layer=Layer(2), start_offset=-2.0, end_offset=2.0),
]

# Trace Templates
tt1 = WindowTraceTemplate(name="tt1")
tt1.Layout(windows=windows1)
tt2 = WindowTraceTemplate(name="tt2")
tt2.Layout(windows=windows2)

# exponential transition
trans_exp = i3.ExponentialWindowTraceTransition(start_trace_template=tt1, end_trace_template=tt2)
trans_exp_lay = trans_exp.Layout(start_position=(0.0, 0.0), end_position=(5.0, 2.0))

trans_exp_lay.visualize(annotate=True)
../../../_images/transition-3.png

Waveguide transitions

The photonic implementation of trace transitions are waveguide transitions, also called tapers or mode converters.

class ipkiss3.all.LinearWindowWaveguideTransition

Linear waveguide transition (taper) for window waveguide templates

Parameters:
end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2])
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2])

t = i3.LinearWindowWaveguideTransition(start_trace_template=wt1, end_trace_template=wt2)

t_lay = t.Layout(start_position=(0.0, 0.0), end_position=(5.0, 0.0))
t_lay.visualize(annotate=True)
../../../_images/transition-4.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

class ipkiss3.all.ParabolicWindowWaveguideTransition

Parabolic waveguide transition (taper) for window waveguide templates

Parameters:
end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2])
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2])

tp = i3.ParabolicWindowWaveguideTransition(start_trace_template=wt1, end_trace_template=wt2)

tp_lay = tp.Layout(start_position=(0.0, 0.0), end_position=(5.0, 0.0))
tp_lay.visualize(annotate=True)
../../../_images/transition-5.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

width_step: float and number > 0

discretisation in width for the parabolic shapes

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

class ipkiss3.all.ExponentialWindowWaveguideTransition

Exponential waveguide transition (taper) for window waveguide templates

Parameters:
end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2], core_width=0.2)
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2], core_width=0.8)

tp = i3.ExponentialWindowWaveguideTransition(start_trace_template=wt1, end_trace_template=wt2)

tp_lay = tp.Layout(start_position=(0.0, 0.0), end_position=(5.0, 0.0))
tp_lay.visualize(annotate=True)
../../../_images/transition-6.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

g: float and Real, number and number >= 0

Exponential growth constant. Defaults to ln(max_width/min_width)

width_step: float and number > 0

discretisation in width for the parabolic shapes

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

Other Parameters:
length: float and Real, number and number >= 0, locked

length of the transition

Waveguide transitions starting from a port

Transitions starting from a port of a PCell. Given a length, the transition properties are calculated using the trace template, position and angle given by the start port.

class ipkiss3.all.LinearWindowWaveguideTransitionFromPort

Linear waveguide transition (taper) starting from a port with a window waveguide template

Parameters:
start_port: _PortInterface

the port on which to extract trace template, position and angle

end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2])
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2])

class ExampleCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_ports(self, ports):
            return i3.OpticalPort(name="out", position=(0.0, 0.0), angle=30.0, trace_template=wt1)

example_cell = ExampleCell(name="example_cell_linearpt")

t = i3.LinearWindowWaveguideTransitionFromPort(start_port=(example_cell, "out"), end_trace_template=wt2)

t_lay = t.Layout(length=20.0)
t_lay.visualize(annotate=True)
../../../_images/transition-7.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

length: float and Real, number and number >= 0

length of the transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

class ipkiss3.all.ParabolicWindowWaveguideTransitionFromPort

Parabolic transition (taper) starting from a port with a window waveguide template

Parameters:
start_port: _PortInterface

the port on which to extract trace template, position and angle

end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2])
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2])

class ExampleCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_ports(self, ports):
            return i3.OpticalPort(name="out", position=(0.0, 0.0), angle=30.0, trace_template=wt1)

example_cell = ExampleCell(name="example_cell_parabolicpt")

t = i3.ParabolicWindowWaveguideTransitionFromPort(start_port=(example_cell, "out"), end_trace_template=wt2)

t_lay = t.Layout(length=5.0)
t_lay.visualize(annotate=True)
../../../_images/transition-8.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

width_step: float and number > 0

discretisation in width for the parabolic shapes

length: float and Real, number and number >= 0

length of the transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

class ipkiss3.all.ExponentialWindowWaveguideTransitionFromPort

Exponential transition (taper) starting from a port with a window waveguide template

Parameters:
start_port: _PortInterface

the port on which to extract trace template, position and angle

end_trace_template: PCell and _WaveguideTemplate

second waveguide template

start_trace_template: PCell and _WaveguideTemplate

first waveguide template

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

Examples

import ipkiss3.all as i3

wstart1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.1, end_offset=0.1)
wstart2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)
wend1 = i3.PathTraceWindow(layer=i3.Layer(0), start_offset=-0.4, end_offset=0.4)
wend2 = i3.PathTraceWindow(layer=i3.Layer(1), start_offset=-3, end_offset=3)

wt1 = i3.WindowWaveguideTemplate()
wt1.Layout(windows=[wstart1, wstart2], core_width=0.2)
wt2 = i3.WindowWaveguideTemplate()
wt2.Layout(windows=[wend1, wend2], core_width=0.8)

class ExampleCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_ports(self, ports):
            return i3.OpticalPort(name="out", position=(0.0, 0.0), angle=30.0, trace_template=wt1)

example_cell = ExampleCell(name="example_cell_exponentialpt")

t = i3.ExponentialWindowWaveguideTransitionFromPort(start_port=(example_cell, "out"), end_trace_template=wt2)

t_lay = t.Layout(length=5.0, g=3)
t_lay.visualize(annotate=True)
../../../_images/transition-9.png

Views

class Layout
Parameters:
straight_extension: Coord2 and number >= 0

tuple: straight extension at start and end of transition

g: float and Real, number and number >= 0

Exponential growth constant. Defaults to ln(max_width/min_width)

width_step: float and number > 0

discretisation in width for the parabolic shapes

length: float and Real, number and number >= 0

length of the transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view

AutoTraceTransitionFromPort

AutoTraceTransitions work with an AutoTransitionDatabase that links combinations of trace templates with a transition class used to connect them.

class ipkiss3.all.AutoTransitionDatabase

AutoTransitionDatabase is a database that manages combinations of trace templates with transitions (tapers, converters) that can connect them. Use the add method to add a transition to the database. Use get_transition_class to extract a transition form the database.

Parameters:
default_if_identical: optional

Transition which is used if no match is found and the trace_templates are identical.

default: optional

Transition which is used if no match is found.

indirection_table: optional

Lookup table that matches a trace templates to another trace template of which the transitions are going to be used. Use treat_trace_template_as to add a pair of trace templates to that list.

lookup_table: optional

Lookup table that contains the combinations of trace templates and matching transition classes.It is not recommended to set this object directly when creating your own database. Instead, use the add method.

Examples

from ipkiss3.pcell.trace.transitions.auto_transition.auto_transition_db import AutoTransitionDatabase
from ipkiss3.pcell.trace.trace import TraceTemplate
from ipkiss3.pcell.trace.transition import TraceTransitionFromPort

tdb = AutoTransitionDatabase()

# Trace template 1
class TraceTemplate1(TraceTemplate):
    pass

# Trace template 2
class TraceTemplate2(TraceTemplate):
    pass

# Trace that will use indirection
class TraceTemplateInderection(TraceTemplate):
    pass

# Trace not represented in the db
class TraceTemplateNotInDb(TraceTemplate):
    pass

# Transition 1
class Transition1(TraceTransitionFromPort):
    pass

# Transition 2
class Transition2(TraceTransitionFromPort):
    pass

# Transition used when not in database and not identical
class TransitionDefault(TraceTransitionFromPort):
    pass

# Transition used when not in database and identical
class TransitionDefaultIndentical(TraceTransitionFromPort):
    pass

tdb = AutoTransitionDatabase(default=TransitionDefault, default_if_identical=TransitionDefaultIndentical)
tdb.treat_trace_template_as(TraceTemplateInderection, TraceTemplate2)

# Adding the trace templates
tdb.add(TraceTemplate1, TraceTemplate1, Transition1)
# Adding the trace templates
tdb.add(TraceTemplate2, TraceTemplate1, Transition1)
# Adding the trace templates
tdb.add(TraceTemplate1, TraceTemplate2, Transition1)
# Adding the trace templates
tdb.add(TraceTemplate2, TraceTemplate2, Transition2)

print(tdb.get_transition_class(TraceTemplate1(), TraceTemplate1()))
print(tdb.get_transition_class(TraceTemplate2(), TraceTemplate1()))
print(
    tdb.get_transition_class(TraceTemplateInderection(), TraceTemplate2())
)  # just as if Transition2 Transition2 was asked
print(tdb.get_transition_class(TraceTemplateNotInDb(), TraceTemplate1()))  # Returns the default
print(
    tdb.get_transition_class(TraceTemplateNotInDb(), TraceTemplateNotInDb())
)  # Returns the default if identical
get_transition_class(start_trace_template, end_trace_template)

Gets the correct taper class for a certain start_trace_template and end_trace_template.

Parameters:
start_trace_templatetrace template

trace template at the beginning of the taper.

end_trace_templatetrace template

trace template at the end of the taper that must be accepted as end_trace_template by the taper_class.

Returns:
taper class

Returns the correct taper class to connect start_trace_template with end_trace_template.

add(start_trace_template_class, end_trace_template_class, taper_class)

Adds a combination start_trace_template, end_trace_template and taper_class to the autotaper dictionary.

Parameters:
start_trace_template_classtrace template class

trace template class (not object) at the beginning of the taper that must be accepted as start_trace_template by the taper_class.

end_trace_template_classtrace template class

trace template class (not object) at the end of the taper that must be accepted as end_trace_template by the taper_class.

taper_classclass

Taper class that creates the taper. It should be an instance of TraceTransitionFromPort, otherwise it cannot be instantiated correctly.

treat_trace_template_as(trace_template, other_trace_template)

Makes an indirection in the taper database so that trace_template is treated as other_treat_trace_template. Use this function when two different trace_template classes are similar enough they can use the same tapers.

Parameters:
trace_templatetrace template

Trace template that you want make equivalent to other_trace_template.

other_trace_template: trace template

Trace template of which the tapers will be used.

class ipkiss3.all.AutoTraceTransitionFromPort

Automatically generates a transition based on a port and a waveguide definition, using a lookup table

Parameters:
transition_database: AutoTransitionDatabase

AutoTransitionDatabase in which the correct transition between the two trace templates can be looked up.

end_trace_template: PCell and _TraceTemplate

second trace template

start_port: _PortInterface

the port on which to extract trace template, position and angle

external_port_names: str

Dictionary for remapping of the port names of the contents to the external ports

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters:
reverse_templates: ( bool, bool_ or int ), locked

When True, treat start_trace_template as end_trace_template and vice versa. To use the correct templates, use the _{start/stop}_trace_template properties. This should not be set manually, but calculated by the transition itself.

start_trace_template: PCell and _TraceTemplate, locked
contents: PCell, locked

transition that is generated by this class

Examples

import si_fab.all as pdk  # noqa: F401
from picazzo3.traces.rib_wg import RibWaveguideTemplate
from picazzo3.traces.wire_wg import WireWaveguideTemplate
import ipkiss3.all as i3

class MyCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_ports(self, ports):
            ports += i3.OpticalPort(
                name="in", position=(0.0, 0.0), angle=45.0, trace_template=RibWaveguideTemplate()
            )
            return ports

mycell = MyCell()
attfp = i3.AutoTraceTransitionFromPort(start_port=(mycell, "in"), end_trace_template=WireWaveguideTemplate())
attfp_lay = attfp.Layout()
attfp_lay.visualize(annotate=True)
../../../_images/transition-11.png
import si_fab.all as pdk  # noqa: F401
from picazzo3.traces.rib_wg import RibWaveguideTemplate
from picazzo3.traces.wire_wg import WireWaveguideTemplate
import ipkiss3.all as i3

class MyCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_ports(self, ports):
            d = 5.0

            for i in range(3):
                ports += i3.OpticalPort(
                    name="in_{}".format(i),
                    position=(0.0, d * i),
                    angle=-30.0 + 30.0 * i,
                    trace_template=RibWaveguideTemplate(),
                )
            return ports

class TaperedCell(i3.PCell):
    child = i3.ChildCellProperty()
    tapers = i3.ChildCellListProperty()
    exit_trace_template = i3.TraceTemplateProperty()

    def _default_exit_trace_template(self):
        return WireWaveguideTemplate()

    def _default_tapers(self):
        tapers = []
        for i in range(3):
            t = i3.AutoTraceTransitionFromPort(
                start_port=(cell, "in_{}".format(i)), end_trace_template=self.exit_trace_template
            )
            tapers.append(t)
        return tapers

    class Layout(i3.LayoutView):
        def _default_tapers(self):
            tapers = []

            for i, t in enumerate(self.cell.tapers):
                t = t.get_default_view(i3.LayoutView)
                t.length = 10.0
                tapers.append(t)

            return tapers

        def _generate_instances(self, insts):
            for i, t in enumerate(self.tapers):
                insts += i3.SRef(t, name="taper{}".format(i))
            return insts

cell = MyCell()
exit_template = WireWaveguideTemplate()
exit_template.Layout(core_width=0.5, cladding_width=2.0)
tapered_cell = TaperedCell(child=cell, exit_trace_template=exit_template)
lv = tapered_cell.Layout()
lv.visualize(annotate=True)
../../../_images/transition-12.png

Views

class Layout
Parameters:
zero_length_if_identical: ( bool, bool_ or int )

Uses a zero length transition if the trace templates are identical

straight_extension: Coord2 and number >= 0
length: float and Real, number and number >= 0

length of the transition

end_position: Coord2

end position of the transition

start_position: Coord2

start position of the transition

contents_transformation: GenericNoDistortTransform
flatten_contents: ( bool, bool_ or int )

if True, it will insert the contents as elements in the layout, rather than as an Instance

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view