## Appendix B Parametric Double S-Shaped Functions
### Parametric Double Gaussian Function  
The Parametric Double Gaussian Function (PD_Gaus_F) is composed of 2 half Gaussian (or normal) distributions, each characterized by its own set of parameters:  
\[f(x) =p_{0}+f_{1}(x)+f_{2}(x),\] (A1) \[f_{1}(x) =\left\{\begin{array}{ll}p_{1}\,\exp\left[-0.5\left(\left(p_{2} -x\right)/p_{3}\right)^{2}\right]&\quad\text{if $x\leq p_{2}$}\\ p_{1}&\quad\text{if $x>p_{2}$},\end{array}\right.\] (A2) \[f_{2}(x) =\left\{\begin{array}{ll}0.0&\quad\text{if $x<p_{5}$}\\ p_{4}\left[1.0-\exp\left[-0.5\left(\left(x-p_{5}\right)/p_{6}\right)^{2}\right] \right]&\quad\text{if $x\geq p_{5}$},\end{array}\right.\] (A3)  
where  
* \(f(x)\) is the value of the Parametric Double Gaussian Function at argument \(x\), returned by the IDL function pd_gaus_f,
* \(f_{1}(x)\) is the value of the first Parametric Gaussian Function at argument \(x\), using parameters \(p_{1}\) to \(p_{3}\) and provided as the output positional parameter pgf1, and
* \(f_{2}(x)\) is the value of the second Parametric Gaussian Function at argument \(x\), using parameters \(p_{4}\) to \(p_{6}\) and provided as the output positional parameter pgf2.  
The 7 PD_Gaus_F model parameters have the following meanings:  
* \(p_{0}\) = Base value of \(f(x)\), i.e., asymptotic value when \(x\to-\infty\).
* \(p_{1}\) = Amplitude of \(f_{1}(x)\) (positive for an increase, negative for a decrease), independently from the base value.
* \(p_{2}\) = Phase shift along the \(x\) axis for the maximum of \(f_{1}(x)\): a positive (negative) value shifts the function to the right (left) of \(x=0\).
* \(p_{3}\) = Standard deviation of \(f_{1}(x)\).
* \(p_{4}\) = Amplitude of \(f_{2}(x)\) (positive for an increase, negative for a decrease), independently from the base value.
* \(p_{5}\) = Phase shift along the \(x\) axis for the maximum of \(f_{2}(x)\): a positive (negative) value shifts the function to the right (left) of \(x=0\).
* \(p_{6}\) = Standard deviation of \(f_{2}(x)\).  
The partial derivatives of the PD_Gaus_F model with respect to the 7 parameters are as follows:\[\partial f(x)/\partial p_{i} =\partial p_{0}/\partial p_{i}+\partial f_{1}(x)/\partial p_{i}+ \partial f_{2}(x)/\partial p_{i}, \tag{100}\] \[\partial p_{0}/\partial p_{i} =\left\{\begin{array}{ll}1.0&\text{if }i=0\\ 0.0&\text{if }i>0\end{array}\right.,\] (101) \[\partial f_{1}(x)/\partial p_{1} =\left\{\begin{array}{ll}\exp\left[-0.5\left(\left(p_{2}-x \right)/p_{3}\right)^{2}\right]&\text{if }x\leq p_{2}\\ 1.0&\text{if }x>p_{2}\end{array}\right.,\] (102) \[\partial f_{1}(x)/\partial p_{2} =\left\{\begin{array}{ll}-\left[p_{1}\left(p_{2}-x\right)/p_{3} ^{2}\right]\,\exp\left[-0.5\left(\left(p_{2}-x\right)/p_{3}\right)^{2}\right]& \text{if }x\leq p_{2}\\ 0.0&\text{if }x>p_{2}\end{array}\right.,\] (103) \[\partial f_{1}(x)/\partial p_{3} =\left\{\begin{array}{ll}\left[p_{1}\left(p_{2}-x\right)^{2}/p_ {3}^{3}\right]\,\exp\left[-0.5\left(\left(p_{2}-x\right)/p_{3}\right)^{2}\right] &\text{if }x\leq p_{2}\\ 0.0&\text{if }x>p_{2}\end{array}\right.,\] (104) \[\partial f_{2}(x)/\partial p_{4} =\left\{\begin{array}{ll}0.0&\text{if }x<p_{5}\\ 1.0-\exp\left[-0.5\left(\left(p_{5}-x\right)/p_{6}\right)^{2}\right]&\text{if }x\geq p_{5} \end{array}\right.,\] (105) \[\partial f_{2}(x)/\partial p_{5} =\left\{\begin{array}{ll}0.0&\text{if }x<p_{5}\\ \left[p_{4}\left(p_{5}-x\right)/p_{6}^{2}\right]\,\exp\left[-0.5\left(\left(p_ {5}-x\right)/p_{6}\right)^{2}\right]&\text{if }x\geq p_{5}\end{array}\right.,\] (106) \[\partial f_{2}(x)/\partial p_{6} =\left\{\begin{array}{ll}0.0&\text{if }x<p_{5}\\ -\left[p_{4}\left(p_{5}-x\right)^{2}/p_{6}^{3}\right]\,\exp\left[-0.5\left( \left(p_{5}-x\right)/p_{6}\right)^{2}\right]&\text{if }x\geq p_{5}\end{array}\right., \tag{107}\]  
and all other partial derivatives (e.g., \(\partial f_{1}(x)/\partial p_{0}\), \(\partial f_{1}(x)/\partial p_{5}\) or \(\partial f_{2}(x)/\partial p_{3}\)) are null.