SFGAnalysis

SFGAnalysis.SetupMethod
Setup(ω, β, n1, n2)

Create an object representing the setup.

Arguments

  • ω: Tuple{Real,Real} containing $\omega_1$ and $\omega_2$ so that $\omega = \omega_1 + \omega_2$.
  • β: Tuple{Real,Real} containing the incident angles corresponing to $\omega_1$ and $\omega_2$.
  • n1: Tuple{Number,Number,Number} containing the refractive indices of medium 1 corresponding to $\omega$, $\omega_1$ and $\omega_2$.
  • n2: Tuple{Number,Number,Number} containing the refractive indices of medium 2 corresponding to $\omega$, $\omega_1$ and $\omega_2$.
source
SFGAnalysis.angleofrefractionMethod
angleofrefraction(n1, n2, β)

Compute the angle of refraction.

Arguments

  • n1: refractive index of the medium in which the wave is propagating towards the interface
  • n2: refractive index of the other medium
  • β: incident or reflected angle
source
SFGAnalysis.effective_susceptibilityMethod
effective_susceptibility(θ::Real, s::Setup, p::Symbol; <kwargs>)

Compute the effective susceptibility for a moiety with tilt angle θ for a Setup s in polarization p.

Arguments

  • θ: tilt angle of the moiety
  • s: Setup object
  • p: polarization combination (:ppp or :ssp)

Keyword Arguments

  • pointgroup::Symbol: point group of the moiety (possible values: :c3v)
  • mode::Symbol: vibrational mode (possible values: :ss (symmetric stretch), :as (asymmetric stretch))
  • R::Real: the hyperpolarizability ratio $R = \beta_{aac} / \beta_{ccc} = \beta_{bbc} / \beta_{ccc}$. Has only to be provided for point group :c3v and mode :ss.
  • beta::Real: hyperpolarizability
    • $\beta_{ccc}$ for :c3v and :ss
    • $\beta_{aca} = \beta_{bcb}$ for :c3v and :as
  • N::Real: number of oscillators
source
SFGAnalysis.effective_susceptibility_pppMethod
effective_susceptibility_ppp(n1, n2, n′, β, χ)

Compute the effective susceptibility in ppp polarization.

Arguments

  • n1: refractive indices of the medium in which the waves are propagating towards the interface
  • n2: refractive indices of the other medium
  • n′: refractive indices of the interface
  • β: incident or reflected angles
  • χ: susceptibilities as an array [χ_xxz, χ_xzx, χ_zxx, χ_zzz]

The arguments n1, n2, n′ and β have to be arrays where the first element corresponds to the property for the sum frequency, the second to $\omega_1$ and the third to $\omega_2$.

https://doi.org/10.1080/01442350500225894

source
SFGAnalysis.effective_susceptibility_pssMethod
effective_susceptibility_pss(n1, n2, n′, β, χ_yyz)

Compute the effective susceptibility in pss polarization.

Arguments

  • n1: refractive indices of the medium in which the waves are propagating towards the interface
  • n2: refractive indices of the other medium
  • n′: refractive index of the interface for $\omega_2$
  • β: incident or reflected angles
  • χ_yyz: susceptibility

The arguments n1, n2, and β have to be arrays where the first element corresponds to the property for the sum frequency, the second to $\omega_1$ and the third to $\omega_2$.

https://doi.org/10.1080/01442350500225894

source
SFGAnalysis.effective_susceptibility_spsMethod
effective_susceptibility_sps(n1, n2, n′, β, χ_yyz)

Compute the effective susceptibility in sps polarization.

Arguments

  • n1: refractive indices of the medium in which the waves are propagating towards the interface
  • n2: refractive indices of the other medium
  • n′: refractive index of the interface for $\omega_2$
  • β: incident or reflected angles
  • χ_yyz: susceptibility

The arguments n1, n2, and β have to be arrays where the first element corresponds to the property for the sum frequency, the second to $\omega_1$ and the third to $\omega_2$.

https://doi.org/10.1080/01442350500225894

source
SFGAnalysis.effective_susceptibility_sspMethod
effective_susceptibility_ssp(n1, n2, n′, β, χ_yyz)

Compute the effective susceptibility in ssp polarization.

Arguments

  • n1: refractive indices of the medium in which the waves are propagating towards the interface
  • n2: refractive indices of the other medium
  • n′: refractive index of the interface for $\omega_2$
  • β: incident or reflected angles
  • χ_yyz: susceptibility

The arguments n1, n2, and β have to be arrays where the first element corresponds to the property for the sum frequency, the second to $\omega_1$ and the third to $\omega_2$.

https://doi.org/10.1080/01442350500225894

source
SFGAnalysis.freq2wlMethod
freq2wl(ω)

Compute the wavelength of a field with frequency ω in 1/s. The wavelength will be given in nm.

source
SFGAnalysis.fresnel_xMethod
fresnel_x(n1, n2, β)

Compute the diagonal elements $L_{xx}$ of the fresnel factor.

Arguments

  • n1: refractive index of the medium in which the wave is propagating towards the interface
  • n2: refractive index of the other medium
  • β: incident or reflected angle

https://doi.org/10.1103/PhysRevB.59.1263

source
SFGAnalysis.fresnel_yMethod
fresnel_y(n1, n2, β)

