33. Special functions library

sasmodels.special

Special functions for implementing scattering models.

Documentation for the special function library is in the Special Functions section of the manual. These are all available for import from sasmodels.special even though most of them are not listed in the documentation for this module.

See section Python Functions for differences from the C library.

class sasmodels.special.Gauss(w, z)

Bases: object

Gauss-Legendre integration weights

sasmodels.special.SINCOS(x)

return sin(x), cos(x)

sasmodels.special.cube(x)

return x^3

sasmodels.special.p1evl(x, c, n)

return x^n + p(x) for polynomial p of degree n-1 with coefficients c

sasmodels.special.polevl(x, c, n)

return p(x) for polynomial p of degree n-1 with coefficients c

sasmodels.special.pown(x, n)

return x^n for n integer

sasmodels.special.powr(x, y)

return x^y for x>0

sasmodels.special.sas_2J1x_x(x)

return 2*J1(x)/x

sasmodels.special.sas_3j1x_x(x)

return 3*j1(x)/x

sasmodels.special.sas_Si(x)

return Si(x)

sasmodels.special.sas_j1(x)

return j1(x)

sasmodels.special.sas_sinx_x(x)

return sin(x)/x

sasmodels.special.sincos(x)

return sin(x), cos(x)

sasmodels.special.square(x)

return x^2