SAXS.Models.Formfactors#
SAXS/Models/FormFactors.py
The term “form factor” is used in two different ways in the literature: 1. The form factor amplitude F(q), which is the Fourier transform of the scattering length density. 2. The form factor intensity P(q), which is the square of the amplitude.
In this module, we use “form factor intensity” to refer to the intensity P(q), which is the square of the amplitude F(q).
- nquad_vec(f, limits)#
Vectorized version of scipy.integrate.nquad. Integrate a function of multiple variables over given limits. This is borrowed from a scipy issue.
- Parameters:
f (callable) – The integrand function. It must accept as many arguments as there are integration variables.
limits (list of tuples) – The integration limits for each variable. Each tuple should contain the lower and upper limits for the corresponding variable.
- Returns:
result – The result of the integration.
- Return type:
float or array-like
- homogeneous_sphere(q, R)#
Calculate the form factor intensity of a homogeneous sphere.
- sphere_volume(R)#
Calculate the volume of a sphere.
- spherical_shell(q, R, r)#
Calculate the form factor intensity of a spherical shell.
- ellipsoid_of_revolution(q, R, epsilon)#
Calculate the form factor intensity of an ellipsoid of revolution.