height2phase

colibri.optics.functional.height2phase(height_map, wavelengths, refractive_index)[source]

Convert height map to phase modulation.

\[\Phi(x,y,\lambda) = k(\lambda) \Delta n(\lambda) h(x, y)\]

where \(\Phi\) is the phase modulation, \(h(x, y)\) is the height map of the optical element, \(k(\lambda)\) is the wavenumber for lambda wavelength and \(\Delta n(\lambda)\) is the change of refractive index between propagation medium and material of the optical element .

Parameters:
  • height_map (torch.Tensor) – Height map.

  • wavelengths (torch.Tensor) – Wavelengths in meters.

  • refractive_index (function) – Function to calculate the refractive index.

Returns:

Phase.

Return type:

torch.Tensor