grating

photonforge.stencil.grating(period, num_periods, width, fill_factor=0.5, taper_length=0, taper_width=0)

Create a linear grating.

Parameters:
  • period – Grating period (distance between adjacent teeth centers).

  • num_periods – Number of grating periods.

  • width – Lateral grating width.

  • fill_factor – Ratio between the grating teeth and the grating period. An string parametrized by "u" or a photonforge.Expression of a single parameter (varied from 0 to 1) can be used to vary the fill factor along the grating.

  • taper_length – length of a linear taper ending at the grating.

  • taper_width – width at the end of the linear taper.

Returns:

List of structures.

# Grating with taper
grating1 = grating(period=0.6, num_periods=20, width=10, taper_length=30, taper_width=0.5)

# Apodized grating
grating2 = grating(period=0.6, num_periods=25, width=10, fill_factor="0.8 - 1.2 * (1 - u) * u")
grating