Home Forums Nazca Interconnect: pcurve_p2p Reply To: Interconnect: pcurve_p2p


Dear iv_tern,

If you specify width1 and width2 and they are different, then a parabolic taper will be generated (with the large angle closest to the smallest width). If you want a different function, you have to specify the shape yourself. Then the width1 argument should be a parametric function w(t), where the width starts at w(0) and ends at w(1). An example is show below.

import nazca as nd
import nazca.demofab as demo
from math import sin

# Connect two waveguides and adapt the width at the same time
s1 = demo.deep.strt(200, width=2).put(0, -200, 0)
s2 = demo.deep.strt(200, width=5).put(1000, -250, 170)
demo.deep.cobra_p2p(pin2=s1.pin['b0'], width1=5).put()

def wsin(t):
    """Useless fast width variation for demonstration."""
    w = 2 + 5 * t + 5 * t * sin(t * 200)
    return w

# Connect two waveguides and vary the width in some useless way.
c1 = demo.deep.bend(radius=70, angle=50, width=wsin(0)).put(0, -400, 0)
c2 = demo.deep.bend(radius=100, angle=-50, width=wsin(1)).put(1000, -400, 0)
demo.deep.cobra_p2p(c1.pin['b0'], c2.pin['a0'], width1=wsin, radius1=70,


Please note that Nazca cannot do a lot of sanity-checking on such connections, so it should be used with care.