This code follows the fit model introduced by Bellamy et al. [https://doi.org/10.1016/0168-9002(94)90183-X], see eq. (7) of this work. Equation (8) is not correct though...that is why my fit model looks a little bit different. The derivation of the fit model can be found in Appendix A of https://drive.google.com/file/d/1llgnIh8G0eZOD8E-DncQAJQOE9MMO1Nj/view
See Notebook for example.
Martin Unland - m.unland AT wwu.de