Skip to article frontmatterSkip to article content

gdsfactory.cross_section.pn

gdsfactory.cross_section.pn(width: float = 0.5, layer: tuple[int, int] | str | int | LayerEnum = 'WG', layer_slab: tuple[int, int] | str | int | LayerEnum = 'SLAB90', gap_low_doping: float = 0.0, gap_medium_doping: float = 0.5, gap_high_doping: float = 1.0, offset_low_doping: float = 0.0, width_doping: float = 8.0, width_slab: float = 7.0, layer_p: tuple[int, int] | str | int | LayerEnum | None = 'P', layer_pp: tuple[int, int] | str | int | LayerEnum | None = 'PP', layer_ppp: tuple[int, int] | str | int | LayerEnum | None = 'PPP', layer_n: tuple[int, int] | str | int | LayerEnum | None = 'N', layer_np: tuple[int, int] | str | int | LayerEnum | None = 'NP', layer_npp: tuple[int, int] | str | int | LayerEnum | None = 'NPP', layer_via: tuple[int, int] | str | int | LayerEnum | None = None, width_via: float = 1.0, layer_metal: tuple[int, int] | str | int | LayerEnum | None = None, width_metal: float = 1.0, port_names: tuple[str, str] = ('o1', 'o2'), sections: tuple[Section, ...] | None = None, cladding_layers: Sequence[tuple[int, int] | str | int | LayerEnum] | None = None, cladding_offsets: Sequence[float] | None = None, cladding_simplify: Sequence[float] | None = None, slab_inset: float | None = None, **kwargs: Any)CrossSection

Rib PN doped cross_section.

Parameters
  • widthwidth of the ridge in um.

  • layerridge layer.

  • layer_slabslab layer.

  • gap_low_dopingfrom waveguide center to low doping. Only used for PIN.

  • gap_medium_dopingfrom waveguide center to medium doping. None removes it.

  • gap_high_dopingfrom center to high doping. None removes it.

  • offset_low_dopingfrom center to junction center.

  • width_dopingin um.

  • width_slabin um.

  • layer_pp doping layer.

  • layer_ppp+ doping layer.

  • layer_pppp++ doping layer.

  • layer_nn doping layer.

  • layer_npn+ doping layer.

  • layer_nppn++ doping layer.

  • layer_viavia layer.

  • width_viavia width in um.

  • layer_metalmetal layer.

  • width_metalmetal width in um.

  • port_namesinput and output port names.

  • sectionsoptional list of sections.

  • cladding_layersoptional list of cladding layers.

  • cladding_offsetsoptional list of cladding offsets.

  • cladding_simplifyOptional Tolerance value for the simplification algorithm. All points that can be removed without changing the resulting polygon by more than the value listed here will be removed.

  • slab_insetslab inset in um.

  • kwargscross_section settings.

                      offset_low_doping
                        <------>
                       |       |
                      wg     junction
                    center   center
                       |       |
         ______________|_______|______
         |             |       |     |
_________|             |       |     |_________________|
      P                |       |               N       |
  width_p              |       |            width_n    |
<----------------------------->|<--------------------->|
                       |               |       N+      |
                       |               |    width_n    |
                       |               |<------------->|
                       |<------------->|
                       gap_medium_doping
import gdsfactory as gf

xs = gf.cross_section.pn(width=0.5, gap_low_doping=0, width_doping=2.)
p = gf.path.arc(radius=10, angle=45)
c = p.extrude(xs)
c.plot()