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:
objectGauss-Legendre integration weights
- __class__¶
alias of
type
- __delattr__(name, /)¶
Implement delattr(self, name).
- __dict__ = mappingproxy({'__module__': 'sasmodels.special', '__doc__': 'Gauss-Legendre integration weights', '__init__': <function Gauss.__init__>, '__dict__': <attribute '__dict__' of 'Gauss' objects>, '__weakref__': <attribute '__weakref__' of 'Gauss' objects>, '__annotations__': {}})¶
- __dir__()¶
Default dir() implementation.
- __doc__ = 'Gauss-Legendre integration weights'¶
- __eq__(value, /)¶
Return self==value.
- __format__(format_spec, /)¶
Default object formatter.
- __ge__(value, /)¶
Return self>=value.
- __getattribute__(name, /)¶
Return getattr(self, name).
- __getstate__()¶
Helper for pickle.
- __gt__(value, /)¶
Return self>value.
- __hash__()¶
Return hash(self).
- __init__(w, z)¶
- classmethod __init_subclass__()¶
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- __le__(value, /)¶
Return self<=value.
- __lt__(value, /)¶
Return self<value.
- __module__ = 'sasmodels.special'¶
- __ne__(value, /)¶
Return self!=value.
- classmethod __new__(*args, **kwargs)¶
- __reduce__()¶
Helper for pickle.
- __reduce_ex__(protocol, /)¶
Helper for pickle.
- __repr__()¶
Return repr(self).
- __setattr__(name, value, /)¶
Implement setattr(self, name, value).
- __sizeof__()¶
Size of object in memory, in bytes.
- __str__()¶
Return str(self).
- classmethod __subclasshook__()¶
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- __weakref__¶
list of weak references to the object
- 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