Compute the diagonal elements $L_{yy}$ of the fresnel factor.

Arguments

  • n1: refractive index of the medium in which the wave is propagating towards the interface
  • n2: refractive index of the other medium
  • β: incident or reflected angle

https://doi.org/10.1103/PhysRevB.59.1263

source
SFGAnalysis.fresnel_zMethod
fresnel_z(n1, n2, n′, β)

Compute the diagonal elements $L_{yy}$ of the fresnel factor.

Arguments

  • n1: refractive index of the medium in which the wave is propagating towards the interface
  • n2: refractive index of the other medium
  • n′: refractive index of the interface
  • β: incident or reflected angle

https://doi.org/10.1103/PhysRevB.59.1263

source
SFGAnalysis.ninterfaceMethod
ninterface(n2)

Calculate the index of refraction of the interfacial layer according to

$\left(\frac{1}{n^\prime}\right)^2 = \frac{4n_2^2 + 2}{n_2^2(n_2 ^2+5)}$.

Arguments

  • n2: refractive index of the medium in which the wave is not propagating towards the interface

https://doi.org/10.1103/PhysRevB.59.1263

source
SFGAnalysis.sfangleMethod
sfangle(ω, ω1, ω2, β1, β2)

Compute the angle of the reflected sum frequency field. In a counter-propagating geometry one of the βs gets negative.

Arguments

  • ω: sum frequency
  • ω1: frequency of wave 1
  • ω2: frequency of wave 2
  • β1: incident angle for field with frequency ω1
  • β2: incident angle for field with frequency ω2
source
SFGAnalysis.sfgintensityMethod
sfgintensity(ω, β, χ2_eff; <keyword arguments>)

Compute the intentensity of the sum frequency in the reflected direction according to

$I_\mathrm{SF} = \frac{8\pi^3\omega^2\sec^2\beta}{c^3 n n_1 n_2} \left| \chi_\mathrm{eff}^{(2)} \right|^2 I_1 I_2$.

Arguments

  • ω: sum frequency
  • β: reflection angle of the sum frequency field
  • χ2_eff: effective susceptibility

Keyword Arguments

  • n: refractive index of the bulk medium for ω
  • n1: refractive index of the bulk medium for ω1
  • n2: refractive index of the bulk medium for ω2
  • I1: intensity of ω1
  • I2: intensity of ω2

https://doi.org/10.1103/PhysRevB.59.12632

source
SFGAnalysis.sfgintensityMethod
sfgintensity(s::Setup, χ2_eff::Number; <keyword arguments>)

Same as sfgintensity(ω, β, χ2_eff; <keyword arguments>).

Arguments

  • s: Setup object
  • χ2_eff: effective susceptibility

Keyword Arguments

  • I1: intensity of ω1
  • I2: intensity of ω2

https://doi.org/10.1103/PhysRevB.59.12632

source
SFGAnalysis.sfspectrumMethod

If no phase information and but the non-resonant background is passed it's assumed that the relative phase of the resonances is +/- π, which can be controlled via the sign of A.

source
SFGAnalysis.sfspectrumMethod
sfspectrum(x::Number, A::T, ω::T, Γ::T[, φ::AbstractArray, χnr]) where {T<:AbstractArray}

Calculate the sum frequency spectrum according to

$I = \left| \chi_{NR} + \sum_q \frac{A_q}{x - ω_q - i\Gamma_q} \right|^2$

Arguments

  • x the frequency/wavenumber at which to evaluate the sfspectrum
  • A oscillator strength
  • ω resonances
  • Γ damping coefficients

Keyword Arguments

Examples

x = range(2800, 3000, length=201)
A = [1, 1]
ω = [2880, 2930]
Γ = [8, 7]

In order to use the broadcast functionality we have to wrap the parameters in Refs:

y = sfspectrum.(x, Ref(A), Ref(ω), Ref(Γ))

Alternatively use array comprehensions:

y = [sfspectrum(_x, A, ω, Γ) for _x in x]
source
SFGAnalysis.susceptibilityMethod
susceptibility(θ::Real, t::Symbol; pointgroup, mode, R, beta, N; <kwargs>)

Compute the susceptibility for angle θ and tensor element t. Tensor elements important for specific polarization combinations:

  • ssp: :yyz
  • sps: :yzy
  • pss: :zyy
  • ppp: :xxz, :xzx, :zxx and :zzz

Arguments

  • θ: title angle of the moiety
  • t: tensor element (see above)

Keyword Arguments

  • pointgroup::Symbol: point group of the moiety (possible values: :c3v)
  • mode::Symbol: vibrational mode (possible values: :ss (symmetric stretch), :as (asymmetric stretch))
  • R::Real: the hyperpolarizability ratio $R = \beta_{aac} / \beta_{ccc} = \beta_{bbc} / \beta_{ccc}$. Has only to be provided for point group :c3v and mode :ss.
  • beta::Real: hyperpolarizability
    • $\beta_{ccc}$ for :c3v and :ss
    • $\beta_{aca} = \beta_{bcb}$ for :c3v and :as
  • N::Real: number of oscillators
MoleculeGroupR
methanolmethyl1.7
ethanol and longer X-1-olmethyl3.4
acetonemethyl1.9
DMSOmethyl2.3
source