diff --git a/pub/lib/fbase.cpp b/pub/lib/fbase.cpp index 2c08f6c335d525b1b2391f63f0bf8509d71ae025..b573b952dcd85f0ea636a21cc964ff049c02e3a2 100644 --- a/pub/lib/fbase.cpp +++ b/pub/lib/fbase.cpp @@ -541,6 +541,24 @@ double func_ornuhl(double _w, double _a, double _b) return -9; // too many terms } +double func_sears_forward(double t, double si, double z) +{ + double p = t; + double mu = 1-si; + double r = t*sqrt(2*mu*si+si*si); + double a = r*(1-z)/2; + return (r*cosh(a)+p*sinh(a))/(r*cosh(r)+p*sinh(r))*exp(r*(1+z)/2); +} + +double func_sears_backward(double t, double si, double z) +{ + double p = t; + double mu = 1-si; + double r = t*sqrt(2*mu*si+si*si); + double a = r*(1-z)/2; + return (t*mu*sinh(a))/(r*cosh(r)+p*sinh(r))*exp(r*(1+z)/2); +} + //************************************************************************************************** //* Registration //************************************************************************************************** @@ -798,4 +816,9 @@ void fbase_initialize() G->register_fct_d_ddd(m, func_ornuhl); m = { "rotdiff", 3, "(w,tau,qb: rotational diffusion spectrum)" }; G->register_fct_d_ddd(m, func_rotdiff); + + m = { "sears_forward", 3, "(d/kz,sig/(mu+sig),zeta: Current U+)" }; + G->register_fct_d_ddd(m, func_sears_forward); + m = { "sears_backward", 3, "(d/kz,sig/(mu+sig),zeta: Current U-)" }; + G->register_fct_d_ddd(m, func_sears_backward); }