def spiral_tm(wg_width=0.5, length=2): """ sample of component cutback """ c = spiral_inner_io_euler(wg_width=wg_width, length=length, dx=10, dy=10, N=5) cc = add_gratings_and_loop_back( component=c, grating_coupler=pp.c.grating_coupler_elliptical_tm, bend_factory=pp.c.bend_circular, ) return cc
def spiral_te(wg_width=0.5, length=2): """ sample of component cutback Args: wg_width: um lenght: mm """ c = spiral_inner_io_euler(wg_width=wg_width, length=length) cc = add_gratings_and_loop_back( component=c, grating_coupler=pp.c.grating_coupler_elliptical_te, bend_factory=pp.c.bend_circular, ) return cc
def test_add_gratings_and_loop_back(data_regression): """This container requires all ports to face the same direction.""" c = add_gratings_and_loop_back(component=spiral_inner_io()) data_regression.check(c.get_settings())
# spiral = pp.call_if_func(spiral, **kwargs) # grating_coupler = pp.call_if_func(grating_coupler) # return add_gratings_and_loop_back(spiral, grating_coupler=grating_coupler) if __name__ == "__main__": from pp.add_termination import add_gratings_and_loop_back c = spiral_inner_io() # c = spiral_inner_io_euler() # c = spiral_inner_io_euler(length=2, wg_width=0.4) # c = spiral_inner_io_euler(length=6, wg_width=0.4) print(c.name) print(c.settings) cc = add_gratings_and_loop_back(c) pp.show(c) # c = spiral_inner_io_euler(wg_width=1) # from pp.routing import add_fiber_array # c = spiral_inner_io_euler(length=4, wg_width=1) # cc = pp.routing.add_fiber_array(c) # print(c.length) # print(get_straight_length(2, spiral_inner_io_euler)) # print(get_straight_length(4, spiral_inner_io_euler)) # print(get_straight_length(6, spiral_inner_io_euler)) # c = spiral_inner_io() # c = spiral_inner_io_euler(y_straight_inner_top=-11) # c = spiral_inner_io_euler(bend_radius=20, wg_width=0.2) # c = spiral_inner_io_euler(bend_radius=20, wg_width=0.2, y_straight_inner_top=200) # c = reticle_mockup()
def test_add_gratings_and_loop_back(data_regression): c = add_gratings_and_loop_back(component=spiral_inner_io()) data_regression.check(c.get_settings())