Skip to content

Just some functions to compute the line shapes of spectral line broadenings.

License

Notifications You must be signed in to change notification settings

lihua-cat/LineBroadenings.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LineBroadenings

Stable Dev Build Status Coverage

Example

using GLMakie
using LineBroadenings

μ, γ, σ = 0, 20 * (2 * log(2)), 20
fl = Lorentz(μ, γ)
fg = Gaussian(μ, σ)
fv = Voigt(μ, σ, γ)
x = LinRange(-250, 250, 100000)

let
    fig = Figure()
    ax = Axis(fig[1, 1])
    lines!(ax, x, pdf.(fl, x), label = "Lorentz")
    lines!(ax, x, pdf.(fg, x), label = "Gaussian")
    lines!(ax, x, pdf.(fv, x), label = "Voigt")
    axislegend()
    fig
end

fig1

M = 126.9u"u"
k34 = 7603.14u"cm^-1"

kx = collect(7603.05:0.00001:7603.23)u"cm^-1"
T, P = 150 * u"K", 10 * u"Torr"

fwhm_d = fwhm_doppler(k34, M, T)
fwhm_p = fwhm_pressure(P, 5.0u"MHz/Torr") / 𝑐 |> u"cm^-1"
let
    fig = Figure()
    ax = Axis(fig[1, 1], xlabel="Wavenumber (cm⁻¹)", ylabel="intensity distribution(a. u.)", title="line broadenings of I¹²⁷ (T=$T, P=$P)")
    offset = 7603
    kxx = ustrip.(u"cm^-1", kx) .- offset
    lines!(ax, kxx, ustrip.(profile_pressure.(kx; ν0=k34, νp=fwhm_p)), label="Pressure")
    lines!(ax, kxx, ustrip.(profile_doppler.(kx; ν0=k34, νd=fwhm_d)), label="Doppler")
    lines!(ax, kxx, ustrip.(profile_voigt.(kx; ν0=k34, νd=fwhm_d, νp=fwhm_p)), label="Voigt")
    ax.xtickformat = xs -> ["$(x + offset)" for x in xs]
    axislegend()
    fig
end

fig2

About

Just some functions to compute the line shapes of spectral line broadenings.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages