-
Notifications
You must be signed in to change notification settings - Fork 5
TheoreticalSpectrum
This small function is exported by the module to calculate the theoretical reflectance or transmittance spectrum of an interface between two media, given the indices of refraction of the incident and emergent media.
X = TheoreticalSpectrum(specType, beam, incidentRI, emergentRI)Returns the polarisation averaged theoretical spectrum calculated with the transfer matrix method of TMMOptics.jl. It considers light hitting the first medium (incidentRI).
specType::FitProcedure, defines the type of spectrum to fit, taking values Reflectance() or Transmittance(). This indicates as well the input spectrum to compare to.
beam can be constructed using the PlaneWave subtype of LightSource. It usually wraps the wavelength range, the angles of incidence and the polarisation. For example:
λ = 200:1000
θ = [0.] # normal incidence
pol = 0.4 # 40% p/TM polarisation + 60% s/TE polarisation
beam = PlaneWave(λ, θ; p=pol)The interface is defined by the incident and emergent media.
incidentRI::Array{ComplexF64,1}, contains the index of refraction of the incident material for several wavelengths. It must be input as complex. For instance,
incidentRI = RIdb.air(beam.λ)emergentRI::Array{ComplexF64,1}: contains the index of refraction of the emergent material for several wavelengths. It must be input as complex. For example,
emergentRI = RIdb.silicon(beam.λ)X::Array{Float64,1 is the polarisation averaged spectrum weighted by the beam.p parameter, calculated as beam.p*Xp + (1.0 - beam.p)*Xs, where Xp and Xs are the reflectance or transmittance spectrum for p/TM and s/TE, respectively, output from TMMOptics.jl.