gdsfactory.routing.add_fiber_single.add_fiber_single

gdsfactory.routing.add_fiber_single.add_fiber_single#

gdsfactory.routing.add_fiber_single.add_fiber_single(component: ComponentSpec = <function straight>, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), layer_label: LayerSpec | None = None, fiber_spacing: float = 50, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, route_filter: Callable = <function get_route_from_waypoints>, min_input_to_output_spacing: float = 200.0, optical_routing_type: int = 2, with_loopback: bool = True, loopback_xspacing: float = 50.0, component_name: str | None = None, gc_port_name: str = 'o1', gc_port_name_fiber: str = 'o2', io_rotation: int | None = None, zero_port: str | None = None, get_input_label_text_loopback_function: None | Callable = <function get_input_label_text_dash_loopback>, get_input_label_text_function: Callable | None = <function get_input_label_text_dash>, select_ports: Callable = functools.partial(<function select_ports>, port_type='optical'), cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component[source]#

Returns component with grating couplers and labels on each port.

It returns grating couplers in north-south orientation. First routes input port gc_port_name south, and other ports north. You can always rotate it for East-West orientation.

Parameters:
  • component – component or component function to connect to grating couplers.

  • grating_coupler – grating coupler instance, function or list of functions.

  • layer_label – optional layer for test and measurement label. None avoids label.

  • fiber_spacing – between outputs.

  • bend – bend spec.

  • straight – straight sepc.

  • route_filter – function to get route waypoints.

  • min_input_to_output_spacing – spacing from input to output fiber (um).

  • optical_routing_type – None: autoselection, 0: no extension.

  • with_loopback – True, adds loopback reference straight waveguide.

  • loopback_xspacing – spacing from loopback xmin to component.xmin.

  • component_name – optional name of component.

  • gc_port_name – grating coupler waveguide port name.

  • gc_port_name_fiber – grating coupler fiber port name.

  • io_rotation – grating coupler rotation.

  • zero_port – name of the port to move to (0, 0) for the routing to work correctly.

  • get_input_label_text_loopback_function – for the loopbacks input label.

  • get_input_label_text_function – for the grating couplers input label.

  • get_input_labels_function – function to get input labels for grating couplers.

  • select_ports – function to select ports.

  • cross_section – cross_section spec.

Keyword Arguments:
  • max_y0_optical – in um.

  • straight_separation – spacing between waveguides.

  • list_port_labels – None, add labels to port indices in this list.

  • connected_port_list_ids – None # only for type 0 optical routing.

  • nb_optical_ports_lines

  • force_manhattan – False.

  • excluded_ports – list of ports to exclude.

  • grating_indices – None.

  • routing_method – function to ge the route.

  • gc_rotation – fiber coupler rotation in degrees. Defaults to -90 for south IO.

  • kwargs – cross_section settings.

assumes grating coupler has o1 input port facing west at xmin = 0
     ___________
    /| | | | | |
   / | | | | | |
o1|  | | | | | |
   \ | | | | | |
  | \|_|_|_|_|_|

  |
 xmin = 0
import gdsfactory as gf

c = gf.components.crossing()
cc = gf.routing.add_fiber_single(
    component=c,
    optical_routing_type=0,
    grating_coupler=gf.components.grating_coupler_elliptical_te,
)
cc.plot()

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

../_images/gdsfactory-routing-add_fiber_single-add_fiber_single-1.png