diff --git a/pub/lib/fbase.cpp b/pub/lib/fbase.cpp index 054964a7fe7b5ef1f17c80fc21ba3937b91fe170..cb27869d792807b3d7128b518389e4bbe22c0d24 100644 --- a/pub/lib/fbase.cpp +++ b/pub/lib/fbase.cpp @@ -641,6 +641,16 @@ double func_im_wofz(double x, double y) return cimag(w_of_z({x, y})); } +double func_abs_wofz(double x, double y) +{ + return cabs(w_of_z({x, y})); +} + +double func_arg_wofz(double x, double y) +{ + return atan2(cimag(w_of_z({x, y})), creal(w_of_z({x, y}))); +} + //************************************************************************************************** //* Functions of three arguments //************************************************************************************************** @@ -1079,10 +1089,14 @@ void fbase_initialize() G->register_fct_d_dd(m, func_heat_sphere); m = {"voigt_hwhm", 3, "(sigma,gamma): hwhm of voigt(x,sigma,gamma)"}; G->register_fct_d_dd(m, func_voigt_hwhm); - m = {"im_wofz", 3, "(x,y): imaginary part of Faddeeva's function"}; - G->register_fct_d_dd(m, func_im_wofz); m = {"re_wofz", 3, "(x,y): real part of Faddeeva's function"}; G->register_fct_d_dd(m, func_re_wofz); + m = {"im_wofz", 3, "(x,y): imaginary part of Faddeeva's function"}; + G->register_fct_d_dd(m, func_im_wofz); + m = {"abs_wofz", 3, "(x,y): absolute valueof Faddeeva's function"}; + G->register_fct_d_dd(m, func_abs_wofz); + m = {"arg_wofz", 3, "(x,y): phase of Faddeeva's function"}; + G->register_fct_d_dd(m, func_arg_wofz); // f(3 args) m = {"rehavneg", 3, "(x,y,z): real part of the Havriliak-Negami function"};