SFGAnalysis
SFGAnalysis.Setup
SFGAnalysis.angleofrefraction
SFGAnalysis.effective_susceptibility
SFGAnalysis.effective_susceptibility
SFGAnalysis.effective_susceptibility_ppp
SFGAnalysis.effective_susceptibility_ppp
SFGAnalysis.effective_susceptibility_pss
SFGAnalysis.effective_susceptibility_pss
SFGAnalysis.effective_susceptibility_sps
SFGAnalysis.effective_susceptibility_sps
SFGAnalysis.effective_susceptibility_ssp
SFGAnalysis.effective_susceptibility_ssp
SFGAnalysis.freq2wl
SFGAnalysis.fresnel_x
SFGAnalysis.fresnel_y
SFGAnalysis.fresnel_z
SFGAnalysis.gaussian
SFGAnalysis.lorentzian
SFGAnalysis.ninterface
SFGAnalysis.sfangle
SFGAnalysis.sfgintensity
SFGAnalysis.sfgintensity
SFGAnalysis.sfspectrum
SFGAnalysis.sfspectrum
SFGAnalysis.sfspectrum
SFGAnalysis.sfspectrum
SFGAnalysis.sfspectrum_voigt
SFGAnalysis.sfspectrum_voigt
SFGAnalysis.susceptibility
SFGAnalysis.susceptibility_c3v_as_xxz
SFGAnalysis.susceptibility_c3v_as_xzx
SFGAnalysis.susceptibility_c3v_as_zzz
SFGAnalysis.susceptibility_c3v_ss_xxz
SFGAnalysis.susceptibility_c3v_ss_xzx
SFGAnalysis.susceptibility_c3v_ss_zzz
SFGAnalysis.voigt
SFGAnalysis.wl2freq
SFGAnalysis.Setup
— MethodSetup(ω, β, 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$.
SFGAnalysis.angleofrefraction
— Methodangleofrefraction(n1, n2, β)
Compute the angle of refraction.
Arguments
n1
: refractive index of the medium in which the wave is propagating towards the interfacen2
: refractive index of the other mediumβ
: incident or reflected angle
SFGAnalysis.effective_susceptibility
— Methodeffective_susceptibility(d::Distribution, s::Setup, p::Symbol; <kwargs>)
Same as above. In this case the tilt angle θ
is expressed by a Distribution
d
.
SFGAnalysis.effective_susceptibility
— Methodeffective_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 moietys
:Setup
objectp
: 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
- $\beta_{ccc}$ for
N::Real
: number of oscillators
SFGAnalysis.effective_susceptibility_ppp
— Methodeffective_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 interfacen2
: refractive indices of the other mediumn′
: 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
SFGAnalysis.effective_susceptibility_ppp
— Methodeffective_susceptibility_ppp(s::SFGAnalysis.Setup, χ)
Arguments
s
: setup objectχ
: susceptibilities as an array[χ_xxz, χ_xzx, χ_zxx, χ_zzz]
SFGAnalysis.effective_susceptibility_pss
— Methodeffective_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 interfacen2
: refractive indices of the other mediumn′
: 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
SFGAnalysis.effective_susceptibility_pss
— Methodeffective_susceptibility_pss(s::SFGAnalysis.Setup, χ_zyy)
Compute the effective susceptibility in pss polarization.
Arguments
s
: setup objectχ_zyy
: susceptibility
SFGAnalysis.effective_susceptibility_sps
— Methodeffective_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 interfacen2
: refractive indices of the other mediumn′
: 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
SFGAnalysis.effective_susceptibility_sps
— Methodeffective_susceptibility_sps(s::SFGAnalysis.Setup, χ_yzy)
Compute the effective susceptibility in sps polarization.
Arguments
s
: setup objectχ_yzy
: susceptibility
SFGAnalysis.effective_susceptibility_ssp
— Methodeffective_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 interfacen2
: refractive indices of the other mediumn′
: 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
SFGAnalysis.effective_susceptibility_ssp
— Methodeffective_susceptibility_ssp(s::SFGAnalysis.Setup, χ_yyz)
Compute the effective susceptibility in ssp polarization.
Arguments
s
: setup objectχ_yyz
: susceptibility
SFGAnalysis.freq2wl
— Methodfreq2wl(ω)
Compute the wavelength of a field with frequency ω
in 1/s. The wavelength will be given in nm.
SFGAnalysis.fresnel_x
— Methodfresnel_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 interfacen2
: refractive index of the other mediumβ
: incident or reflected angle
https://doi.org/10.1103/PhysRevB.59.1263
SFGAnalysis.fresnel_y
— Methodfresnel_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 interfacen2
: refractive index of the other mediumβ
: incident or reflected angle
https://doi.org/10.1103/PhysRevB.59.1263
SFGAnalysis.fresnel_z
— Methodfresnel_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 interfacen2
: refractive index of the other mediumn′
: refractive index of the interfaceβ
: incident or reflected angle
https://doi.org/10.1103/PhysRevB.59.1263
SFGAnalysis.gaussian
— MethodSFGAnalysis.lorentzian
— MethodDocumentation
SFGAnalysis.ninterface
— Methodninterface(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
SFGAnalysis.sfangle
— Methodsfangle(ω, ω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
SFGAnalysis.sfgintensity
— Methodsfgintensity(ω, β, χ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
SFGAnalysis.sfgintensity
— Methodsfgintensity(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
SFGAnalysis.sfspectrum
— MethodIf no phase information and non-resonant background is passed to the function, we set it to 0.
SFGAnalysis.sfspectrum
— MethodIf 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
.
SFGAnalysis.sfspectrum
— MethodIf just one phase is passed, we assume that this belongs to the non-resonant background.
SFGAnalysis.sfspectrum
— Methodsfspectrum(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 sfspectrumA
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]
SFGAnalysis.sfspectrum_voigt
— MethodSFGAnalysis.sfspectrum_voigt
— MethodSFGAnalysis.susceptibility
— Methodsusceptibility(θ::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 moietyt
: 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
- $\beta_{ccc}$ for
N
::Real: number of oscillators
Molecule | Group | R |
---|---|---|
methanol | methyl | 1.7 |
ethanol and longer X-1-ol | methyl | 3.4 |
acetone | methyl | 1.9 |
DMSO | methyl | 2.3 |
SFGAnalysis.susceptibility_c3v_as_xxz
— MethodSusceptibility for tensor elements xxz and yyz.
SFGAnalysis.susceptibility_c3v_as_xzx
— MethodSusceptibility for tensor elements xzx, zxx, yzy and zyy.
SFGAnalysis.susceptibility_c3v_as_zzz
— MethodSusceptibility for tensor element zzz
SFGAnalysis.susceptibility_c3v_ss_xxz
— MethodSusceptibility for tensor elements xxz and yyz.
SFGAnalysis.susceptibility_c3v_ss_xzx
— MethodSusceptibility for tensor elements xzx, zxx, yzy and zyy.
SFGAnalysis.susceptibility_c3v_ss_zzz
— MethodSusceptibility for tensor element zzz
SFGAnalysis.voigt
— MethodSFGAnalysis.wl2freq
— Methodwl2freq(λ)
Compute the frequency of a field with wavelength λ
in nm.