LayerLumos Modules

layerlumos.layerlumos.stackrt(n, d, f, theta=array([0]))

Calculate the reflection and transmission coefficients for a multilayer stack at different frequencies and incidence angles.

Parameters:
  • n (numpy.ndarray) – The refractive indices of the layers for each frequency. Shape should be (Nfreq, Nlayers), where Nfreq is the number of frequencies and Nlayers is the number of layers.

  • d (numpy.ndarray) – The thicknesses of the layers. Shape should be (Nlayers,).

  • f (numpy.ndarray) – The frequencies at which to calculate the coefficients. Shape should be (Nfreq,).

  • theta (float or numpy.ndarray) – The incidence angle(s) in degrees. Can be a single value or an array of angles. Default is an array containing 0.

Returns:

A tuple containing: - R_TE (numpy.ndarray): Reflectance for TE polarization. Shape is (Nfreq,). - T_TE (numpy.ndarray): Transmittance for TE polarization. Shape is (Nfreq,). - R_TM (numpy.ndarray): Reflectance for TM polarization. Shape is (Nfreq,). - T_TM (numpy.ndarray): Transmittance for TM polarization. Shape is (Nfreq,).

layerlumos.layerlumos.stackrt0(n, d, f)

Calculate the reflection and transmission coefficients for a multilayer stack at different frequencies under normal incidence.

Parameters:
  • n (numpy.ndarray) – The refractive indices of the layers for each frequency. Shape should be (Nfreq, Nlayers), where Nfreq is the number of frequencies and Nlayers is the number of layers.

  • d (numpy.ndarray) – The thicknesses of the layers. Shape should be (Nlayers,).

  • f (numpy.ndarray) – The frequencies at which to calculate the coefficients. Shape should be (Nfreq,).

Returns:

A tuple containing: - R_TE (numpy.ndarray): Reflectance for TE polarization. Shape is (Nfreq,). - T_TE (numpy.ndarray): Transmittance for TE polarization. Shape is (Nfreq,). - R_TM (numpy.ndarray): Reflectance for TM polarization. Shape is (Nfreq,). - T_TM (numpy.ndarray): Transmittance for TM polarization. Shape is (Nfreq,).

layerlumos.layerlumos.stackrt_theta(n, d, f, theta=0)

Calculate the reflection and transmission coefficients for a multilayer stack at different frequencies under an arbitrary angle of incidence.

Parameters:
  • n – The refractive indices of the layers for each frequency. Shape should be (Nfreq, Nlayers), where Nfreq is the number of frequencies and Nlayers is the number of layers.

  • d – The thicknesses of the layers. Shape should be (Nlayers,).

  • f – The frequencies at which to calculate the coefficients. Shape should be (Nfreq,).

  • theta – The incident angle in degrees. Defaults to 0 for normal incidence.

Returns:

A tuple containing: - R_TE (numpy.ndarray): Reflectance for TE polarization. Shape is (Nfreq,). - T_TE (numpy.ndarray): Transmittance for TE polarization. Shape is (Nfreq,). - R_TM (numpy.ndarray): Reflectance for TM polarization. Shape is (Nfreq,). - T_TM (numpy.ndarray): Transmittance for TM polarization. Shape is (Nfreq,).

layerlumos.utils_materials.interpolate_material(material_data, frequencies)

Interpolate n and k values for the specified frequencies.

Parameters: - material_data: The data for the material, as returned by load_material. - frequencies: A list or NumPy array of frequencies to interpolate n and k for.

Returns: - Interpolated values of n and k as a NumPy array.

layerlumos.utils_materials.load_material(material_name)

Load material data from its CSV file, converting wavelength to frequency.

Parameters: - material_name: The name of the material to load.

Returns: - A NumPy array with columns for frequency (converted from wavelength), n, and k.

layerlumos.utils_materials.load_material_RF(material_name, frequencies)

Load material RF data for a given material and frequencies.

Parameters: - material_name: The name of the material to load. - frequencies: Array of frequencies for which data is requested.

Returns: - A NumPy array with columns for frequency, n, and k.

layerlumos.utils_spectra.convert_frequencies_to_wavelengths(f)

Convert frequency to wavelength.