Skip to content

Commit 09d6638

Browse files
docs: add utility for functions.py
1 parent 5d4accf commit 09d6638

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

doc/utilities/functions_utility.rst

+19
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,22 @@
22

33
Functions Utility
44
=================
5+
6+
The `diffpy.labpdfproc.functions` module provides tools
7+
for computing and applying absorption correction (cve) to 1D diffraction patterns.
8+
9+
- `Gridded_circle`: This class supports absorption correction by
10+
creating a uniform grid of points within a circle for a given radius and mu (linear absorption coefficient),
11+
and computing the path length and effective volume for each grid point at a given angle.
12+
13+
- `compute_cve`: This function computes the absorption correction curve for a given mu*D
14+
(absorption coefficient mu and capillary diameter D).
15+
For brute force computation, it averages the effective volume across all grid points,
16+
then computes the cve values as the reciprocal of this average.
17+
For polynomial interpolation, it uses pre-computed coefficients to quickly interpolate cve values for a given mu*D.
18+
Polynomial interpolation is available for mu*D values between 0.5-6.
19+
20+
- `apply_corr`: This function applies the computed absorption correction to the input diffraction pattern
21+
by multiplying it with the computed cve, resulting in a corrected diffraction pattern.
22+
23+
For a more in-depth tutorial for how to use these tools, click :ref:`here <Functions Example>`.

0 commit comments

Comments
 (0)