Forward smearing
Smear (q, I, dI) data given to the routine Smear() using the slit-length weighting function Plengt(). The integration used below goes only over the slit length (does not include either slit width or wavelength broadening).
For now, Plengt() describes a rectangular slit and the integration extends up to the length of the slit. This could be changed if desired.
To complete the smearing for the last data points, extrapolation is necessary from the given data. The functional form may be only one of those provided (others could be added).
For q values in between given data points, interpolation is used. Log interpolation is tried first. If this fails due to a ValueError Exception, linear interpolation is used.
Slit-length weighting function, P_l(l)
It is defined for a rectangular slit of length 2*slitlength () and probability 1/(2*slitlength) (). It is zero elsewhere.:
P(l)
/--------------------|--------------------\
| | |
| | |
| ***************************** | 1/2l_o
| * | * |
| * | * |
| * | * |
\*******-------------|-------------*******/ 0
-l_o 0 l_o
Note: | integral( P(l) dl ) = 1.0 |
---|---|
Note: | If you change this to a different functional form ... It is not necessary to change the limit of the integration if the functional form here is changed. You may, however, need more parameters. |
Parameters: |
|
Returns: | P_l(l) |
Return type: | float |
Smear the data of C(q) into S(q) using the slit-length weighting function Plengt() and an extrapolation of the data to avoid truncation errors. Assume that Plengt() goes to zero for l > l_o (the slit length).
Also assume that the slit length function is symmetrical about l = zero.
This routine is written so that if Plengt() is changed (for example) to a Gaussian, that no further modification is necessary to the integration procedure. That is, this routine will integrate the data out to “slitlength” (l_o).
Parameters: |
|
---|---|
Returns: | tuple of (S, extrap) |
Return type: | (numpy.ndarray, object) |
Variables: | S (numpy.ndarray) – smeared version of C |
return the corrected intensity based on circular symmetry
Pick the extrapolation function for smearing
Parameters: |
|
---|---|
Returns: | function object of selected extrapolation |
Return type: | object |