Skip to content
Snippets Groups Projects
Verified Commit 98d40737 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add wavelength() for dispersion

parent 02ae69d6
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,9 @@ Light dispersion model for water in deep sea based on David J.L. Bailey's work:
and predicting its sensitivity to Dark Matter" - PhD thesis, University of
Oxford, United Kingdom, 2002.
The Bailey dispersion interface is based on the implementation in the Jpp
framework by Maarten de Jong.
"""
Base.@kwdef struct BaileyDispersion <: DispersionModel
P::Float64 = 1 # ambient pressure [atm]
......@@ -49,3 +52,29 @@ end
ng^2 * (2*np^2 - n*npp) * λ / (n^3);
end
"""
Determine wavelength [nm] for a given index of refraction corresponding to the
group velocity. The estimate of the wavelength is made by successive linear
extrapolations. The procedure starts from the given wavelength and
terminates if the index of refraction is equal to the target value within
the given precision.
# Arguments
- `n`: of refraction
- `w`: value wavelength [nm]
- `eps`: precision index of refraction
"""
function wavelength(dp::BaileyDispersion, n, w, eps)
v = w
while true
y = refractionindexgroup(dp, v)
abs(y - n) < eps && break
v += (n - y) / dispersiongroup(dp, v)
end
v
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment