colour.plotting.plot_thin_film_reflectance_map#
- colour.plotting.plot_thin_film_reflectance_map(n: ArrayLike, t: ArrayLike | None = None, theta: ArrayLike | None = None, shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT, polarisation: Literal['Average', 'S', 'P'] | str = 'Average', method: Literal['Angle', 'Thickness'] | str = 'Thickness', **kwargs: Any) Tuple[Figure, Axes][source]#
Plot thin film reflectance as a 2D pseudocolor map.
Creates a 2D visualization showing reflectance as a function of wavelength (x-axis) and either film thickness or incident angle (y-axis).
- Parameters:
n (ArrayLike) –
Complete refractive index stack \(n_j\). Shape: (media_count,) or (media_count, wavelengths_count). The array should contain:
Single layer: [n_incident, n_film, n_substrate] (length 3)
Multi-layer: [n_incident, n_layer_1, …, n_layer_n, n_substrate] (length > 3)
Supports wavelength-dependent refractive index for dispersion.
t (ArrayLike | None) –
Thickness \(t\) in nanometers. Behavior depends on the method:
Thickness mode (single layer): Array of thicknesses or None (default:
np.linspace(0, 1000, 250)). Sweeps film thickness across the range.Thickness mode (multi-layer): Array of thicknesses or None. Sweeps all layers simultaneously with the same thickness value. For example,
np.linspace(50, 500, 250)sweeps all layers from 50nm to 500nm together.Angle mode (single layer): Scalar thickness (e.g.,
300). Fixed thickness while varying angle.Angle mode (multi-layer): Array of layer thicknesses (e.g.,
[100, 50]for 2 layers). All layers kept at fixed thickness while varying angle.
theta (ArrayLike | None) –
Incident angle \(\theta\) in degrees. Behavior depends on the method:
Thickness mode: Scalar angle or None (default: 0°). Fixed angle while varying thickness.
Angle mode: Array of angles (e.g.,
np.linspace(0, 90, 250)). Sweeps angle across the range.
shape (SpectralShape) – Spectral shape for wavelength sampling.
polarisation (Literal['Average', 'S', 'P'] | str) – Polarisation to plot: ‘S’, ‘P’, or ‘Average’ (case-insensitive). Default is ‘Average’ (mean of s and p polarisations for unpolarized light).
method (Literal['Angle', 'Thickness'] | str) –
Plotting method, one of (case-insensitive):
’Thickness’: Plot reflectance vs wavelength and thickness (y-axis)
’Angle’: Plot reflectance vs wavelength and angle (y-axis)
kwargs (Any) – {
colour.plotting.artist(),colour.plotting.render()}, See the documentation of the previously listed definitions.
- Returns:
Current figure and axes.
- Return type:
Examples
>>> plot_thin_film_reflectance_map( ... [1.0, 1.33, 1.0], method="Thickness" ... ) (<Figure size ... with 2 Axes>, <...Axes...>)