skinoptics.anisotropy_factor module¶
This program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program. If not, see <https://www.gnu.org/licenses/>.
- skinoptics.anisotropy_factor.costheta_CS(g)¶
- The anisotropy factor as a function of the parameter g, assuming the Cornette-Shanksscattering phase function.For details please check Cornette & Shanks 1992 [CS92].
\(\langle \cos\theta \rangle_{CS}(g) = g\frac{3(4 + g^2)}{5(2 + g^2)}\)
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_D(g, alpha)¶
- The anisotropy factor as a function of the parameters g and alpha, assuming the Drainescattering phase function.For details please check Draine 2003 [D03].
\(\langle \cos\theta \rangle_{D}(g, \alpha) = g\frac{1 + \alpha(3 + 2g^2)/5}{1 + \alpha(1 + 2g^2)/3}\)
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
alpha – parameter \(\alpha\) [-]
- Float alpha:
float or np.ndarray
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_HGIT(g, gamma)¶
- The anisotropy factor as a function of the parameters g and gamma, assuming theHenyey-Greenstein scattering phase function with an isotropic term.For details please check Jacques, Alter & Prahl 1987 [JAP87] and Yoon et al. [Y*87].
\(\langle \cos\theta \rangle_{HGIT}(g, \gamma) = (1 - \gamma) \mbox{ } g\)
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
gamma (float) – fraction of isotropic term contribution [-] (must be in the range [0, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_RM(g, alpha)¶
- The anisotropy factor as a function of the parameters g and alpha, assuming theReynolds-McCormick scattering phase function.For details please check Reynolds & McCormick 1980 [RM80] and Jacques & McCormick 2023 [JM23].\(\langle \cos\theta \rangle_{RM}(g, \alpha) = \frac{2 \alpha g L - (1+g^2)}{2g(\alpha - 1)}\)with\(L = \frac{(1+g)^{2\alpha} + (1-g)^{2\alpha}}{(1+g)^{2\alpha} - (1-g)^{2\alpha}}\)
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
alpha – parameter \(\alpha\) [-] (must be greater than -0.5)
- Float alpha:
float or np.ndarray
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_TTHG(g1, g2, gamma)¶
- The anisotropy factor as a function of the parameters g1, g2 and gamma, assuming thetwo-term Henyey-Greenstein scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(\langle \cos\theta \rangle_{TTHG}(g_1, g_2, \gamma) = \gamma \mbox{ } g_1 + (1 - \gamma) \mbox { } g_2\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_TTRM(g1, g2, alpha1, alpha2, gamma)¶
- The anisotropy factor as a function of the parameters g1, g2, alpha1, alpha2 and gamma,assuming the two-term Reynolds-McCormick scattering phase function.For details please check Reynolds & McCormick 1980 [RM80] and Jacques & McCormick 2023 [JM23].
\(\langle \cos\theta \rangle_{TTRM}(g_1, g_2, \alpha_1, \alpha_2, \gamma) = \gamma \mbox{ } \langle \cos\theta \rangle_{RM}(g_1, \alpha_1) + (1 - \gamma) \mbox{ } \langle \cos\theta \rangle_{RM}(g_2, \alpha_2)\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
alpha1 (float) – parameter \(\alpha_1\) [-] (must be greater than -0.5)
alpha2 (float) – parameter \(\alpha_2\) [-] (must be greater than -0.5)
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_TTU2(g1, g2, gamma)¶
- The anisotropy factor as a function of the parameters g1, g2 and gamma, assuming thetwo-term Ultraspherical-2 scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(\langle \cos\theta \rangle_{TTU2}(g_1, g_2, \gamma) = \gamma \mbox{ } \langle \cos\theta \rangle_{U2}(g_1) + (1 - \gamma) \mbox{ } \langle \cos\theta \rangle_{U2}(g_2)\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.costheta_U2(g)¶
- The anisotropy factor as a function of the parameter g, assuming the Ultraspherical-2scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(\langle \cos\theta \rangle_{U2}(g) = \frac{1+g^2}{2g} + \left(\frac{1-g^2}{2g}\right)^2 \mbox{ ln} \left(\frac{1-g}{1+g}\right)\)
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
- Returns:
costheta (np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.g_Bosschaart(lambda0)¶
- The anisotropy factor of OXYGENATED BLOOD as a function of wavelength.Linear interpolation of experimental data compiled by Bosschaart et al. 2014 [B*14].
wavelength range: [251 nm, 1000 nm]
- Parameters:
lambda0 (float or np.ndarray) – wavelength [nm]
- Returns:
g (float or np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.g_vanGemert(lambda0)¶
- The anisotropy factor of human EPIDERMIS or DERMIS as a function of wavelength.van Gemert et al. 1989 [v*89]’s fit for experimental data from Bruls & van der Leun 1984[Bv84] (epidermis, 302, 365, 436 and 546 nm) and Jacques, Alter & Prahl 1987 [JAP87](dermis, 633 nm).
\(g(\lambda) = 0.29 \times 10^{-3} \lambda + 0.62\)
wavelength range: [302 nm, 633 nm]- Parameters:
lambda0 (float or np.ndarray) – wavelength [nm]
- Returns:
g (float or np.ndarray) – anisotropy factor [-]
- skinoptics.anisotropy_factor.ptheta_CS(theta, g)¶
- The Cornette-Shanks scattering phase function.For details please check Cornette & Shanks 1992 [CS92].
\(p_{CS}(\theta, g) = \frac{3}{2}\frac{1 + \cos^2\theta}{2 + g^2} \mbox{ } p_{HG}(\theta, g)\)
In this model \(g\) is NOT the anisotropy factor.- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_D(theta, g, alpha)¶
- The Draine scattering phase function.For details please check Draine 2003 [D03].
\(p_{D}(\theta, g, \alpha) = 3\frac{1 + \alpha \cos^2\theta}{3 + \alpha (1 + 2g^2)} \mbox{ } p_{HG}(\theta, g)\)
For \(\alpha = 1\) and \(g = 0\) it reduces to the Rayleigh phase function.For \(\alpha = 0\) it reduces to the Henyey-Greenstein scattering phase function.For \(\alpha = 1\) it reduces to the Cornette-Shanks scattering phase functionIn this model \(g\) is NOT the anisotropy factor.- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
alpha (float) – parameter \(\alpha\) [-]
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_HG(theta, g)¶
- The Henyey-Greenstein scattering phase function.For details please check Henyey & Greenstein 1941 [HG41].
\(p_{HG}(\theta, g) = \frac{1}{2}\frac{1 - g^2}{(1 + g^2 - 2g \cos \theta )^{3/2}}\)
In this particular model \(g\) is the anisotropy factor.
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_HGIT(theta, g, gamma)¶
- The Henyey-Greenstein scattering phase function with an isotropic term.For details please check Jacques, Alter & Prahl 1987 [JAP87] and Yoon et al. [Y*87].
\(p_{HGIT}(\theta, g, \gamma) = \frac{1}{2}\gamma + (1-\gamma) \mbox{ } p_{HG}(\theta, g)\)
In this model \(g\) is NOT the anisotropy factor.
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
gamma (float) – relative weight of the isotropic term component [-] (must be in the range [0, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_R(theta)¶
- The Rayleigh scattering phase function.For details please check Frisvad 2011 [F11].
\(p_{R}(\theta) = \frac{3}{8}(1 + \cos^2\theta)\)
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_RM(theta, g, alpha)¶
- The Reynolds-McCormick scattering phase function.For details please check Reynolds & McCormick 1980 [RM80] and Jacques & McCormick 2023 [JM23].
\(p_{RM}(\theta, g, \alpha) = 2 \frac{\alpha g}{(1 + g)^{2\alpha} - (1 - g)^{2\alpha}}\frac{(1 - g^2)^{2\alpha}}{(1 + g^2 - 2g\cos\theta)^{\alpha + 1}}\)
For \(\alpha = 1/2\) it reduces to the Henyey-Greenstein scattering phase function.For \(\alpha = 1\) it reduces to the Ultraspherical-2 scattering phase function.In this model \(g\) is the anisotropy factor only when \(\alpha = 1/2\).- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
alpha (float) – parameter \(\alpha\) [-] (must be greater than -0.5)
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_TTHG(theta, g1, g2, gamma)¶
- The two-term Henyey-Greenstein scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(p_{TTHG}(\theta, g_1, g_2, \gamma) = \gamma \mbox{ } p_{HG}(\theta, g_1) + (1 - \gamma) \mbox{ } p_{HG}(\theta, g_2)\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_TTRM(theta, g1, g2, alpha1, alpha2, gamma)¶
- The two-term Reynolds-McCormick scattering phase function.For details please check Reynolds & McCormick 1980 [RM80] and Jacques & McCormick 2023 [JM23].
\(p_{TTRM}(\theta, g_1, g_2, \alpha_1, \alpha_2, \gamma) = \gamma \mbox{ } p_{RM}(\theta, g_1, \alpha_1) + (1 - \gamma) \mbox{ } p_{RM}(\theta, g_2, \alpha_2)\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
alpha1 (float) – parameter \(\alpha_1\) [-] (must be greater than -1/2)
alpha2 (float) – parameter \(\alpha_2\) [-] (must be greater than -1/2)
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_TTU2(theta, g1, g2, gamma)¶
- The two-term Ultraspherical-2 scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(p_{TTU2}(\theta, g_1, g_2, \gamma) = \gamma \mbox{ } p_{U2}(\theta, g_1) + (1 - \gamma) \mbox{ } p_{U2}(\theta, g_2)\)
\(g_1\) characterises the shape and the strength of the forward scattering peak
\(g_2\) characterises the shape and the strength of the backward scattering peak
- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g1 (float) – parameter \(g_1\) [-] (must be in the range [0, 1])
g2 (float) – parameter \(g_2\) [-] (must be in the range [-1, 0])
gamma (float) – relative weight of the forward scattering component [-] (must be in the range [0, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.ptheta_U2(theta, g)¶
- The Ultraspherical-2 scattering phase function.For details please check Baes, Camps & Kapoor 2022 [BCK22].
\(p_{U2}(\theta, g) = \frac{1}{2}\frac{(1 - g^2)^2}{(1 + g^2 - 2g \cos \theta)^2}\)
In this model \(g\) is NOT the anisotropy factor.- Parameters:
theta (float or np.ndarray) – scattering angle [degrees]
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
- Returns:
ptheta (float or np.ndarray) – scattering phase function [-]
- skinoptics.anisotropy_factor.theta_HG_from_RND(g, n_RND=1000000)¶
- The scattering angle distribution as a function of the anisotropy factor and a set of randomnumbers uniformly distributed over the interval [0, 1), assuming the Henyey-Greensteinscattering phase function.For details please check section 3.5 from Wang & Jacques 1992 [WJ92].
\(\theta_{HG} = \left \{ \begin{matrix} \mbox{arccos}(2 \chi - 1) , & \mbox{if } g = 0 \\ \mbox{arccos}\left\{\frac{1}{2g} \left[1 + g^2 - \left(\frac{1 - g^2}{1 - g + 2g \chi}\right)^2\right]\right\}, & \mbox{if } g \ne 0 \end{matrix} \right.\)
in which \(\chi\) is a random number in the interval [0, 1)
In this particular model \(g\) is the anisotropy factor.
- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
n_RND (int) – number of random numbers [-] (default to int(1E6))
- Returns:
theta (np.ndarray) – scattering angle [degrees]
- skinoptics.anisotropy_factor.theta_R_from_RND(n_RND=1000000)¶
- The scattering angle distribution as a function of a set of random numbers uniformlydistributed over the interval [0, 1), assuming the Rayleigh scattering phase function.For details please check section 3.B from Frisvad 2011 [F11].\(\theta_{R} = \mbox{arccos}(\sqrt[3]{u + v} + \sqrt[3]{u - v})\)with\(u = -2(2 \chi - 1)\)\(v = \sqrt{4(2 \chi - 1)^2 + 1}\)in which \(\chi\) is a random number in the interval [0, 1)
- Parameters:
n_RND (int) – number of random numbers [-] (default to int(1E6))
- Returns:
theta (np.ndarray) – scattering angle [degrees]
- skinoptics.anisotropy_factor.theta_U2_from_RND(g, n_RND=1000000)¶
- The scattering angle distribution as a function of the g parameter and a set of randomnumbers uniformly distributed over the interval [0, 1), assuming the Ultraspherical-2scattering phase function.For details please check section 4.4.2 from Baes, Camps & Kapoor 2022 [BCK22].
\(\theta_{U2} = arccos\left[\frac{(1 + g)^2 - 2 \chi (1 + g^2)}{(1 + g)^2 - 4g \chi}\right]\)
in which \(\chi\) is a random number in the interval [0, 1)
In this model \(g\) is NOT the anisotropy factor.- Parameters:
g (float) – parameter \(g\) [-] (must be in the range [-1, 1])
n_RND (int) – number of random numbers [-] (default to int(1E6))
- Returns:
theta (np.ndarray) – scattering angle [degrees]