PR: Implement support for *Transfer Matrix Method* (TMM). #1366
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR relates to #525 and implements the full Transfer Matrix Method (TMM), I started the work 6 years ago and finally managed to finish, thanks Claude!
Computations
The main function is
colour.phenomena.matrix_transfer_tmm
that computes transfer matrices for multilayer thin film structures with full vectorisation across wavelength, angle and thickness.Then the two
colour.phenomena.thin_film_tmm
andcolour.phenomena.multilayer_tmm
functions compute thin film and multilayer reflectance / transmittance respectively.colour.phenomena.snell_law
colour.phenomena.polarised_light_magnitude_elements
colour.phenomena.polarised_light_reflection_amplitude
colour.phenomena.polarised_light_reflection_coefficient
colour.phenomena.polarised_light_transmission_amplitude
colour.phenomena.polarised_light_transmission_coefficient
colour.phenomena.TransferMatrixResult
colour.phenomena.matrix_transfer_tmm
colour.phenomena.light_water_molar_refraction_Schiebener1990
colour.phenomena.light_water_refractive_index_Schiebener1990
colour.phenomena.thin_film_tmm
colour.phenomena.multilayer_tmm
Plotting
I also added a bunch of new plotting definitions, most notable ones being
colour.plotting.plot_thin_film_iridescence
,colour.plotting.plot_thin_film_reflectance_map
andcolour.plotting.plot_multi_layer_stack
.colour.plotting.plot_single_layer_thin_film
colour.plotting.plot_multi_layer_thin_film
colour.plotting.plot_thin_film_comparison
colour.plotting.plot_thin_film_spectrum
colour.plotting.plot_thin_film_iridescence
colour.plotting.plot_thin_film_reflectance_map
colour.plotting.plot_multi_layer_stack
Preflight
Code Style and Quality
colour
,colour.models
.Documentation